servo: Merge #17390 - Untry (from servo:untry); r=nox
authorSimon Sapin <simon.sapin@exyr.org>
Sun, 18 Jun 2017 05:55:11 -0700
changeset 364566 69830ab24d9695c161b3ad8fe25523ff8e4ccc21
parent 364565 745c3dd00b7b6b10bf9e2690612c5755ca39a47e
child 364567 4d13b1f2f9467bc5f60a5233d850fa4256f78beb
push id32049
push usercbook@mozilla.com
push dateMon, 19 Jun 2017 11:36:23 +0000
treeherdermozilla-central@26d62a1ac0e3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnox
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
servo: Merge #17390 - Untry (from servo:untry); r=nox Source-Repo: https://github.com/servo/servo Source-Revision: 568ab550053fddf346806ed6cc2d3bfe37f3e1d0
servo/components/bluetooth/lib.rs
servo/components/bluetooth/test.rs
servo/components/canvas/webgl_paint_thread.rs
servo/components/config/prefs.rs
servo/components/config/resource_files.rs
servo/components/constellation/pipeline.rs
servo/components/devtools/actor.rs
servo/components/devtools/actors/console.rs
servo/components/devtools/actors/inspector.rs
servo/components/gfx/font_context.rs
servo/components/gfx/font_template.rs
servo/components/gfx/platform/freetype/android/font_list.rs
servo/components/gfx/platform/freetype/font.rs
servo/components/gfx/platform/freetype/font_template.rs
servo/components/gfx/platform/windows/font.rs
servo/components/gfx/text/glyph.rs
servo/components/layout/floats.rs
servo/components/layout/flow.rs
servo/components/layout/flow_list.rs
servo/components/layout/fragment.rs
servo/components/layout_thread/lib.rs
servo/components/net/connector.rs
servo/components/net/filemanager_thread.rs
servo/components/net/http_loader.rs
servo/components/net/image_cache.rs
servo/components/net/mime_classifier.rs
servo/components/net_traits/blob_url_store.rs
servo/components/script/body.rs
servo/components/script/dom/bindings/conversions.rs
servo/components/script/dom/bindings/mozmap.rs
servo/components/script/dom/bindings/structuredclone.rs
servo/components/script/dom/bindings/xmlname.rs
servo/components/script/dom/bluetooth.rs
servo/components/script/dom/canvasrenderingcontext2d.rs
servo/components/script/dom/dedicatedworkerglobalscope.rs
servo/components/script/dom/dissimilaroriginwindow.rs
servo/components/script/dom/document.rs
servo/components/script/dom/domimplementation.rs
servo/components/script/dom/domtokenlist.rs
servo/components/script/dom/element.rs
servo/components/script/dom/headers.rs
servo/components/script/dom/htmlcanvaselement.rs
servo/components/script/dom/htmloptionscollection.rs
servo/components/script/dom/htmltableelement.rs
servo/components/script/dom/imagedata.rs
servo/components/script/dom/location.rs
servo/components/script/dom/node.rs
servo/components/script/dom/nodeiterator.rs
servo/components/script/dom/range.rs
servo/components/script/dom/request.rs
servo/components/script/dom/response.rs
servo/components/script/dom/serviceworker.rs
servo/components/script/dom/serviceworkerglobalscope.rs
servo/components/script/dom/servoparser/html.rs
servo/components/script/dom/treewalker.rs
servo/components/script/dom/vrdisplay.rs
servo/components/script/dom/webgl_validations/tex_image_2d.rs
servo/components/script/dom/webglrenderingcontext.rs
servo/components/script/dom/websocket.rs
servo/components/script/dom/window.rs
servo/components/script/dom/worker.rs
servo/components/script/dom/xmlhttprequest.rs
servo/components/script/layout_wrapper.rs
servo/components/script_traits/lib.rs
servo/components/selectors/parser.rs
servo/components/style/attr.rs
servo/components/style/context.rs
servo/components/style/custom_properties.rs
servo/components/style/dom.rs
servo/components/style/gecko/media_queries.rs
servo/components/style/gecko/wrapper.rs
servo/components/style/gecko_string_cache/mod.rs
servo/components/style/lib.rs
servo/components/style/logical_geometry.rs
servo/components/style/media_queries.rs
servo/components/style/properties/declaration_block.rs
servo/components/style/properties/helpers.mako.rs
servo/components/style/properties/helpers/animated_properties.mako.rs
servo/components/style/properties/longhand/background.mako.rs
servo/components/style/properties/longhand/border.mako.rs
servo/components/style/properties/longhand/box.mako.rs
servo/components/style/properties/longhand/counters.mako.rs
servo/components/style/properties/longhand/effects.mako.rs
servo/components/style/properties/longhand/font.mako.rs
servo/components/style/properties/longhand/inherited_box.mako.rs
servo/components/style/properties/longhand/inherited_table.mako.rs
servo/components/style/properties/longhand/inherited_text.mako.rs
servo/components/style/properties/longhand/pointing.mako.rs
servo/components/style/properties/longhand/text.mako.rs
servo/components/style/properties/longhand/ui.mako.rs
servo/components/style/properties/properties.mako.rs
servo/components/style/properties/shorthand/background.mako.rs
servo/components/style/properties/shorthand/border.mako.rs
servo/components/style/properties/shorthand/box.mako.rs
servo/components/style/properties/shorthand/font.mako.rs
servo/components/style/properties/shorthand/mask.mako.rs
servo/components/style/properties/shorthand/outline.mako.rs
servo/components/style/properties/shorthand/position.mako.rs
servo/components/style/servo/media_queries.rs
servo/components/style/servo/restyle_damage.rs
servo/components/style/stylesheets/document_rule.rs
servo/components/style/stylesheets/keyframes_rule.rs
servo/components/style/stylesheets/rule_parser.rs
servo/components/style/stylesheets/viewport_rule.rs
servo/components/style/values/computed/mod.rs
servo/components/style/values/generics/mod.rs
servo/components/style/values/specified/calc.rs
servo/components/style/values/specified/image.rs
servo/components/style/values/specified/length.rs
servo/components/style/values/specified/mod.rs
servo/components/style_traits/viewport.rs
servo/components/url/lib.rs
servo/components/webdriver_server/keys.rs
servo/components/webdriver_server/lib.rs
servo/tests/unit/net/mime_classifier.rs
--- a/servo/components/bluetooth/lib.rs
+++ b/servo/components/bluetooth/lib.rs
@@ -431,17 +431,17 @@ impl BluetoothManager {
     fn device_is_cached(&self, device_id: &str) -> bool {
         self.cached_devices.contains_key(device_id) && self.address_to_id.values().any(|v| v == device_id)
     }
 
     fn device_matches_filter(&mut self,
                              device_id: &str,
                              filters: &BluetoothScanfilterSequence)
                              -> BluetoothResult<bool> {
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
         match self.get_device(&mut adapter, device_id) {
             Some(ref device) => Ok(matches_filters(device, filters)),
             None => Ok(false),
         }
     }
 
     // Service
 
@@ -573,17 +573,17 @@ impl BluetoothManager {
 
     // Methods
 
     // https://webbluetoothcg.github.io/web-bluetooth/#request-bluetooth-devices
     fn request_device(&mut self,
                       options: RequestDeviceoptions)
                       -> BluetoothResponseResult {
         // Step 6.
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
 
         // Step 7.
         // Note: There are no requiredServiceUUIDS, we scan for all devices.
         if let Ok(ref session) = adapter.create_discovery_session() {
             if session.start_discovery().is_ok() {
                 if !is_mock_adapter(&adapter) {
                     thread::sleep(Duration::from_millis(DISCOVERY_TIMEOUT_MS));
                 }
@@ -625,17 +625,17 @@ impl BluetoothManager {
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-connect
     fn gatt_server_connect(&mut self, device_id: String) -> BluetoothResponseResult {
         // Step 2.
         if !self.device_is_cached(&device_id) {
             return Err(BluetoothError::Network);
         }
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
 
         // Step 5.1.1.
         match self.get_device(&mut adapter, &device_id) {
             Some(d) => {
                 if d.is_connected().unwrap_or(false) {
                     return Ok(BluetoothResponse::GATTServerConnect(true));
                 }
                 let _ = d.connect();
@@ -655,17 +655,17 @@ impl BluetoothManager {
                 return Err(BluetoothError::Network);
             },
             None => return Err(BluetoothError::NotFound),
         }
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-disconnect
     fn gatt_server_disconnect(&mut self, device_id: String) -> BluetoothResult<()> {
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
         match self.get_device(&mut adapter, &device_id) {
             Some(d) => {
                 // Step 2.
                 if !d.is_connected().unwrap_or(true) {
                     return Ok(());
                 }
                 let _ = d.disconnect();
                 for _ in 0..MAXIMUM_TRANSACTION_TIME {
@@ -682,17 +682,17 @@ impl BluetoothManager {
 
     // https://webbluetoothcg.github.io/web-bluetooth/#getgattchildren
     fn get_gatt_children(&mut self,
                          id: String,
                          uuid: Option<String>,
                          single: bool,
                          child_type: GATTType)
                          -> BluetoothResponseResult {
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
         match child_type {
             GATTType::PrimaryService => {
                 // Step 5.
                 if !self.device_is_cached(&id) {
                     return Err(BluetoothError::InvalidState);
                 }
                 // Step 6.
                 if let Some(ref uuid) = uuid {
@@ -834,17 +834,17 @@ impl BluetoothManager {
         }
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-readvalue
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-readvalue
     fn read_value(&mut self, id: String) -> BluetoothResponseResult {
         // (Characteristic) Step 5.2: Missing because it is optional.
         // (Descriptor)     Step 5.1: Missing because it is optional.
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
 
         // (Characteristic) Step 5.3.
         let mut value = self.get_gatt_characteristic(&mut adapter, &id)
                             .map(|c| c.read_value().unwrap_or(vec![]));
 
         // (Characteristic) TODO: Step 5.4: Handle all the errors returned from the read_value call.
 
         // (Descriptor) Step 5.2.
@@ -866,17 +866,17 @@ impl BluetoothManager {
         }
     }
 
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-writevalue
     // https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-writevalue
     fn write_value(&mut self, id: String, value: Vec<u8>) -> BluetoothResponseResult {
         // (Characteristic) Step 7.2: Missing because it is optional.
         // (Descriptor)     Step 7.1: Missing because it is optional.
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
 
         // (Characteristic) Step 7.3.
         let mut result = self.get_gatt_characteristic(&mut adapter, &id)
                              .map(|c| c.write_value(value.clone()));
 
         // (Characteristic) TODO: Step 7.4: Handle all the errors returned from the write_value call.
 
         // (Descriptor) Step 7.2.
@@ -908,17 +908,17 @@ impl BluetoothManager {
     fn enable_notification(&mut self, id: String, enable: bool) -> BluetoothResponseResult {
         // (StartNotifications) Step 3 - 4.
         // (StopNotifications) Step 1 - 2.
         if !self.characteristic_is_cached(&id) {
             return Err(BluetoothError::InvalidState);
         }
 
         // (StartNotification) TODO: Step 7: Missing because it is optional.
-        let mut adapter = try!(self.get_adapter());
+        let mut adapter = self.get_adapter()?;
         match self.get_gatt_characteristic(&mut adapter, &id) {
             Some(c) => {
                 let result = match enable {
                     // (StartNotification) Step 8.
                     // TODO: Handle all the errors returned from the start_notify call.
                     true => c.start_notify(),
 
                     // (StopNotification) Step 4.
--- a/servo/components/bluetooth/test.rs
+++ b/servo/components/bluetooth/test.rs
@@ -124,399 +124,399 @@ fn generate_id() -> Uuid {
             }
         );
     }
     id
 }
 
 // Set the adapter's name, is_powered and is_discoverable attributes
 fn set_adapter(adapter: &BluetoothAdapter, adapter_name: String) -> Result<(), Box<Error>> {
-    try!(adapter.set_name(adapter_name));
-    try!(adapter.set_powered(true));
-    try!(adapter.set_discoverable(true));
+    adapter.set_name(adapter_name)?;
+    adapter.set_powered(true)?;
+    adapter.set_discoverable(true)?;
     Ok(())
 }
 
 // Create Device
 fn create_device(adapter: &BluetoothAdapter,
                  name: String,
                  address: String)
                  -> Result<BluetoothDevice, Box<Error>> {
-    let device = try!(BluetoothDevice::create_mock_device(adapter.clone(), generate_id().to_string()));
-    try!(device.set_name(Some(name)));
-    try!(device.set_address(address));
-    try!(device.set_connectable(true));
+    let device = BluetoothDevice::create_mock_device(adapter.clone(), generate_id().to_string())?;
+    device.set_name(Some(name))?;
+    device.set_address(address)?;
+    device.set_connectable(true)?;
     Ok(device)
 }
 
 // Create Device with UUIDs
 fn create_device_with_uuids(adapter: &BluetoothAdapter,
                             name: String,
                             address: String,
                             uuids: Vec<String>)
                             -> Result<BluetoothDevice, Box<Error>> {
-    let device = try!(create_device(adapter, name, address));
-    try!(device.set_uuids(uuids));
+    let device = create_device(adapter, name, address)?;
+    device.set_uuids(uuids)?;
     Ok(device)
 }
 
 // Create Service
 fn create_service(device: &BluetoothDevice,
                   uuid: String)
                   -> Result<BluetoothGATTService, Box<Error>> {
-    let service = try!(BluetoothGATTService::create_mock_service(device.clone(), generate_id().to_string()));
-    try!(service.set_uuid(uuid));
+    let service = BluetoothGATTService::create_mock_service(device.clone(), generate_id().to_string())?;
+    service.set_uuid(uuid)?;
     Ok(service)
 }
 
 // Create Characteristic
 fn create_characteristic(service: &BluetoothGATTService,
                          uuid: String)
                          -> Result<BluetoothGATTCharacteristic, Box<Error>> {
     let characteristic =
-        try!(BluetoothGATTCharacteristic::create_mock_characteristic(service.clone(), generate_id().to_string()));
-    try!(characteristic.set_uuid(uuid));
+        BluetoothGATTCharacteristic::create_mock_characteristic(service.clone(), generate_id().to_string())?;
+    characteristic.set_uuid(uuid)?;
     Ok(characteristic)
 }
 
 // Create Characteristic with value
 fn create_characteristic_with_value(service: &BluetoothGATTService,
                                     uuid: String,
                                     value: Vec<u8>)
                                     -> Result<BluetoothGATTCharacteristic, Box<Error>> {
-    let characteristic = try!(create_characteristic(service, uuid));
-    try!(characteristic.set_value(value));
+    let characteristic = create_characteristic(service, uuid)?;
+    characteristic.set_value(value)?;
     Ok(characteristic)
 }
 
 // Create Descriptor
 fn create_descriptor(characteristic: &BluetoothGATTCharacteristic,
                                      uuid: String)
                                      -> Result<BluetoothGATTDescriptor, Box<Error>> {
     let descriptor =
-        try!(BluetoothGATTDescriptor::create_mock_descriptor(characteristic.clone(), generate_id().to_string()));
-    try!(descriptor.set_uuid(uuid));
+        BluetoothGATTDescriptor::create_mock_descriptor(characteristic.clone(), generate_id().to_string())?;
+    descriptor.set_uuid(uuid)?;
     Ok(descriptor)
 }
 
 // Create Descriptor with value
 fn create_descriptor_with_value(characteristic: &BluetoothGATTCharacteristic,
                                 uuid: String,
                                 value: Vec<u8>)
                                 -> Result<BluetoothGATTDescriptor, Box<Error>> {
-    let descriptor = try!(create_descriptor(characteristic, uuid));
-    try!(descriptor.set_value(value));
+    let descriptor = create_descriptor(characteristic, uuid)?;
+    descriptor.set_value(value)?;
     Ok(descriptor)
 }
 
 fn create_heart_rate_service(device: &BluetoothDevice,
                              empty: bool)
                              -> Result<BluetoothGATTService, Box<Error>> {
     // Heart Rate Service
-    let heart_rate_service = try!(create_service(device, HEART_RATE_SERVICE_UUID.to_owned()));
+    let heart_rate_service = create_service(device, HEART_RATE_SERVICE_UUID.to_owned())?;
 
     if empty {
         return Ok(heart_rate_service)
     }
 
     // Heart Rate Measurement Characteristic
     let heart_rate_measurement_characteristic =
-        try!(create_characteristic_with_value(&heart_rate_service,
+        create_characteristic_with_value(&heart_rate_service,
                                               HEART_RATE_MEASUREMENT_CHARACTERISTIC_UUID.to_owned(),
-                                              vec![0]));
-    try!(heart_rate_measurement_characteristic.set_flags(vec![NOTIFY_FLAG.to_string(),
+                                              vec![0])?;
+    heart_rate_measurement_characteristic.set_flags(vec![NOTIFY_FLAG.to_string(),
                                                               READ_FLAG.to_string(),
-                                                              WRITE_FLAG.to_string()]));
+                                                              WRITE_FLAG.to_string()])?;
 
     // Body Sensor Location Characteristic 1
     let body_sensor_location_characteristic_1 =
-        try!(create_characteristic_with_value(&heart_rate_service,
+        create_characteristic_with_value(&heart_rate_service,
                                               BODY_SENSOR_LOCATION_CHARACTERISTIC_UUID.to_owned(),
-                                              vec![49]));
-    try!(body_sensor_location_characteristic_1.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+                                              vec![49])?;
+    body_sensor_location_characteristic_1.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
 
     // Body Sensor Location Characteristic 2
     let body_sensor_location_characteristic_2 =
-        try!(create_characteristic_with_value(&heart_rate_service,
+        create_characteristic_with_value(&heart_rate_service,
                                               BODY_SENSOR_LOCATION_CHARACTERISTIC_UUID.to_owned(),
-                                              vec![50]));
-    try!(body_sensor_location_characteristic_2.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+                                              vec![50])?;
+    body_sensor_location_characteristic_2.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
     Ok(heart_rate_service)
 }
 
 fn create_generic_access_service(device: &BluetoothDevice,
                                  empty: bool)
                                  -> Result<BluetoothGATTService, Box<Error>> {
     // Generic Access Service
     let generic_access_service =
-        try!(create_service(device, GENERIC_ACCESS_SERVICE_UUID.to_owned()));
+        create_service(device, GENERIC_ACCESS_SERVICE_UUID.to_owned())?;
 
     if empty {
         return Ok(generic_access_service)
     }
 
     // Device Name Characteristic
     let device_name_characteristic =
-        try!(create_characteristic_with_value(&generic_access_service,
+        create_characteristic_with_value(&generic_access_service,
                                               DEVICE_NAME_CHARACTERISTIC_UUID.to_owned(),
-                                              HEART_RATE_DEVICE_NAME.as_bytes().to_vec()));
-    try!(device_name_characteristic.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+                                              HEART_RATE_DEVICE_NAME.as_bytes().to_vec())?;
+    device_name_characteristic.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
 
     // Number of Digitals descriptor
     let number_of_digitals_descriptor_1 =
-        try!(create_descriptor_with_value(&device_name_characteristic,
+        create_descriptor_with_value(&device_name_characteristic,
                                           NUMBER_OF_DIGITALS_UUID.to_owned(),
-                                          vec![49]));
-    try!(number_of_digitals_descriptor_1.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+                                          vec![49])?;
+    number_of_digitals_descriptor_1.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
 
     let number_of_digitals_descriptor_2 =
-        try!(create_descriptor_with_value(&device_name_characteristic,
+        create_descriptor_with_value(&device_name_characteristic,
                                           NUMBER_OF_DIGITALS_UUID.to_owned(),
-                                          vec![50]));
-    try!(number_of_digitals_descriptor_2.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+                                          vec![50])?;
+    number_of_digitals_descriptor_2.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
 
     // Characteristic User Description Descriptor
     let _characteristic_user_description =
-        try!(create_descriptor_with_value(&device_name_characteristic,
+        create_descriptor_with_value(&device_name_characteristic,
                                           CHARACTERISTIC_USER_DESCRIPTION_UUID.to_owned(),
-                                          HEART_RATE_DEVICE_NAME_DESCRIPTION.as_bytes().to_vec()));
+                                          HEART_RATE_DEVICE_NAME_DESCRIPTION.as_bytes().to_vec())?;
 
     // Client Characteristic Configuration descriptor
     let _client_characteristic_configuration =
-        try!(create_descriptor_with_value(&device_name_characteristic,
+        create_descriptor_with_value(&device_name_characteristic,
                                           CLIENT_CHARACTERISTIC_CONFIGURATION_UUID.to_owned(),
-                                          vec![0]));
+                                          vec![0])?;
 
     // Peripheral Privacy Flag Characteristic
     let peripheral_privacy_flag_characteristic =
-        try!(create_characteristic(&generic_access_service, PERIPHERAL_PRIVACY_FLAG_CHARACTERISTIC_UUID.to_owned()));
-    try!(peripheral_privacy_flag_characteristic
-         .set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+        create_characteristic(&generic_access_service, PERIPHERAL_PRIVACY_FLAG_CHARACTERISTIC_UUID.to_owned())?;
+    peripheral_privacy_flag_characteristic
+         .set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
     Ok(generic_access_service)
 }
 
 // Create Heart Rate Device
 fn create_heart_rate_device(adapter: &BluetoothAdapter,
                             empty: bool)
                             -> Result<BluetoothDevice, Box<Error>> {
     // Heart Rate Device
     let heart_rate_device =
-        try!(create_device_with_uuids(adapter,
+        create_device_with_uuids(adapter,
                                       HEART_RATE_DEVICE_NAME.to_owned(),
                                       HEART_RATE_DEVICE_ADDRESS.to_owned(),
                                       vec![GENERIC_ACCESS_SERVICE_UUID.to_owned(),
-                                           HEART_RATE_SERVICE_UUID.to_owned()]));
+                                           HEART_RATE_SERVICE_UUID.to_owned()])?;
 
     if empty {
         return Ok(heart_rate_device);
     }
 
     // Generic Access Service
-    let _generic_access_service = try!(create_generic_access_service(&heart_rate_device, false));
+    let _generic_access_service = create_generic_access_service(&heart_rate_device, false)?;
 
     // Heart Rate Service
-    let _heart_rate_service = try!(create_heart_rate_service(&heart_rate_device, false));
+    let _heart_rate_service = create_heart_rate_service(&heart_rate_device, false)?;
 
     Ok(heart_rate_device)
 }
 
 fn create_missing_characterisitc_heart_rate_device(adapter: &BluetoothAdapter) -> Result<(), Box<Error>> {
-    let heart_rate_device_empty = try!(create_heart_rate_device(adapter, true));
+    let heart_rate_device_empty = create_heart_rate_device(adapter, true)?;
 
-    let _generic_access_service_empty = try!(create_generic_access_service(&heart_rate_device_empty, true));
+    let _generic_access_service_empty = create_generic_access_service(&heart_rate_device_empty, true)?;
 
-    let _heart_rate_service_empty = try!(create_heart_rate_service(&heart_rate_device_empty, true));
+    let _heart_rate_service_empty = create_heart_rate_service(&heart_rate_device_empty, true)?;
 
     Ok(())
 }
 
 fn create_missing_descriptor_heart_rate_device(adapter: &BluetoothAdapter) -> Result<(), Box<Error>> {
-    let heart_rate_device_empty = try!(create_heart_rate_device(adapter, true));
+    let heart_rate_device_empty = create_heart_rate_device(adapter, true)?;
 
-    let generic_access_service_empty = try!(create_generic_access_service(&heart_rate_device_empty, true));
+    let generic_access_service_empty = create_generic_access_service(&heart_rate_device_empty, true)?;
 
     let _device_name_characteristic =
-        try!(create_characteristic_with_value(&generic_access_service_empty,
+        create_characteristic_with_value(&generic_access_service_empty,
                                               DEVICE_NAME_CHARACTERISTIC_UUID.to_owned(),
-                                              HEART_RATE_DEVICE_NAME.as_bytes().to_vec()));
+                                              HEART_RATE_DEVICE_NAME.as_bytes().to_vec())?;
 
     let peripheral_privacy_flag_characteristic =
-        try!(create_characteristic(&generic_access_service_empty,
-                                   PERIPHERAL_PRIVACY_FLAG_CHARACTERISTIC_UUID.to_owned()));
-    try!(peripheral_privacy_flag_characteristic.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+        create_characteristic(&generic_access_service_empty,
+                                   PERIPHERAL_PRIVACY_FLAG_CHARACTERISTIC_UUID.to_owned())?;
+    peripheral_privacy_flag_characteristic.set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
 
-    let _heart_rate_service = try!(create_heart_rate_service(&heart_rate_device_empty, false));
+    let _heart_rate_service = create_heart_rate_service(&heart_rate_device_empty, false)?;
 
     Ok(())
 }
 
 fn create_two_heart_rate_services_device(adapter: &BluetoothAdapter) -> Result<(), Box<Error>> {
-    let heart_rate_device_empty = try!(create_heart_rate_device(adapter, true));
+    let heart_rate_device_empty = create_heart_rate_device(adapter, true)?;
 
-    try!(heart_rate_device_empty.set_uuids(vec![GENERIC_ACCESS_SERVICE_UUID.to_owned(),
+    heart_rate_device_empty.set_uuids(vec![GENERIC_ACCESS_SERVICE_UUID.to_owned(),
                                                 HEART_RATE_SERVICE_UUID.to_owned(),
-                                                HEART_RATE_SERVICE_UUID.to_owned()]));
+                                                HEART_RATE_SERVICE_UUID.to_owned()])?;
 
-    let _generic_access_service = try!(create_generic_access_service(&heart_rate_device_empty, false));
+    let _generic_access_service = create_generic_access_service(&heart_rate_device_empty, false)?;
 
-    let heart_rate_service_empty_1 = try!(create_heart_rate_service(&heart_rate_device_empty, true));
+    let heart_rate_service_empty_1 = create_heart_rate_service(&heart_rate_device_empty, true)?;
 
-    let heart_rate_service_empty_2 = try!(create_heart_rate_service(&heart_rate_device_empty, true));
+    let heart_rate_service_empty_2 = create_heart_rate_service(&heart_rate_device_empty, true)?;
 
     let heart_rate_measurement_characteristic =
-        try!(create_characteristic_with_value(&heart_rate_service_empty_1,
+        create_characteristic_with_value(&heart_rate_service_empty_1,
                                               HEART_RATE_MEASUREMENT_CHARACTERISTIC_UUID.to_owned(),
-                                              vec![0]));
-    try!(heart_rate_measurement_characteristic.set_flags(vec![NOTIFY_FLAG.to_string()]));
+                                              vec![0])?;
+    heart_rate_measurement_characteristic.set_flags(vec![NOTIFY_FLAG.to_string()])?;
 
     let _body_sensor_location_characteristic_1 =
-        try!(create_characteristic_with_value(&heart_rate_service_empty_1,
+        create_characteristic_with_value(&heart_rate_service_empty_1,
                                               BODY_SENSOR_LOCATION_CHARACTERISTIC_UUID.to_owned(),
-                                              vec![49]));
+                                              vec![49])?;
 
     let _body_sensor_location_characteristic_2 =
-        try!(create_characteristic_with_value(&heart_rate_service_empty_2,
+        create_characteristic_with_value(&heart_rate_service_empty_2,
                                               BODY_SENSOR_LOCATION_CHARACTERISTIC_UUID.to_owned(),
-                                              vec![50]));
+                                              vec![50])?;
     Ok(())
 }
 
 fn create_blocklisted_device(adapter: &BluetoothAdapter) -> Result<(), Box<Error>> {
     let connectable_device =
-    try!(create_device_with_uuids(adapter,
+    create_device_with_uuids(adapter,
                                  CONNECTABLE_DEVICE_NAME.to_owned(),
                                  CONNECTABLE_DEVICE_ADDRESS.to_owned(),
                                  vec![BLOCKLIST_TEST_SERVICE_UUID.to_owned(),
                                       DEVICE_INFORMATION_UUID.to_owned(),
                                       GENERIC_ACCESS_SERVICE_UUID.to_owned(),
                                       HEART_RATE_SERVICE_UUID.to_owned(),
-                                      HUMAN_INTERFACE_DEVICE_SERVICE_UUID.to_owned()]));
+                                      HUMAN_INTERFACE_DEVICE_SERVICE_UUID.to_owned()])?;
 
-    let blocklist_test_service = try!(create_service(&connectable_device, BLOCKLIST_TEST_SERVICE_UUID.to_owned()));
+    let blocklist_test_service = create_service(&connectable_device, BLOCKLIST_TEST_SERVICE_UUID.to_owned())?;
 
     let blocklist_exclude_reads_characteristic =
-        try!(create_characteristic(&blocklist_test_service,
-                                   BLOCKLIST_EXCLUDE_READS_CHARACTERISTIC_UUID.to_owned()));
-    try!(blocklist_exclude_reads_characteristic
-         .set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()]));
+        create_characteristic(&blocklist_test_service,
+                                   BLOCKLIST_EXCLUDE_READS_CHARACTERISTIC_UUID.to_owned())?;
+    blocklist_exclude_reads_characteristic
+         .set_flags(vec![READ_FLAG.to_string(), WRITE_FLAG.to_string()])?;
 
     let _blocklist_exclude_reads_descriptor =
-        try!(create_descriptor_with_value(&blocklist_exclude_reads_characteristic,
+        create_descriptor_with_value(&blocklist_exclude_reads_characteristic,
                                           BLOCKLIST_EXCLUDE_READS_DESCRIPTOR_UUID.to_owned(),
-                                          vec![54; 3]));
+                                          vec![54; 3])?;
 
     let _blocklist_descriptor =
-        try!(create_descriptor_with_value(&blocklist_exclude_reads_characteristic,
+        create_descriptor_with_value(&blocklist_exclude_reads_characteristic,
                                           BLOCKLIST_DESCRIPTOR_UUID.to_owned(),
-                                          vec![54; 3]));
+                                          vec![54; 3])?;
 
-    let device_information_service = try!(create_service(&connectable_device, DEVICE_INFORMATION_UUID.to_owned()));
+    let device_information_service = create_service(&connectable_device, DEVICE_INFORMATION_UUID.to_owned())?;
 
     let _serial_number_string_characteristic =
-        try!(create_characteristic(&device_information_service, SERIAL_NUMBER_STRING_UUID.to_owned()));
+        create_characteristic(&device_information_service, SERIAL_NUMBER_STRING_UUID.to_owned())?;
 
-    let _generic_access_service = try!(create_generic_access_service(&connectable_device, false));
+    let _generic_access_service = create_generic_access_service(&connectable_device, false)?;
 
-    let _heart_rate_service = try!(create_heart_rate_service(&connectable_device, false));
+    let _heart_rate_service = create_heart_rate_service(&connectable_device, false)?;
 
     let _human_interface_device_service =
-        try!(create_service(&connectable_device, HUMAN_INTERFACE_DEVICE_SERVICE_UUID.to_owned()));
+        create_service(&connectable_device, HUMAN_INTERFACE_DEVICE_SERVICE_UUID.to_owned())?;
     Ok(())
 }
 
 fn create_glucose_heart_rate_devices(adapter: &BluetoothAdapter) -> Result<(), Box<Error>> {
-    let glucose_devie = try!(create_device_with_uuids(adapter,
+    let glucose_devie = create_device_with_uuids(adapter,
                                                       GLUCOSE_DEVICE_NAME.to_owned(),
                                                       GLUCOSE_DEVICE_ADDRESS.to_owned(),
                                                       vec![GLUCOSE_SERVICE_UUID.to_owned(),
-                                                           TX_POWER_SERVICE_UUID.to_owned()]));
+                                                           TX_POWER_SERVICE_UUID.to_owned()])?;
 
-    let heart_rate_device_empty = try!(create_heart_rate_device(adapter, true));
+    let heart_rate_device_empty = create_heart_rate_device(adapter, true)?;
 
     let mut manufacturer_dta = HashMap::new();
     manufacturer_dta.insert(17, vec![1, 2, 3]);
-    try!(glucose_devie.set_manufacturer_data(manufacturer_dta));
+    glucose_devie.set_manufacturer_data(manufacturer_dta)?;
 
     let mut service_data = HashMap::new();
     service_data.insert(GLUCOSE_SERVICE_UUID.to_owned(), vec![1, 2, 3]);
-    try!(glucose_devie.set_service_data(service_data));
+    glucose_devie.set_service_data(service_data)?;
 
     service_data = HashMap::new();
     service_data.insert(HEART_RATE_SERVICE_UUID.to_owned(), vec![1, 2, 3]);
-    try!(heart_rate_device_empty.set_service_data(service_data));
+    heart_rate_device_empty.set_service_data(service_data)?;
     Ok(())
 }
 
 pub fn test(manager: &mut BluetoothManager, data_set_name: String) -> Result<(), Box<Error>> {
     let may_existing_adapter = manager.get_or_create_adapter();
     let adapter = match may_existing_adapter.as_ref() {
         Some(adapter) => adapter,
         None => return Err(Box::from(ADAPTER_ERROR.to_string())),
     };
     match data_set_name.as_str() {
         NOT_PRESENT_ADAPTER => {
-            try!(set_adapter(adapter, NOT_PRESENT_ADAPTER.to_owned()));
-            try!(adapter.set_present(false));
+            set_adapter(adapter, NOT_PRESENT_ADAPTER.to_owned())?;
+            adapter.set_present(false)?;
         },
         NOT_POWERED_ADAPTER => {
-            try!(set_adapter(adapter, NOT_POWERED_ADAPTER.to_owned()));
-            try!(adapter.set_powered(false));
+            set_adapter(adapter, NOT_POWERED_ADAPTER.to_owned())?;
+            adapter.set_powered(false)?;
         },
         EMPTY_ADAPTER => {
-            try!(set_adapter(adapter, EMPTY_ADAPTER.to_owned()));
+            set_adapter(adapter, EMPTY_ADAPTER.to_owned())?;
         },
         GLUCOSE_HEART_RATE_ADAPTER => {
-            try!(set_adapter(adapter, GLUCOSE_HEART_RATE_ADAPTER.to_owned()));
-            let _ = try!(create_glucose_heart_rate_devices(adapter));
+            set_adapter(adapter, GLUCOSE_HEART_RATE_ADAPTER.to_owned())?;
+            let _ = create_glucose_heart_rate_devices(adapter)?;
         },
         UNICODE_DEVICE_ADAPTER => {
-            try!(set_adapter(adapter, UNICODE_DEVICE_ADAPTER.to_owned()));
+            set_adapter(adapter, UNICODE_DEVICE_ADAPTER.to_owned())?;
 
-            let _unicode_device = try!(create_device(adapter,
+            let _unicode_device = create_device(adapter,
                                                      UNICODE_DEVICE_NAME.to_owned(),
-                                                     UNICODE_DEVICE_ADDRESS.to_owned()));
+                                                     UNICODE_DEVICE_ADDRESS.to_owned())?;
         },
         MISSING_SERVICE_HEART_RATE_ADAPTER => {
-            try!(set_adapter(adapter, MISSING_SERVICE_HEART_RATE_ADAPTER.to_owned()));
+            set_adapter(adapter, MISSING_SERVICE_HEART_RATE_ADAPTER.to_owned())?;
 
-            let _heart_rate_device_empty = try!(create_heart_rate_device(adapter, true));
+            let _heart_rate_device_empty = create_heart_rate_device(adapter, true)?;
         },
         MISSING_CHARACTERISTIC_HEART_RATE_ADAPTER => {
-            try!(set_adapter(adapter, MISSING_CHARACTERISTIC_HEART_RATE_ADAPTER.to_owned()));
+            set_adapter(adapter, MISSING_CHARACTERISTIC_HEART_RATE_ADAPTER.to_owned())?;
 
-            let _ = try!(create_missing_characterisitc_heart_rate_device(adapter));
+            let _ = create_missing_characterisitc_heart_rate_device(adapter)?;
         },
         MISSING_DESCRIPTOR_HEART_RATE_ADAPTER => {
-            try!(set_adapter(adapter, MISSING_DESCRIPTOR_HEART_RATE_ADAPTER.to_owned()));
+            set_adapter(adapter, MISSING_DESCRIPTOR_HEART_RATE_ADAPTER.to_owned())?;
 
-            let _ = try!(create_missing_descriptor_heart_rate_device(adapter));
+            let _ = create_missing_descriptor_heart_rate_device(adapter)?;
         },
         HEART_RATE_ADAPTER => {
-            try!(set_adapter(adapter, HEART_RATE_ADAPTER.to_owned()));
+            set_adapter(adapter, HEART_RATE_ADAPTER.to_owned())?;
 
-            let _heart_rate_device = try!(create_heart_rate_device(adapter, false));
+            let _heart_rate_device = create_heart_rate_device(adapter, false)?;
         },
         EMPTY_NAME_HEART_RATE_ADAPTER => {
-            try!(set_adapter(adapter, EMPTY_NAME_HEART_RATE_ADAPTER.to_owned()));
+            set_adapter(adapter, EMPTY_NAME_HEART_RATE_ADAPTER.to_owned())?;
 
-            let heart_rate_device = try!(create_heart_rate_device(adapter, false));
-            try!(heart_rate_device.set_name(Some(EMPTY_DEVICE_NAME.to_owned())));
+            let heart_rate_device = create_heart_rate_device(adapter, false)?;
+            heart_rate_device.set_name(Some(EMPTY_DEVICE_NAME.to_owned()))?;
         },
         NO_NAME_HEART_RATE_ADAPTER => {
-            try!(set_adapter(adapter, NO_NAME_HEART_RATE_ADAPTER.to_owned()));
+            set_adapter(adapter, NO_NAME_HEART_RATE_ADAPTER.to_owned())?;
 
-            let heart_rate_device = try!(create_heart_rate_device(adapter, false));
-            try!(heart_rate_device.set_name(None));
+            let heart_rate_device = create_heart_rate_device(adapter, false)?;
+            heart_rate_device.set_name(None)?;
         },
         TWO_HEART_RATE_SERVICES_ADAPTER => {
-            try!(set_adapter(adapter, TWO_HEART_RATE_SERVICES_ADAPTER.to_owned()));
+            set_adapter(adapter, TWO_HEART_RATE_SERVICES_ADAPTER.to_owned())?;
 
-            let _ = try!(create_two_heart_rate_services_device(adapter));
+            let _ = create_two_heart_rate_services_device(adapter)?;
         },
         BLOCKLIST_TEST_ADAPTER => {
-            try!(set_adapter(adapter, BLOCKLIST_TEST_ADAPTER.to_owned()));
+            set_adapter(adapter, BLOCKLIST_TEST_ADAPTER.to_owned())?;
 
-            let _ = try!(create_blocklisted_device(adapter));
+            let _ = create_blocklisted_device(adapter)?;
         },
         _ => return Err(Box::from(WRONG_DATA_SET_ERROR.to_string())),
     }
     return Ok(());
 }
--- a/servo/components/canvas/webgl_paint_thread.rs
+++ b/servo/components/canvas/webgl_paint_thread.rs
@@ -51,21 +51,21 @@ impl GLContextWrapper {
                 ctx.borrow_limits().clone()
             }
         }
     }
 
     fn resize(&mut self, size: Size2D<i32>) -> Result<Size2D<i32>, &'static str> {
         match *self {
             GLContextWrapper::Native(ref mut ctx) => {
-                try!(ctx.resize(size));
+                ctx.resize(size)?;
                 Ok(ctx.borrow_draw_buffer().unwrap().size())
             }
             GLContextWrapper::OSMesa(ref mut ctx) => {
-                try!(ctx.resize(size));
+                ctx.resize(size)?;
                 Ok(ctx.borrow_draw_buffer().unwrap().size())
             }
         }
     }
 
     fn gl(&self) -> &gl::Gl {
         match *self {
             GLContextWrapper::Native(ref ctx) => {
@@ -110,17 +110,17 @@ pub struct WebGLPaintThread {
     data: WebGLPaintTaskData,
 }
 
 fn create_readback_painter(size: Size2D<i32>,
                            attrs: GLContextAttributes,
                            webrender_api: webrender_traits::RenderApi,
                            gl_type: gl::GlType)
     -> Result<(WebGLPaintThread, GLLimits), String> {
-    let context = try!(GLContextWrapper::new(size, attrs, gl_type));
+    let context = GLContextWrapper::new(size, attrs, gl_type)?;
     let limits = context.get_limits();
     let painter = WebGLPaintThread {
         size: size,
         data: WebGLPaintTaskData::Readback(context, webrender_api, None)
     };
 
     Ok((painter, limits))
 }
@@ -289,17 +289,17 @@ impl WebGLPaintThread {
     }
 
     #[allow(unsafe_code)]
     fn recreate(&mut self, size: Size2D<i32>) -> Result<(), &'static str> {
         match self.data {
             WebGLPaintTaskData::Readback(ref mut context, ref webrender_api, ref mut image_key) => {
                 if size.width > self.size.width ||
                    size.height > self.size.height {
-                    self.size = try!(context.resize(size));
+                    self.size = context.resize(size)?;
                 } else {
                     self.size = size;
                     context.gl().scissor(0, 0, size.width, size.height);
                 }
                 // Webrender doesn't let images change size, so we clear the webrender image key.
                 if let Some(image_key) = image_key.take() {
                     webrender_api.delete_image(image_key);
                 }
--- a/servo/components/config/prefs.rs
+++ b/servo/components/config/prefs.rs
@@ -108,17 +108,17 @@ impl Pref {
         Pref::NoDefault(Arc::new(value))
     }
 
     fn new_default(value: PrefValue) -> Pref {
         Pref::WithDefault(Arc::new(value), None)
     }
 
     fn from_json(data: Json) -> Result<Pref, ()> {
-        let value = try!(PrefValue::from_json(data));
+        let value = PrefValue::from_json(data)?;
         Ok(Pref::new_default(value))
     }
 
     pub fn value(&self) -> &Arc<PrefValue> {
         match *self {
             Pref::NoDefault(ref x) => x,
             Pref::WithDefault(ref default, ref override_value) => {
                 match *override_value {
@@ -153,20 +153,20 @@ pub fn default_prefs() -> Preferences {
     let prefs = Preferences(Arc::new(RwLock::new(HashMap::new())));
     prefs.set("layout.threads", PrefValue::Number(
         max(num_cpus::get() * 3 / 4, 1) as f64));
     prefs
 }
 
 pub fn read_prefs_from_file<T>(mut file: T)
     -> Result<HashMap<String, Pref>, ()> where T: Read {
-    let json = try!(Json::from_reader(&mut file).or_else(|e| {
+    let json = Json::from_reader(&mut file).or_else(|e| {
         println!("Ignoring invalid JSON in preferences: {:?}.", e);
         Err(())
-    }));
+    })?;
 
     let mut prefs = HashMap::new();
     if let Json::Object(obj) = json {
         for (name, value) in obj.into_iter() {
             match Pref::from_json(value) {
                 Ok(x) => {
                     prefs.insert(name, x);
                 },
@@ -200,24 +200,24 @@ fn init_user_prefs(path: &mut PathBuf) {
         }
     } else {
     writeln!(&mut stderr(), "Error opening prefs.json from config directory")
         .expect("failed printing to stderr");
     }
 }
 
 fn read_prefs() -> Result<HashMap<String, Pref>, ()> {
-    let mut path = try!(resources_dir_path().map_err(|_| ()));
+    let mut path = resources_dir_path().map_err(|_| ())?;
     path.push("prefs.json");
 
-    let file = try!(File::open(path).or_else(|e| {
+    let file = File::open(path).or_else(|e| {
         writeln!(&mut stderr(), "Error opening preferences: {:?}.", e)
             .expect("failed printing to stderr");
         Err(())
-    }));
+    })?;
 
     read_prefs_from_file(file)
 }
 
 pub struct Preferences(Arc<RwLock<HashMap<String, Pref>>>);
 
 impl Preferences {
     pub fn get(&self, name: &str) -> Arc<PrefValue> {
--- a/servo/components/config/resource_files.rs
+++ b/servo/components/config/resource_files.rs
@@ -39,19 +39,19 @@ pub fn resources_dir_path() -> io::Resul
 
     if let Some(ref path) = *dir {
         return Ok(PathBuf::from(path));
     }
 
     // FIXME: Find a way to not rely on the executable being
     // under `<servo source>[/$target_triple]/target/debug`
     // or `<servo source>[/$target_triple]/target/release`.
-    let mut path = try!(env::current_exe());
+    let mut path = env::current_exe()?;
     // Follow symlink
-    path = try!(path.canonicalize());
+    path = path.canonicalize()?;
 
     while path.pop() {
         path.push("resources");
         if path.is_dir() {
             break;
         }
         path.pop();
         // Check for Resources on mac when using a case sensitive filesystem.
@@ -61,15 +61,15 @@ pub fn resources_dir_path() -> io::Resul
         }
         path.pop();
     }
     *dir = Some(path.to_str().unwrap().to_owned());
     Ok(path)
 }
 
 pub fn read_resource_file<P: AsRef<Path>>(relative_path: P) -> io::Result<Vec<u8>> {
-    let mut path = try!(resources_dir_path());
+    let mut path = resources_dir_path()?;
     path.push(relative_path);
-    let mut file = try!(File::open(&path));
+    let mut file = File::open(&path)?;
     let mut data = Vec::new();
-    try!(file.read_to_end(&mut data));
+    file.read_to_end(&mut data)?;
     Ok(data)
 }
--- a/servo/components/constellation/pipeline.rs
+++ b/servo/components/constellation/pipeline.rs
@@ -268,17 +268,17 @@ impl Pipeline {
                     webrender_api_sender: state.webrender_api_sender,
                     webvr_thread: state.webvr_thread,
                 };
 
                 // Spawn the child process.
                 //
                 // Yes, that's all there is to it!
                 if opts::multiprocess() {
-                    let _ = try!(unprivileged_pipeline_content.spawn_multiprocess());
+                    let _ = unprivileged_pipeline_content.spawn_multiprocess()?;
                 } else {
                     unprivileged_pipeline_content.start_all::<Message, LTF, STF>(false);
                 }
 
                 EventLoop::new(script_chan)
             }
         };
 
@@ -558,17 +558,17 @@ impl UnprivilegedPipelineContent {
             let path_to_self = env::current_exe()
                 .expect("Failed to get current executor.");
             let mut child_process = process::Command::new(path_to_self);
             self.setup_common(&mut child_process, token);
             let _ = child_process.spawn().expect("Failed to start unsandboxed child process!");
         }
 
         let (_receiver, sender) = server.accept().expect("Server failed to accept.");
-        try!(sender.send(self));
+        sender.send(self)?;
 
         Ok(())
     }
 
     #[cfg(target_os = "windows")]
     pub fn spawn_multiprocess(self) -> Result<(), Error> {
         error!("Multiprocess is not supported on Windows.");
         process::exit(1);
--- a/servo/components/devtools/actor.rs
+++ b/servo/components/devtools/actor.rs
@@ -154,17 +154,17 @@ impl ActorRegistry {
                           stream: &mut TcpStream)
                           -> Result<(), ()> {
         let to = msg.get("to").unwrap().as_str().unwrap();
 
         match self.actors.get(to) {
             None => debug!("message received for unknown actor \"{}\"", to),
             Some(actor) => {
                 let msg_type = msg.get("type").unwrap().as_str().unwrap();
-                if try!(actor.handle_message(self, msg_type, msg, stream))
+                if actor.handle_message(self, msg_type, msg, stream)?
                         != ActorMessageStatus::Processed {
                     debug!("unexpected message type \"{}\" found for actor \"{}\"",
                              msg_type, to);
                 }
             }
         }
         let new_actors = replace(&mut *self.new_actors.borrow_mut(), vec!());
         for actor in new_actors.into_iter() {
--- a/servo/components/devtools/actors/console.rs
+++ b/servo/components/devtools/actors/console.rs
@@ -110,17 +110,17 @@ impl Actor for ConsoleActor {
                         "PageError" => message_types.insert(PAGE_ERROR),
                         "ConsoleAPI" => message_types.insert(CONSOLE_API),
                         s => debug!("unrecognized message type requested: \"{}\"", s),
                     };
                 };
                 let (chan, port) = ipc::channel().unwrap();
                 self.script_chan.send(DevtoolScriptControlMsg::GetCachedMessages(
                     self.pipeline, message_types, chan)).unwrap();
-                let messages = try!(port.recv().map_err(|_| ())).into_iter().map(|message| {
+                let messages = port.recv().map_err(|_| ())?.into_iter().map(|message| {
                     let json_string = message.encode().unwrap();
                     let json = serde_json::from_str::<Value>(&json_string).unwrap();
                     json.as_object().unwrap().to_owned()
                 }).collect();
 
                 let msg = GetCachedMessagesReply {
                     from: self.name(),
                     messages: messages,
@@ -174,17 +174,17 @@ impl Actor for ConsoleActor {
 
             "evaluateJS" => {
                 let input = msg.get("text").unwrap().as_str().unwrap().to_owned();
                 let (chan, port) = ipc::channel().unwrap();
                 self.script_chan.send(DevtoolScriptControlMsg::EvaluateJS(
                     self.pipeline, input.clone(), chan)).unwrap();
 
                 //TODO: extract conversion into protocol module or some other useful place
-                let result = match try!(port.recv().map_err(|_| ())) {
+                let result = match port.recv().map_err(|_| ())? {
                     VoidValue => {
                         let mut m = Map::new();
                         m.insert("type".to_owned(), Value::String("undefined".to_owned()));
                         Value::Object(m)
                     }
                     NullValue => {
                         let mut m = Map::new();
                         m.insert("type".to_owned(), Value::String("null".to_owned()));
--- a/servo/components/devtools/actors/inspector.rs
+++ b/servo/components/devtools/actors/inspector.rs
@@ -284,17 +284,17 @@ impl Actor for WalkerActor {
                 };
                 stream.write_json_packet(&msg);
                 ActorMessageStatus::Processed
             }
 
             "documentElement" => {
                 let (tx, rx) = ipc::channel().unwrap();
                 self.script_chan.send(GetDocumentElement(self.pipeline, tx)).unwrap();
-                let doc_elem_info = try!(rx.recv().unwrap().ok_or(()));
+                let doc_elem_info = rx.recv().unwrap().ok_or(())?;
                 let node = doc_elem_info.encode(registry, true, self.script_chan.clone(), self.pipeline);
 
                 let msg = DocumentElementReply {
                     from: self.name(),
                     node: node,
                 };
                 stream.write_json_packet(&msg);
                 ActorMessageStatus::Processed
@@ -310,17 +310,17 @@ impl Actor for WalkerActor {
 
             "children" => {
                 let target = msg.get("node").unwrap().as_str().unwrap();
                 let (tx, rx) = ipc::channel().unwrap();
                 self.script_chan.send(GetChildren(self.pipeline,
                                                   registry.actor_to_script(target.to_owned()),
                                                   tx))
                                 .unwrap();
-                let children = try!(rx.recv().unwrap().ok_or(()));
+                let children = rx.recv().unwrap().ok_or(())?;
 
                 let msg = ChildrenReply {
                     hasFirst: true,
                     hasLast: true,
                     nodes: children.into_iter().map(|child| {
                         child.encode(registry, true, self.script_chan.clone(), self.pipeline)
                     }).collect(),
                     from: self.name(),
@@ -484,17 +484,17 @@ impl Actor for PageStyleActor {
                                       tx))
                                 .unwrap();
                 let ComputedNodeLayout {
                     display, position, zIndex, boxSizing,
                     autoMargins, marginTop, marginRight, marginBottom, marginLeft,
                     borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,
                     paddingTop, paddingRight, paddingBottom, paddingLeft,
                     width, height,
-                } = try!(rx.recv().unwrap().ok_or(()));
+                } = rx.recv().unwrap().ok_or(())?;
 
                 let auto_margins = msg.get("autoMargins")
                     .and_then(&Value::as_bool).unwrap_or(false);
 
                 // http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/styles.js
                 let msg = GetLayoutReply {
                     from: self.name(),
                     display: display,
@@ -558,17 +558,17 @@ impl Actor for InspectorActor {
                     };
                     let mut walker_name = self.walker.borrow_mut();
                     *walker_name = Some(walker.name());
                     registry.register_later(box walker);
                 }
 
                 let (tx, rx) = ipc::channel().unwrap();
                 self.script_chan.send(GetRootNode(self.pipeline, tx)).unwrap();
-                let root_info = try!(rx.recv().unwrap().ok_or(()));
+                let root_info = rx.recv().unwrap().ok_or(())?;
 
                 let node = root_info.encode(registry, false, self.script_chan.clone(), self.pipeline);
 
                 let msg = GetWalkerReply {
                     from: self.name(),
                     walker: WalkerMsg {
                         actor: self.walker.borrow().clone().unwrap(),
                         root: node,
--- a/servo/components/gfx/font_context.rs
+++ b/servo/components/gfx/font_context.rs
@@ -83,19 +83,19 @@ impl FontContext {
         // TODO: (Bug #3463): Currently we only support fake small-caps
         // painting. We should also support true small-caps (where the
         // font supports it) in the future.
         let actual_pt_size = match variant {
             font_variant_caps::T::small_caps => pt_size.scale_by(SMALL_CAPS_SCALE_FACTOR),
             font_variant_caps::T::normal => pt_size,
         };
 
-        let handle = try!(FontHandle::new_from_template(&self.platform_handle,
+        let handle = FontHandle::new_from_template(&self.platform_handle,
                                                         template,
-                                                        Some(actual_pt_size)));
+                                                        Some(actual_pt_size))?;
 
         Ok(Font::new(handle, variant, descriptor, pt_size, actual_pt_size, font_key))
     }
 
     fn expire_font_caches_if_necessary(&mut self) {
         let current_epoch = FONT_CACHE_EPOCH.load(Ordering::SeqCst);
         if current_epoch == self.epoch {
             return
--- a/servo/components/gfx/font_template.rs
+++ b/servo/components/gfx/font_template.rs
@@ -75,17 +75,17 @@ impl Debug for FontTemplate {
 }
 
 /// Holds all of the template information for a font that
 /// is common, regardless of the number of instances of
 /// this font handle per thread.
 impl FontTemplate {
     pub fn new(identifier: Atom, maybe_bytes: Option<Vec<u8>>) -> Result<FontTemplate, IoError> {
         let maybe_data = match maybe_bytes {
-            Some(_) => Some(try!(FontTemplateData::new(identifier.clone(), maybe_bytes))),
+            Some(_) => Some(FontTemplateData::new(identifier.clone(), maybe_bytes)?),
             None => None,
         };
 
         let maybe_strong_ref = match maybe_data {
             Some(data) => Some(Arc::new(data)),
             None => None,
         };
 
@@ -162,22 +162,22 @@ impl FontTemplate {
         }
     }
 
     fn instantiate(&mut self, font_context: &FontContextHandle) -> Result<(), ()> {
         if !self.is_valid {
             return Err(())
         }
 
-        let data = try!(self.data().map_err(|_| ()));
+        let data = self.data().map_err(|_| ())?;
         let handle: Result<FontHandle, ()> = FontHandleMethods::new_from_template(font_context,
                                                                                   data,
                                                                                   None);
         self.is_valid = handle.is_ok();
-        let handle = try!(handle);
+        let handle = handle?;
         self.descriptor = Some(FontTemplateDescriptor::new(handle.boldness(),
                                                            handle.stretchiness(),
                                                            handle.is_italic()));
         Ok(())
     }
 
     /// Get the data for creating a font.
     pub fn get(&mut self) -> Option<Arc<FontTemplateData>> {
@@ -197,13 +197,13 @@ impl FontTemplate {
             None => None,
         };
 
         if let Some(data) = maybe_data {
             return Ok(data)
         }
 
         assert!(self.strong_ref.is_none());
-        let template_data = Arc::new(try!(FontTemplateData::new(self.identifier.clone(), None)));
+        let template_data = Arc::new(FontTemplateData::new(self.identifier.clone(), None)?);
         self.weak_ref = Some(Arc::downgrade(&template_data));
         Ok(template_data)
     }
 }
--- a/servo/components/gfx/platform/freetype/android/font_list.rs
+++ b/servo/components/gfx/platform/freetype/android/font_list.rs
@@ -230,19 +230,19 @@ impl FontList {
     }
 
     fn find_alias(&self, name: &str) -> Option<&FontAlias>{
         self.aliases.iter().find(|f| f.from == name)
     }
 
 
     fn load_file(path: &str) -> Result<String, io::Error> {
-        let mut file = try!(File::open(path));
+        let mut file = File::open(path)?;
         let mut content = String::new();
-        try!(file.read_to_string(&mut content));
+        file.read_to_string(&mut content)?;
 
         Ok(content)
     }
 
     // Parse family and font file names
     // Example:
     // <family name="sans-serif">
     //     <font weight="100" style="normal">Roboto-Thin.ttf</font>
--- a/servo/components/gfx/platform/freetype/font.rs
+++ b/servo/components/gfx/platform/freetype/font.rs
@@ -94,17 +94,17 @@ impl FontHandleMethods for FontHandle {
                 let face_index = 0 as FT_Long;
                 let result = FT_New_Memory_Face(lib, buffer.as_ptr(), buffer.len() as FT_Long,
                                                 face_index, &mut face);
 
                 if !result.succeeded() || face.is_null() {
                     return Err(());
                 }
                 if let Some(s) = pt_size {
-                    try!(FontHandle::set_char_size(face, s).or(Err(())))
+                    FontHandle::set_char_size(face, s).or(Err(()))?
                 }
                 Ok(face)
             }
         }
     }
     fn template(&self) -> Arc<FontTemplateData> {
         self.font_data.clone()
     }
--- a/servo/components/gfx/platform/freetype/font_template.rs
+++ b/servo/components/gfx/platform/freetype/font_template.rs
@@ -20,17 +20,17 @@ pub struct FontTemplateData {
 impl FontTemplateData {
     pub fn new(identifier: Atom, font_data: Option<Vec<u8>>) -> Result<FontTemplateData, Error> {
         let bytes = match font_data {
             Some(bytes) => {
                 bytes
             },
             None => {
                 // TODO: Handle file load failure!
-                let mut file = try!(File::open(&*identifier));
+                let mut file = File::open(&*identifier)?;
                 let mut buffer = vec![];
                 file.read_to_end(&mut buffer).unwrap();
                 buffer
             },
         };
 
         Ok(FontTemplateData {
             bytes: bytes,
--- a/servo/components/gfx/platform/windows/font.rs
+++ b/servo/components/gfx/platform/windows/font.rs
@@ -42,17 +42,17 @@ impl FontTableMethods for FontTable {
     }
 }
 
 fn make_tag(tag_bytes: &[u8]) -> FontTableTag {
     assert_eq!(tag_bytes.len(), 4);
     unsafe { *(tag_bytes.as_ptr() as *const FontTableTag) }
 }
 
-macro_rules! try_lossy(($result:expr) => (try!($result.map_err(|_| (())))));
+macro_rules! try_lossy(($result:expr) => ($result.map_err(|_| (()))?));
 
 // Given a set of records, figure out the string indices for the family and face
 // names.  We want name_id 1 and 2, and we need to use platform_id == 1 and
 // language_id == 0 to avoid limitations in the truetype crate.  We *could* just
 // do our own parsing here, and use the offset/length data and pull the values out
 // ourselves.
 fn get_family_face_indices(records: &[truetype::naming_table::Record]) -> Option<(usize, usize)> {
     let mut family_name_index = None;
@@ -257,22 +257,22 @@ impl FontHandleMethods for FontHandle {
         let (info, face) = if let Some(ref raw_font) = template.bytes {
             let font_file = FontFile::new_from_data(&raw_font);
             if font_file.is_none() {
                 // failed to load raw font
                 return Err(());
             }
 
             let face = font_file.unwrap().create_face(0, dwrote::DWRITE_FONT_SIMULATIONS_NONE);
-            let info = try!(FontInfo::new_from_face(&face));
+            let info = FontInfo::new_from_face(&face)?;
             (info, face)
         } else {
             let font = font_from_atom(&template.identifier);
             let face = font.create_font_face();
-            let info = try!(FontInfo::new_from_font(&font));
+            let info = FontInfo::new_from_font(&font)?;
             (info, face)
         };
 
         let pt_size = pt_size.unwrap_or(au_from_pt(12.));
         let du_per_em = face.metrics().designUnitsPerEm as f32;
 
         let em_size = pt_size.to_f32_px() / 16.;
         let design_units_per_pixel = du_per_em / 16.;
--- a/servo/components/gfx/text/glyph.rs
+++ b/servo/components/gfx/text/glyph.rs
@@ -660,37 +660,37 @@ impl<'a> GlyphStore {
             }
         }
         spaces
     }
 }
 
 impl fmt::Debug for GlyphStore {
     fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(formatter, "GlyphStore:\n"));
+        write!(formatter, "GlyphStore:\n")?;
         let mut detailed_buffer = self.detail_store.detail_buffer.iter();
         for entry in self.entry_buffer.iter() {
             if entry.is_simple() {
-                try!(write!(formatter,
+                write!(formatter,
                             "  simple id={:?} advance={:?}\n",
                             entry.id(),
-                            entry.advance()));
+                            entry.advance())?;
                 continue
             }
             if entry.is_initial() {
                 continue
             }
-            try!(write!(formatter, "  complex..."));
+            write!(formatter, "  complex...")?;
             if detailed_buffer.next().is_none() {
                 continue
             }
-            try!(write!(formatter,
+            write!(formatter,
                         "  detailed id={:?} advance={:?}\n",
                         entry.id(),
-                        entry.advance()));
+                        entry.advance())?;
         }
         Ok(())
     }
 }
 
 /// An iterator over the glyphs in a byte range in a `GlyphStore`.
 pub struct GlyphIterator<'a> {
     store: &'a GlyphStore,
--- a/servo/components/layout/floats.rs
+++ b/servo/components/layout/floats.rs
@@ -73,19 +73,19 @@ impl FloatList {
     /// not to be any floats.
     fn is_present(&self) -> bool {
         self.floats.len() > 0
     }
 }
 
 impl fmt::Debug for FloatList {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "max_block_start={:?} floats={}", self.max_block_start, self.floats.len()));
+        write!(f, "max_block_start={:?} floats={}", self.max_block_start, self.floats.len())?;
         for float in self.floats.iter() {
-            try!(write!(f, " {:?}", float));
+            write!(f, " {:?}", float)?;
         }
         Ok(())
     }
 }
 
 /// All the information necessary to place a float.
 pub struct PlacementInfo {
     /// The dimensions of the float.
--- a/servo/components/layout/flow.rs
+++ b/servo/components/layout/flow.rs
@@ -1006,24 +1006,22 @@ impl fmt::Debug for BaseFlow {
                child_count_string,
                absolute_descendants_string,
                damage_string)
     }
 }
 
 impl Serialize for BaseFlow {
     fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
-        let mut serializer = try!(serializer.serialize_struct("base", 5));
-        try!(serializer.serialize_field("id", &self.debug_id()));
-        try!(serializer.serialize_field("stacking_relative_position",
-                                        &self.stacking_relative_position));
-        try!(serializer.serialize_field("intrinsic_inline_sizes",
-                                        &self.intrinsic_inline_sizes));
-        try!(serializer.serialize_field("position", &self.position));
-        try!(serializer.serialize_field("children", &self.children));
+        let mut serializer = serializer.serialize_struct("base", 5)?;
+        serializer.serialize_field("id", &self.debug_id())?;
+        serializer.serialize_field("stacking_relative_position", &self.stacking_relative_position)?;
+        serializer.serialize_field("intrinsic_inline_sizes", &self.intrinsic_inline_sizes)?;
+        serializer.serialize_field("position", &self.position)?;
+        serializer.serialize_field("children", &self.children)?;
         serializer.end()
     }
 }
 
 /// Whether a base flow should be forced to be nonfloated. This can affect e.g. `TableFlow`, which
 /// is never floated because the table wrapper flow is the floated one.
 #[derive(Clone, PartialEq)]
 pub enum ForceNonfloatedFlag {
--- a/servo/components/layout/flow_list.rs
+++ b/servo/components/layout/flow_list.rs
@@ -19,17 +19,17 @@ use std::sync::Arc;
 /// remote code execution! In general, do not add new methods to this file (e.g. new ways of
 /// iterating over flows) unless you are *very* sure of what you are doing.
 pub struct FlowList {
     flows: LinkedList<FlowRef>,
 }
 
 impl Serialize for FlowList {
     fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
-        let mut serializer = try!(serializer.serialize_seq(Some(self.len())));
+        let mut serializer = serializer.serialize_seq(Some(self.len()))?;
         for f in self.iter() {
             let mut flow_val = Map::new();
             flow_val.insert("class".to_owned(), to_value(f.class()).unwrap());
             let data = match f.class() {
                 FlowClass::Block => to_value(f.as_block()).unwrap(),
                 FlowClass::Inline => to_value(f.as_inline()).unwrap(),
                 FlowClass::Table => to_value(f.as_table()).unwrap(),
                 FlowClass::TableWrapper => to_value(f.as_table_wrapper()).unwrap(),
@@ -38,17 +38,17 @@ impl Serialize for FlowList {
                 FlowClass::TableCell => to_value(f.as_table_cell()).unwrap(),
                 FlowClass::Flex => to_value(f.as_flex()).unwrap(),
                 FlowClass::ListItem | FlowClass::TableColGroup | FlowClass::TableCaption |
                 FlowClass::Multicol | FlowClass::MulticolColumn => {
                     Value::Null // Not implemented yet
                 }
             };
             flow_val.insert("data".to_owned(), data);
-            try!(serializer.serialize_element(&flow_val));
+            serializer.serialize_element(&flow_val)?;
         }
         serializer.end()
     }
 }
 
 pub struct MutFlowListIterator<'a> {
     it: linked_list::IterMut<'a, FlowRef>,
 }
--- a/servo/components/layout/fragment.rs
+++ b/servo/components/layout/fragment.rs
@@ -138,20 +138,20 @@ pub struct Fragment {
     /// The ID of the StackingContext that contains this fragment. This is initialized
     /// to 0, but it assigned during the collect_stacking_contexts phase of display
     /// list construction.
     pub stacking_context_id: StackingContextId,
 }
 
 impl Serialize for Fragment {
     fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
-        let mut serializer = try!(serializer.serialize_struct("fragment", 3));
-        try!(serializer.serialize_field("id", &self.debug_id));
-        try!(serializer.serialize_field("border_box", &self.border_box));
-        try!(serializer.serialize_field("margin", &self.margin));
+        let mut serializer = serializer.serialize_struct("fragment", 3)?;
+        serializer.serialize_field("id", &self.debug_id)?;
+        serializer.serialize_field("border_box", &self.border_box)?;
+        serializer.serialize_field("margin", &self.margin)?;
         serializer.end()
     }
 }
 
 /// Info specific to the kind of fragment.
 ///
 /// Keep this enum small. As in, no more than one word. Or pcwalton will yell at you.
 #[derive(Clone)]
--- a/servo/components/layout_thread/lib.rs
+++ b/servo/components/layout_thread/lib.rs
@@ -1657,17 +1657,17 @@ fn get_root_flow_background_color(flow: 
                   .style
                   .resolve_color(kid_block_flow.fragment.style.get_background().background_color)
                   .to_gfx_color()
 }
 
 fn get_ua_stylesheets() -> Result<UserAgentStylesheets, &'static str> {
     fn parse_ua_stylesheet(shared_lock: &SharedRwLock, filename: &'static str)
                            -> Result<Stylesheet, &'static str> {
-        let res = try!(read_resource_file(filename).map_err(|_| filename));
+        let res = read_resource_file(filename).map_err(|_| filename)?;
         Ok(Stylesheet::from_bytes(
             &res,
             ServoUrl::parse(&format!("chrome://resources/{:?}", filename)).unwrap(),
             None,
             None,
             Origin::UserAgent,
             MediaList::empty(),
             shared_lock.clone(),
@@ -1676,25 +1676,25 @@ fn get_ua_stylesheets() -> Result<UserAg
             QuirksMode::NoQuirks))
     }
 
     let shared_lock = SharedRwLock::new();
     let mut user_or_user_agent_stylesheets = vec!();
     // FIXME: presentational-hints.css should be at author origin with zero specificity.
     //        (Does it make a difference?)
     for &filename in &["user-agent.css", "servo.css", "presentational-hints.css"] {
-        user_or_user_agent_stylesheets.push(try!(parse_ua_stylesheet(&shared_lock, filename)));
+        user_or_user_agent_stylesheets.push(parse_ua_stylesheet(&shared_lock, filename)?);
     }
     for &(ref contents, ref url) in &opts::get().user_stylesheets {
         user_or_user_agent_stylesheets.push(Stylesheet::from_bytes(
             &contents, url.clone(), None, None, Origin::User, MediaList::empty(),
             shared_lock.clone(), None, &RustLogReporter, QuirksMode::NoQuirks));
     }
 
-    let quirks_mode_stylesheet = try!(parse_ua_stylesheet(&shared_lock, "quirks-mode.css"));
+    let quirks_mode_stylesheet = parse_ua_stylesheet(&shared_lock, "quirks-mode.css")?;
 
     Ok(UserAgentStylesheets {
         shared_lock: shared_lock,
         user_or_user_agent_stylesheets: user_or_user_agent_stylesheets,
         quirks_mode_stylesheet: quirks_mode_stylesheet,
     })
 }
 
--- a/servo/components/net/connector.rs
+++ b/servo/components/net/connector.rs
@@ -31,17 +31,17 @@ impl NetworkConnector for HttpsConnector
     fn connect(&self, host: &str, port: u16, scheme: &str) -> HyperResult<Self::Stream> {
         if scheme != "http" && scheme != "https" {
             return Err(HyperError::Io(io::Error::new(io::ErrorKind::InvalidInput,
                                                      "Invalid scheme for Http")));
         }
 
         // Perform host replacement when making the actual TCP connection.
         let addr = &(&*replace_host(host), port);
-        let stream = HttpStream(try!(TcpStream::connect(addr)));
+        let stream = HttpStream(TcpStream::connect(addr)?);
 
         if scheme == "http" {
             Ok(HttpsStream::Http(stream))
         } else {
             // Do not perform host replacement on the host that is used
             // for verifying any SSL certificate encountered.
             self.ssl.wrap_client(stream, host).map(HttpsStream::Https)
         }
--- a/servo/components/net/filemanager_thread.rs
+++ b/servo/components/net/filemanager_thread.rs
@@ -352,24 +352,24 @@ impl FileManagerStore {
                 return;
             }
         }
     }
 
     fn create_entry(&self, file_path: &Path, origin: &str) -> Result<SelectedFile, FileManagerThreadError> {
         use net_traits::filemanager_thread::FileManagerThreadError::FileSystemError;
 
-        let file = try!(File::open(file_path).map_err(|e| FileSystemError(e.to_string())));
-        let metadata = try!(file.metadata().map_err(|e| FileSystemError(e.to_string())));
-        let modified = try!(metadata.modified().map_err(|e| FileSystemError(e.to_string())));
-        let elapsed = try!(modified.elapsed().map_err(|e| FileSystemError(e.to_string())));
+        let file = File::open(file_path).map_err(|e| FileSystemError(e.to_string()))?;
+        let metadata = file.metadata().map_err(|e| FileSystemError(e.to_string()))?;
+        let modified = metadata.modified().map_err(|e| FileSystemError(e.to_string()))?;
+        let elapsed = modified.elapsed().map_err(|e| FileSystemError(e.to_string()))?;
         // Unix Epoch: https://doc.servo.org/std/time/constant.UNIX_EPOCH.html
         let modified_epoch = elapsed.as_secs() * 1000 + elapsed.subsec_nanos() as u64 / 1000000;
         let file_size = metadata.len();
-        let file_name = try!(file_path.file_name().ok_or(FileSystemError("Invalid filepath".to_string())));
+        let file_name = file_path.file_name().ok_or(FileSystemError("Invalid filepath".to_string()))?;
 
         let file_impl = FileImpl::MetaDataOnly(FileMetaData {
             path: file_path.to_path_buf(),
             modified: modified_epoch,
             size: file_size,
         });
 
         let id = Uuid::new_v4();
@@ -395,17 +395,17 @@ impl FileManagerStore {
             size: file_size,
             type_string: type_string,
         })
     }
 
     fn get_blob_buf(&self, sender: &IpcSender<FileManagerResult<ReadFileProgress>>,
                     id: &Uuid, origin_in: &FileOrigin, rel_pos: RelativePos,
                     check_url_validity: bool) -> Result<(), BlobURLStoreError> {
-        let file_impl = try!(self.get_impl(id, origin_in, check_url_validity));
+        let file_impl = self.get_impl(id, origin_in, check_url_validity)?;
         match file_impl {
             FileImpl::Memory(buf) => {
                 let range = rel_pos.to_abs_range(buf.size as usize);
                 let buf = BlobBuf {
                     filename: None,
                     type_string: buf.type_string,
                     size: range.len() as u64,
                     bytes: buf.bytes.index(range).to_vec(),
@@ -425,20 +425,20 @@ impl FileManagerStore {
 
                 let opt_filename = metadata.path.file_name()
                                            .and_then(|osstr| osstr.to_str())
                                            .map(|s| s.to_string());
 
                 let mime = guess_mime_type_opt(metadata.path.clone());
                 let range = rel_pos.to_abs_range(metadata.size as usize);
 
-                let mut file = try!(File::open(&metadata.path)
-                                   .map_err(|e| BlobURLStoreError::External(e.to_string())));
-                let seeked_start = try!(file.seek(SeekFrom::Start(range.start as u64))
-                                       .map_err(|e| BlobURLStoreError::External(e.to_string())));
+                let mut file = File::open(&metadata.path)
+                                   .map_err(|e| BlobURLStoreError::External(e.to_string()))?;
+                let seeked_start = file.seek(SeekFrom::Start(range.start as u64))
+                                       .map_err(|e| BlobURLStoreError::External(e.to_string()))?;
 
                 if seeked_start == (range.start as u64) {
                     let type_string = match mime {
                         Some(x) => format!("{}", x),
                         None    => "".to_string(),
                     };
 
                     chunked_read(sender, &mut file, range.len(), opt_filename,
--- a/servo/components/net/http_loader.rs
+++ b/servo/components/net/http_loader.rs
@@ -312,17 +312,17 @@ impl Read for StreamedResponse {
         }
     }
 }
 
 impl StreamedResponse {
     fn from_http_response(response: WrappedHttpResponse) -> io::Result<StreamedResponse> {
         let decoder = match response.content_encoding() {
             Some(Encoding::Gzip) => {
-                Decoder::Gzip(try!(GzDecoder::new(response)))
+                Decoder::Gzip(GzDecoder::new(response)?)
             }
             Some(Encoding::Deflate) => {
                 Decoder::Deflate(DeflateDecoder::new(response))
             }
             Some(Encoding::EncodingExt(ref ext)) if ext == "br" => {
                 Decoder::Brotli(Decompressor::new(response, 1024))
             }
             _ => {
@@ -1335,17 +1335,17 @@ fn cors_preflight_fetch(request: &Reques
 }
 
 /// [CORS check](https://fetch.spec.whatwg.org#concept-cors-check)
 fn cors_check(request: &Request, response: &Response) -> Result<(), ()> {
     // Step 1
     let origin = response.headers.get::<AccessControlAllowOrigin>().cloned();
 
     // Step 2
-    let origin = try!(origin.ok_or(()));
+    let origin = origin.ok_or(())?;
 
     // Step 3
     if request.credentials_mode != CredentialsMode::Include &&
        origin == AccessControlAllowOrigin::Any {
         return Ok(());
     }
 
     // Step 4
--- a/servo/components/net/image_cache.rs
+++ b/servo/components/net/image_cache.rs
@@ -48,19 +48,19 @@ fn decode_bytes_sync(key: LoadKey, bytes
     let image = load_from_memory(bytes);
     DecoderMsg {
         key: key,
         image: image
     }
 }
 
 fn get_placeholder_image(webrender_api: &webrender_traits::RenderApi, path: &PathBuf) -> io::Result<Arc<Image>> {
-    let mut file = try!(File::open(path));
+    let mut file = File::open(path)?;
     let mut image_data = vec![];
-    try!(file.read_to_end(&mut image_data));
+    file.read_to_end(&mut image_data)?;
     let mut image = load_from_memory(&image_data).unwrap();
     set_webrender_image_key(webrender_api, &mut image);
     Ok(Arc::new(image))
 }
 
 fn set_webrender_image_key(webrender_api: &webrender_traits::RenderApi, image: &mut Image) {
     if image.id.is_some() { return; }
     let format = convert_format(image.format);
--- a/servo/components/net/mime_classifier.rs
+++ b/servo/components/net/mime_classifier.rs
@@ -164,24 +164,24 @@ impl MimeClassifier {
              archive_classifier: GroupedClassifier::archive_classifier(),
              binary_or_plaintext: BinaryOrPlaintextClassifier,
              feeds_classifier: FeedsClassifier,
              font_classifier: GroupedClassifier::font_classifier()
          }
     }
 
     pub fn validate(&self) -> Result<(), String> {
-        try!(self.image_classifier.validate());
-        try!(self.audio_video_classifier.validate());
-        try!(self.scriptable_classifier.validate());
-        try!(self.plaintext_classifier.validate());
-        try!(self.archive_classifier.validate());
-        try!(self.binary_or_plaintext.validate());
-        try!(self.feeds_classifier.validate());
-        try!(self.font_classifier.validate());
+        self.image_classifier.validate()?;
+        self.audio_video_classifier.validate()?;
+        self.scriptable_classifier.validate()?;
+        self.plaintext_classifier.validate()?;
+        self.archive_classifier.validate()?;
+        self.binary_or_plaintext.validate()?;
+        self.feeds_classifier.validate()?;
+        self.font_classifier.validate()?;
         Ok(())
     }
 
     //some sort of iterator over the classifiers might be better?
     fn sniff_unknown_type(&self, no_sniff_flag: NoSniffFlag, data: &[u8]) -> MimeType {
         let should_sniff_scriptable = no_sniff_flag == NoSniffFlag::Off;
         let sniffed = if should_sniff_scriptable {
             self.scriptable_classifier.classify(data)
@@ -542,17 +542,17 @@ impl MIMEChecker for GroupedClassifier {
         self.byte_matchers
             .iter()
             .filter_map(|matcher| matcher.classify(data))
             .next()
     }
 
     fn validate(&self) -> Result<(), String> {
         for byte_matcher in &self.byte_matchers {
-            try!(byte_matcher.validate())
+            byte_matcher.validate()?
         }
         Ok(())
     }
 }
 
 enum Match {
     Start,
     DidNotMatch,
--- a/servo/components/net_traits/blob_url_store.rs
+++ b/servo/components/net_traits/blob_url_store.rs
@@ -31,21 +31,21 @@ pub struct BlobBuf {
     pub size: u64,
     /// Content of blob
     pub bytes: Vec<u8>,
 }
 
 /// Parse URL as Blob URL scheme's definition
 /// https://w3c.github.io/FileAPI/#DefinitionOfScheme
 pub fn parse_blob_url(url: &ServoUrl) -> Result<(Uuid, FileOrigin), ()> {
-    let url_inner = try!(Url::parse(url.path()).map_err(|_| ()));
+    let url_inner = Url::parse(url.path()).map_err(|_| ())?;
     let id = {
-        let mut segs = try!(url_inner.path_segments().ok_or(()));
-        let id = try!(segs.nth(0).ok_or(()));
-        try!(Uuid::from_str(id).map_err(|_| ()))
+        let mut segs = url_inner.path_segments().ok_or(())?;
+        let id = segs.nth(0).ok_or(())?;
+        Uuid::from_str(id).map_err(|_| ())?
     };
     Ok((id, get_blob_origin(&ServoUrl::from_url(url_inner))))
 }
 
 /// Given an URL, returning the Origin that a Blob created under this
 /// URL should have.
 /// HACK(izgzhen): Not well-specified on spec, and it is a bit a hack
 /// both due to ambiguity of spec and that we have to serialization the
--- a/servo/components/script/body.rs
+++ b/servo/components/script/body.rs
@@ -143,18 +143,18 @@ fn run_blob_data_algorithm(root: &Global
 }
 
 fn run_form_data_algorithm(root: &GlobalScope, bytes: Vec<u8>, mime: &[u8]) -> Fallible<FetchedData> {
     let mime_str = if let Ok(s) = str::from_utf8(mime) {
         s
     } else {
         ""
     };
-    let mime: Mime = try!(mime_str.parse().map_err(
-        |_| Error::Type("Inappropriate MIME-type for Body".to_string())));
+    let mime: Mime = mime_str.parse().map_err(
+        |_| Error::Type("Inappropriate MIME-type for Body".to_string()))?;
     match mime {
         // TODO
         // ... Parser for Mime(TopLevel::Multipart, SubLevel::FormData, _)
         // ... is not fully determined yet.
         Mime(TopLevel::Application, SubLevel::WwwFormUrlEncoded, _) => {
             let entries = form_urlencoded::parse(&bytes);
             let formdata = FormData::new(None, root);
             for (k, e) in entries {
--- a/servo/components/script/dom/bindings/conversions.rs
+++ b/servo/components/script/dom/bindings/conversions.rs
@@ -385,33 +385,33 @@ pub unsafe fn get_dom_class(obj: *mut JS
 /// not an object for a DOM object of the given type (as defined by the
 /// proto_id and proto_depth).
 #[inline]
 pub unsafe fn private_from_proto_check<F>(mut obj: *mut JSObject,
                                           proto_check: F)
                                           -> Result<*const libc::c_void, ()>
     where F: Fn(&'static DOMClass) -> bool
 {
-    let dom_class = try!(get_dom_class(obj).or_else(|_| {
+    let dom_class = get_dom_class(obj).or_else(|_| {
         if IsWrapper(obj) {
             trace!("found wrapper");
             obj = UnwrapObject(obj, /* stopAtWindowProxy = */ 0);
             if obj.is_null() {
                 trace!("unwrapping security wrapper failed");
                 Err(())
             } else {
                 assert!(!IsWrapper(obj));
                 trace!("unwrapped successfully");
                 get_dom_class(obj)
             }
         } else {
             trace!("not a dom wrapper");
             Err(())
         }
-    }));
+    })?;
 
     if proto_check(dom_class) {
         trace!("good prototype");
         Ok(private_from_object(obj))
     } else {
         trace!("bad prototype");
         Err(())
     }
--- a/servo/components/script/dom/bindings/mozmap.rs
+++ b/servo/components/script/dom/bindings/mozmap.rs
@@ -64,17 +64,17 @@ impl<T, C> FromJSValConvertible for MozM
         for id in &*ids {
             rooted!(in(cx) let id = *id);
 
             rooted!(in(cx) let mut property = UndefinedValue());
             if !JS_GetPropertyById(cx, object.handle(), id.handle(), property.handle_mut()) {
                 return Err(());
             }
 
-            let property = match try!(T::from_jsval(cx, property.handle(), config.clone())) {
+            let property = match T::from_jsval(cx, property.handle(), config.clone())? {
                 ConversionResult::Success(property) => property,
                 ConversionResult::Failure(message) => return Ok(ConversionResult::Failure(message)),
             };
 
             let key = jsid_to_string(cx, id.handle()).unwrap();
             map.insert(key, property);
         }
 
--- a/servo/components/script/dom/bindings/structuredclone.rs
+++ b/servo/components/script/dom/bindings/structuredclone.rs
@@ -109,17 +109,17 @@ unsafe fn read_blob(cx: *mut JSContext,
     let blob = Blob::new(&target_global, BlobImpl::new_from_bytes(blob_buffer), type_str);
     return blob.reflector().get_jsobject().get()
 }
 
 unsafe fn write_blob(blob: Root<Blob>,
                      w: *mut JSStructuredCloneWriter)
                      -> Result<(), ()> {
     let structured_writer = StructuredCloneWriter { w: w };
-    let blob_vec = try!(blob.get_bytes());
+    let blob_vec = blob.get_bytes()?;
     assert!(JS_WriteUint32Pair(w, StructuredCloneTags::DomBlob as u32, 0));
     structured_writer.write_slice(&blob_vec);
     structured_writer.write_str(&blob.type_string());
     return Ok(())
 }
 
 unsafe extern "C" fn read_callback(cx: *mut JSContext,
                                    r: *mut JSStructuredCloneReader,
--- a/servo/components/script/dom/bindings/xmlname.rs
+++ b/servo/components/script/dom/bindings/xmlname.rs
@@ -27,17 +27,17 @@ pub fn validate_qualified_name(qualified
 /// See https://dom.spec.whatwg.org/#validate-and-extract for details.
 pub fn validate_and_extract(namespace: Option<DOMString>,
                             qualified_name: &str)
                             -> Fallible<(Namespace, Option<Prefix>, LocalName)> {
     // Step 1.
     let namespace = namespace_from_domstring(namespace);
 
     // Step 2.
-    try!(validate_qualified_name(qualified_name));
+    validate_qualified_name(qualified_name)?;
 
     let colon = ':';
 
     // Step 5.
     let mut parts = qualified_name.splitn(2, colon);
 
     let (maybe_prefix, local_name) = {
         let maybe_prefix = parts.next();
--- a/servo/components/script/dom/bluetooth.rs
+++ b/servo/components/script/dom/bluetooth.rs
@@ -323,17 +323,17 @@ fn canonicalize_filter(filter: &Bluetoot
             if services.is_empty() {
                 return Err(Type(SERVICE_ERROR.to_owned()));
             }
 
             let mut services_vec = vec!();
 
             for service in services {
                 // Step 3.2 - 3.3.
-                let uuid = try!(BluetoothUUID::service(service.clone())).to_string();
+                let uuid = BluetoothUUID::service(service.clone())?.to_string();
 
                 // Step 3.4.
                 if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
                     return Err(Security)
                 }
 
                 services_vec.push(uuid);
             }
@@ -388,17 +388,17 @@ fn canonicalize_filter(filter: &Bluetoot
                 let manufacturer_id = match u16::from_str(key.as_ref()) {
                     Ok(id) => id,
                     Err(err) => return Err(Type(format!("{} {} {}", KEY_CONVERSION_ERROR, key, err))),
                 };
 
                 // Step 7.3: No need to convert to IDL values since this is only used by native code.
 
                 // Step 7.4 - 7.5.
-                map.insert(manufacturer_id, try!(canonicalize_bluetooth_data_filter_init(bdfi)));
+                map.insert(manufacturer_id, canonicalize_bluetooth_data_filter_init(bdfi)?);
             }
             Some(map)
         },
         None => None,
     };
 
     // Step 8 - 9.
     let service_data = match filter.serviceData {
@@ -412,27 +412,27 @@ fn canonicalize_filter(filter: &Bluetoot
                 let service_name = match u32::from_str(key.as_ref()) {
                     // Step 9.1.
                     Ok(number) => StringOrUnsignedLong::UnsignedLong(number),
                     // Step 9.2.
                     _ => StringOrUnsignedLong::String(key.clone())
                 };
 
                 // Step 9.3 - 9.4.
-                let service = try!(BluetoothUUID::service(service_name)).to_string();
+                let service = BluetoothUUID::service(service_name)?.to_string();
 
                 // Step 9.5.
                 if uuid_is_blocklisted(service.as_ref(), Blocklist::All) {
                     return Err(Security);
                 }
 
                 // Step 9.6: No need to convert to IDL values since this is only used by native code.
 
                 // Step 9.7 - 9.8.
-                map.insert(service, try!(canonicalize_bluetooth_data_filter_init(bdfi)));
+                map.insert(service, canonicalize_bluetooth_data_filter_init(bdfi)?);
             }
             Some(map)
         },
         None => None,
     };
 
     // Step 10.
     Ok(BluetoothScanfilter::new(name, name_prefix, services_vec, manufacturer_data, service_data))
--- a/servo/components/script/dom/canvasrenderingcontext2d.rs
+++ b/servo/components/script/dom/canvasrenderingcontext2d.rs
@@ -1132,28 +1132,28 @@ impl CanvasRenderingContext2DMethods for
                      image: HTMLImageElementOrHTMLCanvasElementOrCanvasRenderingContext2D,
                      mut repetition: DOMString)
                      -> Fallible<Root<CanvasPattern>> {
         let (image_data, image_size) = match image {
             HTMLImageElementOrHTMLCanvasElementOrCanvasRenderingContext2D::HTMLImageElement(ref image) => {
                 // https://html.spec.whatwg.org/multipage/#img-error
                 // If the image argument is an HTMLImageElement object that is in the broken state,
                 // then throw an InvalidStateError exception
-                try!(self.fetch_image_data(image).ok_or(Error::InvalidState))
+                self.fetch_image_data(image).ok_or(Error::InvalidState)?
             },
             HTMLImageElementOrHTMLCanvasElementOrCanvasRenderingContext2D::HTMLCanvasElement(ref canvas) => {
                 let _ = canvas.get_or_init_2d_context();
 
-                try!(canvas.fetch_all_data().ok_or(Error::InvalidState))
+                canvas.fetch_all_data().ok_or(Error::InvalidState)?
             },
             HTMLImageElementOrHTMLCanvasElementOrCanvasRenderingContext2D::CanvasRenderingContext2D(ref context) => {
                 let canvas = context.Canvas();
                 let _ = canvas.get_or_init_2d_context();
 
-                try!(canvas.fetch_all_data().ok_or(Error::InvalidState))
+                canvas.fetch_all_data().ok_or(Error::InvalidState)?
             }
         };
 
         if repetition.is_empty() {
             repetition.push_str("repeat");
         }
 
         if let Ok(rep) = RepetitionStyle::from_str(&repetition) {
--- a/servo/components/script/dom/dedicatedworkerglobalscope.rs
+++ b/servo/components/script/dom/dedicatedworkerglobalscope.rs
@@ -288,21 +288,21 @@ impl DedicatedWorkerGlobalScope {
             worker_handle.add();
             timer_event_handle.add();
             if scope.from_devtools_sender().is_some() {
                 devtools_handle.add();
             }
         }
         let ret = sel.wait();
         if ret == worker_handle.id() {
-            Ok(MixedMessage::FromWorker(try!(worker_port.recv())))
+            Ok(MixedMessage::FromWorker(worker_port.recv()?))
         } else if ret == timer_event_handle.id() {
-            Ok(MixedMessage::FromScheduler(try!(timer_event_port.recv())))
+            Ok(MixedMessage::FromScheduler(timer_event_port.recv()?))
         } else if ret == devtools_handle.id() {
-            Ok(MixedMessage::FromDevtools(try!(devtools_port.recv())))
+            Ok(MixedMessage::FromDevtools(devtools_port.recv()?))
         } else {
             panic!("unexpected select result!")
         }
     }
 
     fn handle_script_event(&self, msg: WorkerScriptMsg) {
         match msg {
             WorkerScriptMsg::DOMMessage(data) => {
@@ -379,17 +379,17 @@ unsafe extern "C" fn interrupt_callback(
     // A false response causes the script to terminate
     !worker.is_closing()
 }
 
 impl DedicatedWorkerGlobalScopeMethods for DedicatedWorkerGlobalScope {
     #[allow(unsafe_code)]
     // https://html.spec.whatwg.org/multipage/#dom-dedicatedworkerglobalscope-postmessage
     unsafe fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
-        let data = try!(StructuredCloneData::write(cx, message));
+        let data = StructuredCloneData::write(cx, message)?;
         let worker = self.worker.borrow().as_ref().unwrap().clone();
         self.parent_sender
             .send(CommonScriptMsg::RunnableMsg(WorkerEvent,
                                                box WorkerMessageHandler::new(worker, data)))
             .unwrap();
         Ok(())
     }
 
--- a/servo/components/script/dom/dissimilaroriginwindow.rs
+++ b/servo/components/script/dom/dissimilaroriginwindow.rs
@@ -141,17 +141,17 @@ impl DissimilarOriginWindowMethods for D
             url => match ServoUrl::parse(&url) {
                 Ok(url) => Some(url.origin()),
                 Err(_) => return Err(Error::Syntax),
             }
         };
 
         // Step 1-2, 6-8.
         // TODO(#12717): Should implement the `transfer` argument.
-        let data = try!(StructuredCloneData::write(cx, message));
+        let data = StructuredCloneData::write(cx, message)?;
 
         // Step 9.
         self.post_message(origin, data);
         Ok(())
     }
 
     #[allow(unsafe_code)]
     // https://html.spec.whatwg.org/multipage/#dom-opener
--- a/servo/components/script/dom/document.rs
+++ b/servo/components/script/dom/document.rs
@@ -1449,17 +1449,17 @@ impl Document {
                 NodeOrString::Node(node) => node,
                 NodeOrString::String(string) => Root::upcast(self.CreateTextNode(string)),
             })
         } else {
             let fragment = Root::upcast::<Node>(self.CreateDocumentFragment());
             for node in nodes {
                 match node {
                     NodeOrString::Node(node) => {
-                        try!(fragment.AppendChild(&node));
+                        fragment.AppendChild(&node)?;
                     },
                     NodeOrString::String(string) => {
                         let node = Root::upcast::<Node>(self.CreateTextNode(string));
                         // No try!() here because appending a text node
                         // should not fail.
                         fragment.AppendChild(&node).unwrap();
                     }
                 }
@@ -2814,18 +2814,18 @@ impl DocumentMethods for Document {
         Ok(Element::create(name, self, ElementCreator::ScriptCreated))
     }
 
     // https://dom.spec.whatwg.org/#dom-document-createelementns
     fn CreateElementNS(&self,
                        namespace: Option<DOMString>,
                        qualified_name: DOMString)
                        -> Fallible<Root<Element>> {
-        let (namespace, prefix, local_name) = try!(validate_and_extract(namespace,
-                                                                        &qualified_name));
+        let (namespace, prefix, local_name) = validate_and_extract(namespace,
+                                                                        &qualified_name)?;
         let name = QualName::new(prefix, namespace, local_name);
         Ok(Element::create(name, self, ElementCreator::ScriptCreated))
     }
 
     // https://dom.spec.whatwg.org/#dom-document-createattribute
     fn CreateAttribute(&self, mut local_name: DOMString) -> Fallible<Root<Attr>> {
         if xml_name_type(&local_name) == InvalidXMLName {
             debug!("Not a valid element name");
@@ -2840,18 +2840,18 @@ impl DocumentMethods for Document {
         Ok(Attr::new(&self.window, name.clone(), value, name, ns!(), None, None))
     }
 
     // https://dom.spec.whatwg.org/#dom-document-createattributens
     fn CreateAttributeNS(&self,
                          namespace: Option<DOMString>,
                          qualified_name: DOMString)
                          -> Fallible<Root<Attr>> {
-        let (namespace, prefix, local_name) = try!(validate_and_extract(namespace,
-                                                                        &qualified_name));
+        let (namespace, prefix, local_name) = validate_and_extract(namespace,
+                                                                        &qualified_name)?;
         let value = AttrValue::String("".to_owned());
         let qualified_name = LocalName::from(qualified_name);
         Ok(Attr::new(&self.window,
                      local_name,
                      value,
                      qualified_name,
                      namespace,
                      prefix,
--- a/servo/components/script/dom/domimplementation.rs
+++ b/servo/components/script/dom/domimplementation.rs
@@ -52,17 +52,17 @@ impl DOMImplementation {
 // https://dom.spec.whatwg.org/#domimplementation
 impl DOMImplementationMethods for DOMImplementation {
     // https://dom.spec.whatwg.org/#dom-domimplementation-createdocumenttype
     fn CreateDocumentType(&self,
                           qualified_name: DOMString,
                           pubid: DOMString,
                           sysid: DOMString)
                           -> Fallible<Root<DocumentType>> {
-        try!(validate_qualified_name(&qualified_name));
+        validate_qualified_name(&qualified_name)?;
         Ok(DocumentType::new(qualified_name, Some(pubid), Some(sysid), &self.document))
     }
 
     // https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
     fn CreateDocument(&self,
                       maybe_namespace: Option<DOMString>,
                       qname: DOMString,
                       maybe_doctype: Option<&DocumentType>)
--- a/servo/components/script/dom/domtokenlist.rs
+++ b/servo/components/script/dom/domtokenlist.rs
@@ -79,40 +79,40 @@ impl DOMTokenListMethods for DOMTokenLis
                 .any(|atom: &Atom| *atom == token)
         })
     }
 
     // https://dom.spec.whatwg.org/#dom-domtokenlist-add
     fn Add(&self, tokens: Vec<DOMString>) -> ErrorResult {
         let mut atoms = self.element.get_tokenlist_attribute(&self.local_name);
         for token in &tokens {
-            let token = try!(self.check_token_exceptions(&token));
+            let token = self.check_token_exceptions(&token)?;
             if !atoms.iter().any(|atom| *atom == token) {
                 atoms.push(token);
             }
         }
         self.element.set_atomic_tokenlist_attribute(&self.local_name, atoms);
         Ok(())
     }
 
     // https://dom.spec.whatwg.org/#dom-domtokenlist-remove
     fn Remove(&self, tokens: Vec<DOMString>) -> ErrorResult {
         let mut atoms = self.element.get_tokenlist_attribute(&self.local_name);
         for token in &tokens {
-            let token = try!(self.check_token_exceptions(&token));
+            let token = self.check_token_exceptions(&token)?;
             atoms.iter().position(|atom| *atom == token).map(|index| atoms.remove(index));
         }
         self.element.set_atomic_tokenlist_attribute(&self.local_name, atoms);
         Ok(())
     }
 
     // https://dom.spec.whatwg.org/#dom-domtokenlist-toggle
     fn Toggle(&self, token: DOMString, force: Option<bool>) -> Fallible<bool> {
         let mut atoms = self.element.get_tokenlist_attribute(&self.local_name);
-        let token = try!(self.check_token_exceptions(&token));
+        let token = self.check_token_exceptions(&token)?;
         match atoms.iter().position(|atom| *atom == token) {
             Some(index) => match force {
                 Some(true) => Ok(true),
                 _ => {
                     atoms.remove(index);
                     self.element.set_atomic_tokenlist_attribute(&self.local_name, atoms);
                     Ok(false)
                 }
--- a/servo/components/script/dom/element.rs
+++ b/servo/components/script/dom/element.rs
@@ -139,19 +139,19 @@ pub struct Element {
     /// flags are not atomic, so the style system takes care of only set them
     /// when it has exclusive access to the element.
     #[ignore_heap_size_of = "bitflags defined in rust-selectors"]
     selector_flags: Cell<ElementSelectorFlags>,
 }
 
 impl fmt::Debug for Element {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "<{}", self.local_name));
+        write!(f, "<{}", self.local_name)?;
         if let Some(ref id) = *self.id_attribute.borrow() {
-            try!(write!(f, " id={}", id));
+            write!(f, " id={}", id)?;
         }
         write!(f, ">")
     }
 }
 
 impl fmt::Debug for Root<Element> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         (**self).fmt(f)
@@ -1527,17 +1527,17 @@ impl ElementMethods for Element {
     }
 
     // https://dom.spec.whatwg.org/#dom-element-setattributens
     fn SetAttributeNS(&self,
                       namespace: Option<DOMString>,
                       qualified_name: DOMString,
                       value: DOMString) -> ErrorResult {
         let (namespace, prefix, local_name) =
-            try!(validate_and_extract(namespace, &qualified_name));
+            validate_and_extract(namespace, &qualified_name)?;
         let qualified_name = LocalName::from(qualified_name);
         let value = self.parse_attribute(&namespace, &local_name, value);
         self.set_first_matching_attribute(
             local_name.clone(), value, qualified_name, namespace.clone(), prefix,
             |attr| *attr.local_name() == local_name && *attr.namespace() == namespace);
         Ok(())
     }
 
@@ -1924,17 +1924,17 @@ impl ElementMethods for Element {
     fn GetInnerHTML(&self) -> Fallible<DOMString> {
         // XXX TODO: XML case
         self.serialize(ChildrenOnly)
     }
 
     /// https://w3c.github.io/DOM-Parsing/#widl-Element-innerHTML
     fn SetInnerHTML(&self, value: DOMString) -> ErrorResult {
         // Step 1.
-        let frag = try!(self.parse_fragment(value));
+        let frag = self.parse_fragment(value)?;
         // Step 2.
         // https://github.com/w3c/DOM-Parsing/issues/1
         let target = if let Some(template) = self.downcast::<HTMLTemplateElement>() {
             Root::upcast(template.Content())
         } else {
             Root::from_ref(self.upcast())
         };
         Node::replace_all(Some(frag.upcast()), &target);
@@ -1969,19 +1969,19 @@ impl ElementMethods for Element {
                                                 &context_document,
                                                 ElementCreator::ScriptCreated);
                 Root::upcast(body_elem)
             },
             _ => context_node.GetParentElement().unwrap()
         };
 
         // Step 5.
-        let frag = try!(parent.parse_fragment(value));
+        let frag = parent.parse_fragment(value)?;
         // Step 6.
-        try!(context_parent.ReplaceChild(frag.upcast(), context_node));
+        context_parent.ReplaceChild(frag.upcast(), context_node)?;
         Ok(())
     }
 
     // https://dom.spec.whatwg.org/#dom-nondocumenttypechildnode-previouselementsibling
     fn GetPreviousElementSibling(&self) -> Option<Root<Element>> {
         self.upcast::<Node>().preceding_siblings().filter_map(Root::downcast).next()
     }
 
@@ -2090,37 +2090,37 @@ impl ElementMethods for Element {
                 Ok(None)
             }
         }
     }
 
     // https://dom.spec.whatwg.org/#dom-element-insertadjacentelement
     fn InsertAdjacentElement(&self, where_: DOMString, element: &Element)
                              -> Fallible<Option<Root<Element>>> {
-        let where_ = try!(AdjacentPosition::try_from(&*where_));
-        let inserted_node = try!(self.insert_adjacent(where_, element.upcast()));
+        let where_ = AdjacentPosition::try_from(&*where_)?;
+        let inserted_node = self.insert_adjacent(where_, element.upcast())?;
         Ok(inserted_node.map(|node| Root::downcast(node).unwrap()))
     }
 
     // https://dom.spec.whatwg.org/#dom-element-insertadjacenttext
     fn InsertAdjacentText(&self, where_: DOMString, data: DOMString)
                           -> ErrorResult {
         // Step 1.
         let text = Text::new(data, &document_from_node(self));
 
         // Step 2.
-        let where_ = try!(AdjacentPosition::try_from(&*where_));
+        let where_ = AdjacentPosition::try_from(&*where_)?;
         self.insert_adjacent(where_, text.upcast()).map(|_| ())
     }
 
     // https://w3c.github.io/DOM-Parsing/#dom-element-insertadjacenthtml
     fn InsertAdjacentHTML(&self, position: DOMString, text: DOMString)
                           -> ErrorResult {
         // Step 1.
-        let position = try!(AdjacentPosition::try_from(&*position));
+        let position = AdjacentPosition::try_from(&*position)?;
 
         let context = match position {
             AdjacentPosition::BeforeBegin | AdjacentPosition::AfterEnd => {
                 match self.upcast::<Node>().GetParentNode() {
                     Some(ref node) if node.is::<Document>() => {
                         return Err(Error::NoModificationAllowed)
                     }
                     None => return Err(Error::NoModificationAllowed),
@@ -2132,17 +2132,17 @@ impl ElementMethods for Element {
             }
         };
 
         // Step 2.
         let context = Element::fragment_parsing_context(
             &context.owner_doc(), context.downcast::<Element>());
 
         // Step 3.
-        let fragment = try!(context.parse_fragment(text));
+        let fragment = context.parse_fragment(text)?;
 
         // Step 4.
         self.insert_adjacent(position, fragment.upcast()).map(|_| ())
     }
 
     // check-tidy: no specs after this line
     fn EnterFormalActivationState(&self) -> ErrorResult {
         match self.as_maybe_activatable() {
--- a/servo/components/script/dom/headers.rs
+++ b/servo/components/script/dom/headers.rs
@@ -47,28 +47,28 @@ impl Headers {
     pub fn new(global: &GlobalScope) -> Root<Headers> {
         reflect_dom_object(box Headers::new_inherited(), global, HeadersWrap)
     }
 
     // https://fetch.spec.whatwg.org/#dom-headers
     pub fn Constructor(global: &GlobalScope, init: Option<HeadersInit>)
                        -> Fallible<Root<Headers>> {
         let dom_headers_new = Headers::new(global);
-        try!(dom_headers_new.fill(init));
+        dom_headers_new.fill(init)?;
         Ok(dom_headers_new)
     }
 }
 
 impl HeadersMethods for Headers {
     // https://fetch.spec.whatwg.org/#concept-headers-append
     fn Append(&self, name: ByteString, value: ByteString) -> ErrorResult {
         // Step 1
         let value = normalize_value(value);
         // Step 2
-        let (mut valid_name, valid_value) = try!(validate_name_and_value(name, value));
+        let (mut valid_name, valid_value) = validate_name_and_value(name, value)?;
         valid_name = valid_name.to_lowercase();
         // Step 3
         if self.guard.get() == Guard::Immutable {
             return Err(Error::Type("Guard is immutable".to_string()));
         }
         // Step 4
         if self.guard.get() == Guard::Request && is_forbidden_header_name(&valid_name) {
             return Ok(());
@@ -90,17 +90,17 @@ impl HeadersMethods for Headers {
         combined_value.extend(valid_value.iter().cloned());
         self.header_list.borrow_mut().set_raw(valid_name, vec![combined_value]);
         Ok(())
     }
 
     // https://fetch.spec.whatwg.org/#dom-headers-delete
     fn Delete(&self, name: ByteString) -> ErrorResult {
         // Step 1
-        let valid_name = try!(validate_name(name));
+        let valid_name = validate_name(name)?;
         // Step 2
         if self.guard.get() == Guard::Immutable {
             return Err(Error::Type("Guard is immutable".to_string()));
         }
         // Step 3
         if self.guard.get() == Guard::Request && is_forbidden_header_name(&valid_name) {
             return Ok(());
         }
@@ -116,36 +116,36 @@ impl HeadersMethods for Headers {
         // Step 6
         self.header_list.borrow_mut().remove_raw(&valid_name);
         Ok(())
     }
 
     // https://fetch.spec.whatwg.org/#dom-headers-get
     fn Get(&self, name: ByteString) -> Fallible<Option<ByteString>> {
         // Step 1
-        let valid_name = &try!(validate_name(name));
+        let valid_name = &validate_name(name)?;
         Ok(self.header_list.borrow().get_raw(&valid_name).map(|v| {
             ByteString::new(v[0].clone())
         }))
     }
 
     // https://fetch.spec.whatwg.org/#dom-headers-has
     fn Has(&self, name: ByteString) -> Fallible<bool> {
         // Step 1
-        let valid_name = try!(validate_name(name));
+        let valid_name = validate_name(name)?;
         // Step 2
         Ok(self.header_list.borrow_mut().get_raw(&valid_name).is_some())
     }
 
     // https://fetch.spec.whatwg.org/#dom-headers-set
     fn Set(&self, name: ByteString, value: ByteString) -> Fallible<()> {
         // Step 1
         let value = normalize_value(value);
         // Step 2
-        let (mut valid_name, valid_value) = try!(validate_name_and_value(name, value));
+        let (mut valid_name, valid_value) = validate_name_and_value(name, value)?;
         valid_name = valid_name.to_lowercase();
         // Step 3
         if self.guard.get() == Guard::Immutable {
             return Err(Error::Type("Guard is immutable".to_string()));
         }
         // Step 4
         if self.guard.get() == Guard::Request && is_forbidden_header_name(&valid_name) {
             return Ok(());
@@ -167,43 +167,43 @@ impl HeadersMethods for Headers {
 
 impl Headers {
     // https://fetch.spec.whatwg.org/#concept-headers-fill
     pub fn fill(&self, filler: Option<HeadersInit>) -> ErrorResult {
         match filler {
             // Step 1
             Some(HeadersInit::Headers(h)) => {
                 for header in h.header_list.borrow().iter() {
-                    try!(self.Append(
+                    self.Append(
                         ByteString::new(Vec::from(header.name())),
                         ByteString::new(Vec::from(header.value_string().into_bytes()))
-                    ));
+                    )?;
                 }
                 Ok(())
             },
             // Step 2
             Some(HeadersInit::ByteStringSequenceSequence(v)) => {
                 for mut seq in v {
                     if seq.len() == 2 {
                         let val = seq.pop().unwrap();
                         let name = seq.pop().unwrap();
-                        try!(self.Append(name, val));
+                        self.Append(name, val)?;
                     } else {
                         return Err(Error::Type(
                             format!("Each header object must be a sequence of length 2 - found one with length {}",
                                     seq.len())));
                     }
                 }
                 Ok(())
             },
             Some(HeadersInit::StringByteStringRecord(m)) => {
                 for (key, value) in m.iter() {
                     let key_vec = key.as_ref().to_string().into();
                     let headers_key = ByteString::new(key_vec);
-                    try!(self.Append(headers_key, value.clone()));
+                    self.Append(headers_key, value.clone())?;
                 }
                 Ok(())
             },
             None => Ok(()),
         }
     }
 
     pub fn for_request(global: &GlobalScope) -> Root<Headers> {
@@ -355,17 +355,17 @@ pub fn is_forbidden_header_name(name: &s
 // field-content production, but ISSUE 1 has still not been resolved.
 // The production definitions likely need to be re-written.
 // [1] https://fetch.spec.whatwg.org/#concept-header-value
 // [2] https://tools.ietf.org/html/rfc7230#section-3.2
 // [3] https://tools.ietf.org/html/rfc7230#section-3.2.6
 // [4] https://www.rfc-editor.org/errata_search.php?rfc=7230
 fn validate_name_and_value(name: ByteString, value: ByteString)
                            -> Fallible<(String, Vec<u8>)> {
-    let valid_name = try!(validate_name(name));
+    let valid_name = validate_name(name)?;
     if !is_field_content(&value) {
         return Err(Error::Type("Value is not valid".to_string()));
     }
     Ok((valid_name, value.into()))
 }
 
 fn validate_name(name: ByteString) -> Fallible<String> {
     if !is_field_name(&name) {
--- a/servo/components/script/dom/htmlcanvaselement.rs
+++ b/servo/components/script/dom/htmlcanvaselement.rs
@@ -292,19 +292,19 @@ impl HTMLCanvasElementMethods for HTMLCa
         // Step 2.
         if self.Width() == 0 || self.Height() == 0 {
             return Ok(DOMString::from("data:,"));
         }
 
         // Step 3.
         let raw_data = match *self.context.borrow() {
             Some(CanvasContext::Context2d(ref context)) => {
-                let image_data = try!(context.GetImageData(Finite::wrap(0f64), Finite::wrap(0f64),
+                let image_data = context.GetImageData(Finite::wrap(0f64), Finite::wrap(0f64),
                                                            Finite::wrap(self.Width() as f64),
-                                                           Finite::wrap(self.Height() as f64)));
+                                                           Finite::wrap(self.Height() as f64))?;
                 image_data.get_data_array()
             }
             None => {
                 // Each pixel is fully-transparent black.
                 vec![0; (self.Width() * self.Height() * 4) as usize]
             }
             _ => return Err(Error::NotSupported) // WebGL
         };
--- a/servo/components/script/dom/htmloptionscollection.rs
+++ b/servo/components/script/dom/htmloptionscollection.rs
@@ -44,17 +44,17 @@ impl HTMLOptionsCollection {
 
     fn add_new_elements(&self, count: u32) -> ErrorResult {
         let root = self.upcast().root_node();
         let document = document_from_node(&*root);
 
         for _ in 0..count {
             let element = HTMLOptionElement::new(local_name!("option"), None, &document);
             let node = element.upcast::<Node>();
-            try!(root.AppendChild(node));
+            root.AppendChild(node)?;
         };
         Ok(())
     }
 }
 
 impl HTMLOptionsCollectionMethods for HTMLOptionsCollection {
     // FIXME: This shouldn't need to be implemented here since HTMLCollection (the parent of
     // HTMLOptionsCollection) implements NamedGetter.
@@ -85,17 +85,17 @@ impl HTMLOptionsCollectionMethods for HT
             // Step 2
             let length = self.upcast().Length();
 
             // Step 3
             let n = index as i32 - length as i32;
 
             // Step 4
             if n > 0 {
-                try!(self.add_new_elements(n as u32));
+                self.add_new_elements(n as u32)?;
             }
 
             // Step 5
             let node = value.upcast::<Node>();
             let root = self.upcast().root_node();
             if n >= 0 {
                 Node::pre_insert(node, &root, None).map(|_| ())
             } else {
--- a/servo/components/script/dom/htmltableelement.rs
+++ b/servo/components/script/dom/htmltableelement.rs
@@ -98,17 +98,17 @@ impl HTMLTableElement {
         self.delete_first_section_of_type(atom);
 
         let node = self.upcast::<Node>();
 
         if let Some(section) = section {
             let reference_element = node.child_elements().find(reference_predicate);
             let reference_node = reference_element.r().map(|e| e.upcast());
 
-            try!(node.InsertBefore(section.upcast(), reference_node));
+            node.InsertBefore(section.upcast(), reference_node)?;
         }
 
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-table-createthead
     // https://html.spec.whatwg.org/multipage/#dom-table-createtfoot
     fn create_section_of_type(&self, atom: &LocalName) -> Root<HTMLTableSectionElement> {
--- a/servo/components/script/dom/imagedata.rs
+++ b/servo/components/script/dom/imagedata.rs
@@ -60,18 +60,18 @@ impl ImageData {
         if width == 0 {
             return Err(Error::IndexSize);
         }
 
         // checking jsobject type and verifying (height * width * 4 == jsobject.byte_len())
         if let Some(jsobject) = opt_jsobject {
             let cx = global.get_cx();
             typedarray!(in(cx) let array_res: Uint8ClampedArray = jsobject);
-            let mut array = try!(array_res
-                .map_err(|_| Error::Type("Argument to Image data is not an Uint8ClampedArray".to_owned())));
+            let mut array = array_res
+                .map_err(|_| Error::Type("Argument to Image data is not an Uint8ClampedArray".to_owned()))?;
 
             let byte_len = array.as_slice().len() as u32;
             if byte_len % 4 != 0 {
                 return Err(Error::InvalidState);
             }
 
             let len = byte_len / 4;
             if width == 0 || len % width != 0 {
--- a/servo/components/script/dom/location.rs
+++ b/servo/components/script/dom/location.rs
@@ -65,31 +65,31 @@ impl Location {
     pub fn origin(&self) -> &MutableOrigin {
         self.window.origin()
     }
 }
 
 impl LocationMethods for Location {
     // https://html.spec.whatwg.org/multipage/#dom-location-assign
     fn Assign(&self, url: USVString) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         // TODO: per spec, we should use the _API base URL_ specified by the
         //       _entry settings object_.
         let base_url = self.window.get_url();
         if let Ok(url) = base_url.join(&url.0) {
             self.window.load_url(url, false, false, None);
             Ok(())
         } else {
             Err(Error::Syntax)
         }
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-reload
     fn Reload(&self) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.window.load_url(self.get_url(), true, true, None);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-replace
     fn Replace(&self, url: USVString) -> ErrorResult {
         // Note: no call to self.check_same_origin_domain()
         // TODO: per spec, we should use the _API base URL_ specified by the
@@ -100,128 +100,128 @@ impl LocationMethods for Location {
             Ok(())
         } else {
             Err(Error::Syntax)
         }
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-hash
     fn GetHash(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Hash(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-hash
     fn SetHash(&self, mut value: USVString) -> ErrorResult {
         if value.0.is_empty() {
             value = USVString("#".to_owned());
         }
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.set_url_component(value, UrlHelper::SetHash);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-host
     fn GetHost(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Host(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-host
     fn SetHost(&self, value: USVString) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.set_url_component(value, UrlHelper::SetHost);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-origin
     fn GetOrigin(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Origin(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-hostname
     fn GetHostname(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Hostname(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-hostname
     fn SetHostname(&self, value: USVString) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.set_url_component(value, UrlHelper::SetHostname);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-href
     fn GetHref(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Href(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-href
     fn SetHref(&self, value: USVString) -> ErrorResult {
         // Note: no call to self.check_same_origin_domain()
         let url = match self.window.get_url().join(&value.0) {
             Ok(url) => url,
             Err(e) => return Err(Error::Type(format!("Couldn't parse URL: {}", e))),
         };
         self.window.load_url(url, false, false, None);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-pathname
     fn GetPathname(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Pathname(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-pathname
     fn SetPathname(&self, value: USVString) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.set_url_component(value, UrlHelper::SetPathname);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-port
     fn GetPort(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Port(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-port
     fn SetPort(&self, value: USVString) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.set_url_component(value, UrlHelper::SetPort);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-protocol
     fn GetProtocol(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Protocol(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-protocol
     fn SetProtocol(&self, value: USVString) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.set_url_component(value, UrlHelper::SetProtocol);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-href
     fn Stringifier(&self) -> Fallible<DOMString> {
-        Ok(DOMString::from(try!(self.GetHref()).0))
+        Ok(DOMString::from(self.GetHref()?.0))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-search
     fn GetSearch(&self) -> Fallible<USVString> {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         Ok(UrlHelper::Search(&self.get_url()))
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-location-search
     fn SetSearch(&self, value: USVString) -> ErrorResult {
-        try!(self.check_same_origin_domain());
+        self.check_same_origin_domain()?;
         self.set_url_component(value, UrlHelper::SetSearch);
         Ok(())
     }
 }
--- a/servo/components/script/dom/node.rs
+++ b/servo/components/script/dom/node.rs
@@ -626,26 +626,26 @@ impl Node {
             None => return Ok(()),
             Some(parent) => parent,
         };
 
         // Step 3.
         let viable_previous_sibling = first_node_not_in(self.preceding_siblings(), &nodes);
 
         // Step 4.
-        let node = try!(self.owner_doc().node_from_nodes_and_strings(nodes));
+        let node = self.owner_doc().node_from_nodes_and_strings(nodes)?;
 
         // Step 5.
         let viable_previous_sibling = match viable_previous_sibling {
             Some(ref viable_previous_sibling) => viable_previous_sibling.next_sibling.get(),
             None => parent.first_child.get(),
         };
 
         // Step 6.
-        try!(Node::pre_insert(&node, &parent, viable_previous_sibling.r()));
+        Node::pre_insert(&node, &parent, viable_previous_sibling.r())?;
 
         Ok(())
     }
 
     // https://dom.spec.whatwg.org/#dom-childnode-after
     pub fn after(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
         // Step 1.
         let parent = &self.parent_node;
@@ -655,62 +655,62 @@ impl Node {
             None => return Ok(()),
             Some(parent) => parent,
         };
 
         // Step 3.
         let viable_next_sibling = first_node_not_in(self.following_siblings(), &nodes);
 
         // Step 4.
-        let node = try!(self.owner_doc().node_from_nodes_and_strings(nodes));
+        let node = self.owner_doc().node_from_nodes_and_strings(nodes)?;
 
         // Step 5.
-        try!(Node::pre_insert(&node, &parent, viable_next_sibling.r()));
+        Node::pre_insert(&node, &parent, viable_next_sibling.r())?;
 
         Ok(())
     }
 
     // https://dom.spec.whatwg.org/#dom-childnode-replacewith
     pub fn replace_with(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
         // Step 1.
         let parent = if let Some(parent) = self.GetParentNode() {
             parent
         } else {
             // Step 2.
             return Ok(());
         };
         // Step 3.
         let viable_next_sibling = first_node_not_in(self.following_siblings(), &nodes);
         // Step 4.
-        let node = try!(self.owner_doc().node_from_nodes_and_strings(nodes));
+        let node = self.owner_doc().node_from_nodes_and_strings(nodes)?;
         if self.parent_node == Some(&*parent) {
             // Step 5.
-            try!(parent.ReplaceChild(&node, self));
+            parent.ReplaceChild(&node, self)?;
         } else {
             // Step 6.
-            try!(Node::pre_insert(&node, &parent, viable_next_sibling.r()));
+            Node::pre_insert(&node, &parent, viable_next_sibling.r())?;
         }
         Ok(())
     }
 
     // https://dom.spec.whatwg.org/#dom-parentnode-prepend
     pub fn prepend(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
         // Step 1.
         let doc = self.owner_doc();
-        let node = try!(doc.node_from_nodes_and_strings(nodes));
+        let node = doc.node_from_nodes_and_strings(nodes)?;
         // Step 2.
         let first_child = self.first_child.get();
         Node::pre_insert(&node, self, first_child.r()).map(|_| ())
     }
 
     // https://dom.spec.whatwg.org/#dom-parentnode-append
     pub fn append(&self, nodes: Vec<NodeOrString>) -> ErrorResult {
         // Step 1.
         let doc = self.owner_doc();
-        let node = try!(doc.node_from_nodes_and_strings(nodes));
+        let node = doc.node_from_nodes_and_strings(nodes)?;
         // Step 2.
         self.AppendChild(&node).map(|_| ())
     }
 
     // https://dom.spec.whatwg.org/#dom-parentnode-queryselector
     pub fn query_selector(&self, selectors: DOMString) -> Fallible<Option<Root<Element>>> {
         // Step 1.
         match SelectorParser::parse_author_origin_no_namespace(&selectors) {
@@ -746,17 +746,17 @@ impl Node {
             }
         }
     }
 
     // https://dom.spec.whatwg.org/#dom-parentnode-queryselectorall
     #[allow(unsafe_code)]
     pub fn query_selector_all(&self, selectors: DOMString) -> Fallible<Root<NodeList>> {
         let window = window_from_node(self);
-        let iter = try!(self.query_selector_iter(selectors));
+        let iter = self.query_selector_iter(selectors)?;
         Ok(NodeList::new_simple_list(&window, iter))
     }
 
     pub fn ancestors(&self) -> AncestorIterator {
         AncestorIterator {
             current: self.GetParentNode()
         }
     }
@@ -847,28 +847,28 @@ impl Node {
         }
 
         let tr = new_child();
 
 
         {
             let tr_node = tr.upcast::<Node>();
             if index == -1 {
-                try!(self.InsertBefore(tr_node, None));
+                self.InsertBefore(tr_node, None)?;
             } else {
                 let items = get_items();
                 let node = match items.elements_iter()
                                       .map(Root::upcast::<Node>)
                                       .map(Some)
                                       .chain(iter::once(None))
                                       .nth(index as usize) {
                     None => return Err(Error::IndexSize),
                     Some(node) => node,
                 };
-                try!(self.InsertBefore(tr_node, node.r()));
+                self.InsertBefore(tr_node, node.r())?;
             }
         }
 
         Ok(Root::upcast::<HTMLElement>(tr))
     }
 
     /// Used by `HTMLTableSectionElement::DeleteRow` and `HTMLTableRowElement::DeleteCell`
     pub fn delete_cell_or_row<F, G>(&self, index: i32, get_items: F, is_delete_type: G) -> ErrorResult
@@ -1561,17 +1561,17 @@ impl Node {
         }
         Ok(())
     }
 
     // https://dom.spec.whatwg.org/#concept-node-pre-insert
     pub fn pre_insert(node: &Node, parent: &Node, child: Option<&Node>)
                       -> Fallible<Root<Node>> {
         // Step 1.
-        try!(Node::ensure_pre_insertion_validity(node, parent, child));
+        Node::ensure_pre_insertion_validity(node, parent, child)?;
 
         // Steps 2-3.
         let reference_child_root;
         let reference_child = match child {
             Some(child) if child == node => {
                 reference_child_root = node.GetNextSibling();
                 reference_child_root.r()
             },
--- a/servo/components/script/dom/nodeiterator.rs
+++ b/servo/components/script/dom/nodeiterator.rs
@@ -102,32 +102,32 @@ impl NodeIteratorMethods for NodeIterato
         // Step 2.
         let mut before_node = self.pointer_before_reference_node.get();
 
         // Step 3-1.
         if before_node {
             before_node = false;
 
             // Step 3-2.
-            let result = try!(self.accept_node(&node));
+            let result = self.accept_node(&node)?;
 
             // Step 3-3.
             if result == NodeFilterConstants::FILTER_ACCEPT {
                 // Step 4.
                 self.reference_node.set(&node);
                 self.pointer_before_reference_node.set(before_node);
 
                 return Ok(Some(node));
             }
         }
 
         // Step 3-1.
         for following_node in node.following_nodes(&self.root_node) {
             // Step 3-2.
-            let result = try!(self.accept_node(&following_node));
+            let result = self.accept_node(&following_node)?;
 
             // Step 3-3.
             if result == NodeFilterConstants::FILTER_ACCEPT {
                 // Step 4.
                 self.reference_node.set(&following_node);
                 self.pointer_before_reference_node.set(before_node);
 
                 return Ok(Some(following_node));
@@ -146,32 +146,32 @@ impl NodeIteratorMethods for NodeIterato
         // Step 2.
         let mut before_node = self.pointer_before_reference_node.get();
 
         // Step 3-1.
         if !before_node {
             before_node = true;
 
             // Step 3-2.
-            let result = try!(self.accept_node(&node));
+            let result = self.accept_node(&node)?;
 
             // Step 3-3.
             if result == NodeFilterConstants::FILTER_ACCEPT {
                 // Step 4.
                 self.reference_node.set(&node);
                 self.pointer_before_reference_node.set(before_node);
 
                 return Ok(Some(node));
             }
         }
 
         // Step 3-1.
         for preceding_node in node.preceding_nodes(&self.root_node) {
             // Step 3-2.
-            let result = try!(self.accept_node(&preceding_node));
+            let result = self.accept_node(&preceding_node)?;
 
             // Step 3-3.
             if result == NodeFilterConstants::FILTER_ACCEPT {
                 // Step 4.
                 self.reference_node.set(&preceding_node);
                 self.pointer_before_reference_node.set(before_node);
 
                 return Ok(Some(preceding_node));
--- a/servo/components/script/dom/range.rs
+++ b/servo/components/script/dom/range.rs
@@ -264,51 +264,51 @@ impl RangeMethods for Range {
                 self.set_start(node, offset);
             }
             Ok(())
         }
     }
 
     // https://dom.spec.whatwg.org/#dom-range-setstartbefore
     fn SetStartBefore(&self, node: &Node) -> ErrorResult {
-        let parent = try!(node.GetParentNode().ok_or(Error::InvalidNodeType));
+        let parent = node.GetParentNode().ok_or(Error::InvalidNodeType)?;
         self.SetStart(&parent, node.index())
     }
 
     // https://dom.spec.whatwg.org/#dom-range-setstartafter
     fn SetStartAfter(&self, node: &Node) -> ErrorResult {
-        let parent = try!(node.GetParentNode().ok_or(Error::InvalidNodeType));
+        let parent = node.GetParentNode().ok_or(Error::InvalidNodeType)?;
         self.SetStart(&parent, node.index() + 1)
     }
 
     // https://dom.spec.whatwg.org/#dom-range-setendbefore
     fn SetEndBefore(&self, node: &Node) -> ErrorResult {
-        let parent = try!(node.GetParentNode().ok_or(Error::InvalidNodeType));
+        let parent = node.GetParentNode().ok_or(Error::InvalidNodeType)?;
         self.SetEnd(&parent, node.index())
     }
 
     // https://dom.spec.whatwg.org/#dom-range-setendafter
     fn SetEndAfter(&self, node: &Node) -> ErrorResult {
-        let parent = try!(node.GetParentNode().ok_or(Error::InvalidNodeType));
+        let parent = node.GetParentNode().ok_or(Error::InvalidNodeType)?;
         self.SetEnd(&parent, node.index() + 1)
     }
 
     // https://dom.spec.whatwg.org/#dom-range-collapse
     fn Collapse(&self, to_start: bool) {
         if to_start {
             self.set_end(&self.StartContainer(), self.StartOffset());
         } else {
             self.set_start(&self.EndContainer(), self.EndOffset());
         }
     }
 
     // https://dom.spec.whatwg.org/#dom-range-selectnode
     fn SelectNode(&self, node: &Node) -> ErrorResult {
         // Steps 1, 2.
-        let parent = try!(node.GetParentNode().ok_or(Error::InvalidNodeType));
+        let parent = node.GetParentNode().ok_or(Error::InvalidNodeType)?;
         // Step 3.
         let index = node.index();
         // Step 4.
         self.set_start(&parent, index);
         // Step 5.
         self.set_end(&parent, index + 1);
         Ok(())
     }
@@ -441,85 +441,85 @@ impl RangeMethods for Range {
         }
 
         if end_node == start_node {
             if let Some(cdata) = start_node.downcast::<CharacterData>() {
                 // Steps 4.1-2.
                 let data = cdata.SubstringData(start_offset, end_offset - start_offset).unwrap();
                 let clone = cdata.clone_with_data(data, &start_node.owner_doc());
                 // Step 4.3.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 4.4
                 return Ok(fragment);
             }
         }
 
         // Steps 5-12.
         let (first_contained_child, last_contained_child, contained_children) =
-            try!(self.contained_children());
+            self.contained_children()?;
 
         if let Some(child) = first_contained_child {
             // Step 13.
             if let Some(cdata) = child.downcast::<CharacterData>() {
                 assert!(child == start_node);
                 // Steps 13.1-2.
                 let data = cdata.SubstringData(start_offset, start_node.len() - start_offset).unwrap();
                 let clone = cdata.clone_with_data(data, &start_node.owner_doc());
                 // Step 13.3.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
             } else {
                 // Step 14.1.
                 let clone = child.CloneNode(false);
                 // Step 14.2.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 14.3.
                 let subrange = Range::new(&clone.owner_doc(),
                                           &start_node,
                                           start_offset,
                                           &child,
                                           child.len());
                 // Step 14.4.
-                let subfragment = try!(subrange.CloneContents());
+                let subfragment = subrange.CloneContents()?;
                 // Step 14.5.
-                try!(clone.AppendChild(subfragment.upcast()));
+                clone.AppendChild(subfragment.upcast())?;
             }
         }
 
         // Step 15.
         for child in contained_children {
             // Step 15.1.
             let clone = child.CloneNode(true);
             // Step 15.2.
-            try!(fragment.upcast::<Node>().AppendChild(&clone));
+            fragment.upcast::<Node>().AppendChild(&clone)?;
         }
 
         if let Some(child) = last_contained_child {
             // Step 16.
             if let Some(cdata) = child.downcast::<CharacterData>() {
                 assert!(child == end_node);
                 // Steps 16.1-2.
                 let data = cdata.SubstringData(0, end_offset).unwrap();
                 let clone = cdata.clone_with_data(data, &start_node.owner_doc());
                 // Step 16.3.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
             } else {
                 // Step 17.1.
                 let clone = child.CloneNode(false);
                 // Step 17.2.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 17.3.
                 let subrange = Range::new(&clone.owner_doc(),
                                           &child,
                                           0,
                                           &end_node,
                                           end_offset);
                 // Step 17.4.
-                let subfragment = try!(subrange.CloneContents());
+                let subfragment = subrange.CloneContents()?;
                 // Step 17.5.
-                try!(clone.AppendChild(subfragment.upcast()));
+                clone.AppendChild(subfragment.upcast())?;
             }
         }
 
         // Step 18.
         Ok(fragment)
     }
 
     // https://dom.spec.whatwg.org/#dom-range-extractcontents
@@ -542,29 +542,29 @@ impl RangeMethods for Range {
         if end_node == start_node {
             if let Some(end_data) = end_node.downcast::<CharacterData>() {
                 // Step 4.1.
                 let clone = end_node.CloneNode(true);
                 // Step 4.2.
                 let text = end_data.SubstringData(start_offset, end_offset - start_offset);
                 clone.downcast::<CharacterData>().unwrap().SetData(text.unwrap());
                 // Step 4.3.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 4.4.
-                try!(end_data.ReplaceData(start_offset,
+                end_data.ReplaceData(start_offset,
                                           end_offset - start_offset,
-                                          DOMString::new()));
+                                          DOMString::new())?;
                 // Step 4.5.
                 return Ok(fragment);
             }
         }
 
         // Steps 5-12.
         let (first_contained_child, last_contained_child, contained_children) =
-            try!(self.contained_children());
+            self.contained_children()?;
 
         let (new_node, new_offset) = if start_node.is_inclusive_ancestor_of(&end_node) {
             // Step 13.
             (Root::from_ref(&*start_node), start_offset)
         } else {
             // Step 14.1-2.
             let reference_node = start_node.ancestors()
                                            .take_while(|n| !n.is_inclusive_ancestor_of(&end_node))
@@ -579,77 +579,77 @@ impl RangeMethods for Range {
                 assert!(child == start_node);
                 // Step 15.1.
                 let clone = start_node.CloneNode(true);
                 // Step 15.2.
                 let text = start_data.SubstringData(start_offset,
                                                     start_node.len() - start_offset);
                 clone.downcast::<CharacterData>().unwrap().SetData(text.unwrap());
                 // Step 15.3.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 15.4.
-                try!(start_data.ReplaceData(start_offset,
+                start_data.ReplaceData(start_offset,
                                             start_node.len() - start_offset,
-                                            DOMString::new()));
+                                            DOMString::new())?;
             } else {
                 // Step 16.1.
                 let clone = child.CloneNode(false);
                 // Step 16.2.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 16.3.
                 let subrange = Range::new(&clone.owner_doc(),
                                           &start_node,
                                           start_offset,
                                           &child,
                                           child.len());
                 // Step 16.4.
-                let subfragment = try!(subrange.ExtractContents());
+                let subfragment = subrange.ExtractContents()?;
                 // Step 16.5.
-                try!(clone.AppendChild(subfragment.upcast()));
+                clone.AppendChild(subfragment.upcast())?;
             }
         }
 
         // Step 17.
         for child in contained_children {
-            try!(fragment.upcast::<Node>().AppendChild(&child));
+            fragment.upcast::<Node>().AppendChild(&child)?;
         }
 
         if let Some(child) = last_contained_child {
             if let Some(end_data) = child.downcast::<CharacterData>() {
                 assert!(child == end_node);
                 // Step 18.1.
                 let clone = end_node.CloneNode(true);
                 // Step 18.2.
                 let text = end_data.SubstringData(0, end_offset);
                 clone.downcast::<CharacterData>().unwrap().SetData(text.unwrap());
                 // Step 18.3.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 18.4.
-                try!(end_data.ReplaceData(0, end_offset, DOMString::new()));
+                end_data.ReplaceData(0, end_offset, DOMString::new())?;
             } else {
                 // Step 19.1.
                 let clone = child.CloneNode(false);
                 // Step 19.2.
-                try!(fragment.upcast::<Node>().AppendChild(&clone));
+                fragment.upcast::<Node>().AppendChild(&clone)?;
                 // Step 19.3.
                 let subrange = Range::new(&clone.owner_doc(),
                                           &child,
                                           0,
                                           &end_node,
                                           end_offset);
                 // Step 19.4.
-                let subfragment = try!(subrange.ExtractContents());
+                let subfragment = subrange.ExtractContents()?;
                 // Step 19.5.
-                try!(clone.AppendChild(subfragment.upcast()));
+                clone.AppendChild(subfragment.upcast())?;
             }
         }
 
         // Step 20.
-        try!(self.SetStart(&new_node, new_offset));
-        try!(self.SetEnd(&new_node, new_offset));
+        self.SetStart(&new_node, new_offset)?;
+        self.SetEnd(&new_node, new_offset)?;
 
         // Step 21.
         Ok(fragment)
     }
 
     // https://dom.spec.whatwg.org/#dom-range-detach
     fn Detach(&self) {
         // This method intentionally left blank.
@@ -685,26 +685,26 @@ impl RangeMethods for Range {
                 (Some(Root::from_ref(&*start_node)), parent)
             } else {
                 // Steps 4-5.
                 let child = start_node.ChildNodes().Item(start_offset);
                 (child, Root::from_ref(&*start_node))
             };
 
         // Step 6.
-        try!(Node::ensure_pre_insertion_validity(node,
+        Node::ensure_pre_insertion_validity(node,
                                                  &parent,
-                                                 reference_node.r()));
+                                                 reference_node.r())?;
 
         // Step 7.
         let split_text;
         let reference_node =
             match start_node.downcast::<Text>() {
                 Some(text) => {
-                    split_text = try!(text.SplitText(start_offset));
+                    split_text = text.SplitText(start_offset)?;
                     let new_reference = Root::upcast::<Node>(split_text);
                     assert!(new_reference.GetParentNode().r() == Some(&parent));
                     Some(new_reference)
                 },
                 _ => reference_node
             };
 
         // Step 8.
@@ -724,17 +724,17 @@ impl RangeMethods for Range {
         // Step 11
         let new_offset = new_offset + if node.type_id() == NodeTypeId::DocumentFragment {
             node.len()
         } else {
             1
         };
 
         // Step 12.
-        try!(Node::pre_insert(node, &parent, reference_node.r()));
+        Node::pre_insert(node, &parent, reference_node.r())?;
 
         // Step 13.
         if self.Collapsed() {
             self.set_end(&parent, new_offset);
         }
 
         Ok(())
     }
@@ -834,26 +834,26 @@ impl RangeMethods for Range {
         match new_parent.type_id() {
             NodeTypeId::Document(_) |
             NodeTypeId::DocumentType |
             NodeTypeId::DocumentFragment => return Err(Error::InvalidNodeType),
             _ => ()
         }
 
         // Step 3.
-        let fragment = try!(self.ExtractContents());
+        let fragment = self.ExtractContents()?;
 
         // Step 4.
         Node::replace_all(None, new_parent);
 
         // Step 5.
-        try!(self.InsertNode(new_parent));
+        self.InsertNode(new_parent)?;
 
         // Step 6.
-        try!(new_parent.AppendChild(fragment.upcast()));
+        new_parent.AppendChild(fragment.upcast())?;
 
         // Step 7.
         self.SelectNode(new_parent)
     }
 
     // https://dom.spec.whatwg.org/#dom-range-stringifier
     fn Stringifier(&self) -> DOMString {
         let start_node = self.StartContainer();
@@ -910,17 +910,17 @@ impl RangeMethods for Range {
             NodeTypeId::CharacterData(CharacterDataTypeId::ProcessingInstruction) |
             NodeTypeId::DocumentType => unreachable!(),
         };
 
         // Step 2.
         let element = Element::fragment_parsing_context(&owner_doc, element.r());
 
         // Step 3.
-        let fragment_node = try!(element.parse_fragment(fragment));
+        let fragment_node = element.parse_fragment(fragment)?;
 
         // Step 4.
         for node in fragment_node.upcast::<Node>().traverse_preorder() {
             if let Some(script) = node.downcast::<HTMLScriptElement>() {
                 script.set_already_started(false);
                 script.set_parser_inserted(false);
             }
         }
--- a/servo/components/script/dom/request.rs
+++ b/servo/components/script/dom/request.rs
@@ -303,22 +303,22 @@ impl Request {
 
         // Step 28
         if let Some(possible_header) = init.headers.as_ref() {
             match possible_header {
                 &HeadersInit::Headers(ref init_headers) => {
                     headers_copy = Root::from_ref(&*init_headers);
                 }
                 &HeadersInit::ByteStringSequenceSequence(ref init_sequence) => {
-                    try!(headers_copy.fill(Some(
-                        HeadersInit::ByteStringSequenceSequence(init_sequence.clone()))));
+                    headers_copy.fill(Some(
+                        HeadersInit::ByteStringSequenceSequence(init_sequence.clone())))?;
                 },
                 &HeadersInit::StringByteStringRecord(ref init_map) => {
-                    try!(headers_copy.fill(Some(
-                        HeadersInit::StringByteStringRecord(init_map.clone()))));
+                    headers_copy.fill(Some(
+                        HeadersInit::StringByteStringRecord(init_map.clone())))?;
                 },
             }
         }
 
         // Step 29
         // We cannot empty `r.Headers().header_list` because
         // we would undo the Step 27 above.  One alternative is to set
         // `headers_copy` as a deep copy of `r.Headers()`. However,
@@ -346,20 +346,20 @@ impl Request {
         // Step 31
         match init.headers {
             None => {
                 // This is equivalent to the specification's concept of
                 // "associated headers list". If an init headers is not given,
                 // but an input with headers is given, set request's
                 // headers as the input's Headers.
                 if let RequestInfo::Request(ref input_request) = input {
-                    try!(r.Headers().fill(Some(HeadersInit::Headers(input_request.Headers()))));
+                    r.Headers().fill(Some(HeadersInit::Headers(input_request.Headers())))?;
                 }
             },
-            Some(HeadersInit::Headers(_)) => try!(r.Headers().fill(Some(HeadersInit::Headers(headers_copy)))),
+            Some(HeadersInit::Headers(_)) => r.Headers().fill(Some(HeadersInit::Headers(headers_copy)))?,
             _ => {},
         }
 
         // Step 32
         let mut input_body = if let RequestInfo::Request(ref input_request) = input {
             let input_request_request = input_request.request.borrow();
             input_request_request.body.clone()
         } else {
@@ -386,18 +386,18 @@ impl Request {
             // Step 34.2
             let extracted_body_tmp = init_body.extract();
             input_body = Some(extracted_body_tmp.0);
             let content_type = extracted_body_tmp.1;
 
             // Step 34.3
             if let Some(contents) = content_type {
                 if !r.Headers().Has(ByteString::new(b"Content-Type".to_vec())).unwrap() {
-                    try!(r.Headers().Append(ByteString::new(b"Content-Type".to_vec()),
-                                            ByteString::new(contents.as_bytes().to_vec())));
+                    r.Headers().Append(ByteString::new(b"Content-Type".to_vec()),
+                                            ByteString::new(contents.as_bytes().to_vec()))?;
                 }
             }
         }
 
         // Step 35
         r.request.borrow_mut().body = input_body;
 
         // Step 36
@@ -441,17 +441,17 @@ impl Request {
         r_clone.request.borrow_mut().pipeline_id = req.pipeline_id;
         {
             let mut borrowed_r_request = r_clone.request.borrow_mut();
             borrowed_r_request.origin = req.origin.clone();
         }
         *r_clone.request.borrow_mut() = req.clone();
         r_clone.body_used.set(body_used);
         *r_clone.mime_type.borrow_mut() = mime_type;
-        try!(r_clone.Headers().fill(Some(HeadersInit::Headers(r.Headers()))));
+        r_clone.Headers().fill(Some(HeadersInit::Headers(r.Headers())))?;
         r_clone.Headers().set_guard(headers_guard);
         Ok(r_clone)
     }
 
     pub fn get_request(&self) -> NetTraitsRequest {
         self.request.borrow().clone()
     }
 }
--- a/servo/components/script/dom/response.rs
+++ b/servo/components/script/dom/response.rs
@@ -96,17 +96,17 @@ impl Response {
         *r.raw_status.borrow_mut() = Some((init.status, init.statusText.clone().into()));
 
         // Step 6
         if let Some(ref headers_member) = init.headers {
             // Step 6.1
             r.Headers().empty_header_list();
 
             // Step 6.2
-            try!(r.Headers().fill(Some(headers_member.clone())));
+            r.Headers().fill(Some(headers_member.clone()))?;
         }
 
         // Step 7
         if let Some(ref body) = body {
             // Step 7.1
             if is_null_body_status(init.status) {
                 return Err(Error::Type(
                     "Body is non-null but init's status member is a null body status".to_string()));
@@ -114,18 +114,18 @@ impl Response {
 
             // Step 7.3
             let (extracted_body, content_type) = body.extract();
             *r.body.borrow_mut() = NetTraitsResponseBody::Done(extracted_body);
 
             // Step 7.4
             if let Some(content_type_contents) = content_type {
                 if !r.Headers().Has(ByteString::new(b"Content-Type".to_vec())).unwrap() {
-                    try!(r.Headers().Append(ByteString::new(b"Content-Type".to_vec()),
-                                            ByteString::new(content_type_contents.as_bytes().to_vec())));
+                    r.Headers().Append(ByteString::new(b"Content-Type".to_vec()),
+                                            ByteString::new(content_type_contents.as_bytes().to_vec()))?;
                 }
             };
         }
 
         // Step 8
         *r.mime_type.borrow_mut() = r.Headers().extract_mime_type();
 
         // Step 9
@@ -169,17 +169,17 @@ impl Response {
         let r = Response::new(global);
 
         // Step 5
         *r.status.borrow_mut() = Some(StatusCode::from_u16(status));
         *r.raw_status.borrow_mut() = Some((status, b"".to_vec()));
 
         // Step 6
         let url_bytestring = ByteString::from_str(url.as_str()).unwrap_or(ByteString::new(b"".to_vec()));
-        try!(r.Headers().Set(ByteString::new(b"Location".to_vec()), url_bytestring));
+        r.Headers().Set(ByteString::new(b"Location".to_vec()), url_bytestring)?;
 
         // Step 4 continued
         // Headers Guard is set to Immutable here to prevent error in Step 6
         r.Headers().set_guard(Guard::Immutable);
 
         // Step 7
         Ok(r)
     }
@@ -300,17 +300,17 @@ impl ResponseMethods for Response {
         // Step 1
         if self.is_locked() || self.body_used.get() {
             return Err(Error::Type("cannot clone a disturbed response".to_string()));
         }
 
         // Step 2
         let new_response = Response::new(&self.global());
         new_response.Headers().set_guard(self.Headers().get_guard());
-        try!(new_response.Headers().fill(Some(HeadersInit::Headers(self.Headers()))));
+        new_response.Headers().fill(Some(HeadersInit::Headers(self.Headers())))?;
 
         // https://fetch.spec.whatwg.org/#concept-response-clone
         // Instead of storing a net_traits::Response internally, we
         // only store the relevant fields, and only clone them here
         *new_response.response_type.borrow_mut() = self.response_type.borrow().clone();
         *new_response.status.borrow_mut() = self.status.borrow().clone();
         *new_response.raw_status.borrow_mut() = self.raw_status.borrow().clone();
         *new_response.url.borrow_mut() = self.url.borrow().clone();
--- a/servo/components/script/dom/serviceworker.rs
+++ b/servo/components/script/dom/serviceworker.rs
@@ -84,17 +84,17 @@ impl ServiceWorkerMethods for ServiceWor
     #[allow(unsafe_code)]
     // https://w3c.github.io/ServiceWorker/#service-worker-postmessage
     unsafe fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
         // Step 1
         if let ServiceWorkerState::Redundant = self.state.get() {
             return Err(Error::InvalidState);
         }
         // Step 7
-        let data = try!(StructuredCloneData::write(cx, message));
+        let data = StructuredCloneData::write(cx, message)?;
         let msg_vec = DOMMessage(data.move_to_arraybuffer());
         let _ =
             self.global()
                 .constellation_chan()
                 .send(ScriptMsg::ForwardDOMMessage(msg_vec, self.scope_url.clone()));
         Ok(())
     }
 
--- a/servo/components/script/dom/serviceworkerglobalscope.rs
+++ b/servo/components/script/dom/serviceworkerglobalscope.rs
@@ -298,21 +298,21 @@ impl ServiceWorkerGlobalScope {
             if scope.from_devtools_sender().is_some() {
                 devtools_handle.add();
             }
             timer_port_handle.add();
         }
 
         let ret = sel.wait();
         if ret == worker_handle.id() {
-            Ok(MixedMessage::FromServiceWorker(try!(worker_port.recv())))
+            Ok(MixedMessage::FromServiceWorker(worker_port.recv()?))
         }else if ret == devtools_handle.id() {
-            Ok(MixedMessage::FromDevtools(try!(devtools_port.recv())))
+            Ok(MixedMessage::FromDevtools(devtools_port.recv()?))
         } else if ret == timer_port_handle.id() {
-            Ok(MixedMessage::FromTimeoutThread(try!(timer_event_port.recv())))
+            Ok(MixedMessage::FromTimeoutThread(timer_event_port.recv()?))
         } else {
             panic!("unexpected select result!")
         }
     }
 
     pub fn process_event(&self, msg: CommonScriptMsg) {
         self.handle_script_event(ServiceWorkerScriptMsg::CommonWorker(WorkerScriptMsg::Common(msg)));
     }
--- a/servo/components/script/dom/servoparser/html.rs
+++ b/servo/components/script/dom/servoparser/html.rs
@@ -130,39 +130,39 @@ impl<'a> Serialize for &'a Node {
                                                   attr.local_name().clone());
                         let value = attr.value().clone();
                         (qname, value)
                     }).collect::<Vec<_>>();
                     let attr_refs = attrs.iter().map(|&(ref qname, ref value)| {
                         let ar: AttrRef = (&qname, &**value);
                         ar
                     });
-                    try!(serializer.start_elem(name.clone(), attr_refs));
+                    serializer.start_elem(name.clone(), attr_refs)?;
                 }
 
                 let children = if let Some(tpl) = node.downcast::<HTMLTemplateElement>() {
                     // https://github.com/w3c/DOM-Parsing/issues/1
                     tpl.Content().upcast::<Node>().children()
                 } else {
                     node.children()
                 };
 
                 for handle in children {
-                    try!((&*handle).serialize(serializer, IncludeNode));
+                    (&*handle).serialize(serializer, IncludeNode)?;
                 }
 
                 if traversal_scope == IncludeNode {
-                    try!(serializer.end_elem(name.clone()));
+                    serializer.end_elem(name.clone())?;
                 }
                 Ok(())
             },
 
             (ChildrenOnly, NodeTypeId::Document(_)) => {
                 for handle in node.children() {
-                    try!((&*handle).serialize(serializer, IncludeNode));
+                    (&*handle).serialize(serializer, IncludeNode)?;
                 }
                 Ok(())
             },
 
             (ChildrenOnly, _) => Ok(()),
 
             (IncludeNode, NodeTypeId::DocumentType) => {
                 let doctype = node.downcast::<DocumentType>().unwrap();
--- a/servo/components/script/dom/treewalker.rs
+++ b/servo/components/script/dom/treewalker.rs
@@ -99,17 +99,17 @@ impl TreeWalkerMethods for TreeWalker {
         // "2. While node is not null and is not root, run these substeps:"
         while !self.is_root_node(&node) {
             // "1. Let node be node's parent."
             match node.GetParentNode() {
                 Some(n) => {
                     node = n;
                     // "2. If node is not null and filtering node returns FILTER_ACCEPT,
                     //     then set the currentNode attribute to node, return node."
-                    if NodeFilterConstants::FILTER_ACCEPT == try!(self.accept_node(&node)) {
+                    if NodeFilterConstants::FILTER_ACCEPT == self.accept_node(&node)? {
                         self.current_node.set(&node);
                         return Ok(Some(node))
                     }
                 },
                 None => break,
             }
         }
         // "3. Return null."
@@ -158,17 +158,17 @@ impl TreeWalkerMethods for TreeWalker {
                 node = sibling_op.unwrap();
                 // "2. Filter node and let result be the return value."
                 // "3. While result is not FILTER_REJECT and node has a child,
                 //     set node to its last child and then filter node and
                 //     set result to the return value."
                 // "4. If result is FILTER_ACCEPT, then
                 //     set the currentNode attribute to node and return node."
                 loop {
-                    let result = try!(self.accept_node(&node));
+                    let result = self.accept_node(&node)?;
                     match result {
                         NodeFilterConstants::FILTER_REJECT => break,
                         _ if node.GetFirstChild().is_some() =>
                             node = node.GetLastChild().unwrap(),
                         NodeFilterConstants::FILTER_ACCEPT => {
                             self.current_node.set(&node);
                             return Ok(Some(node))
                         },
@@ -187,17 +187,17 @@ impl TreeWalkerMethods for TreeWalker {
                 None =>
                     // This can happen if the user set the current node to somewhere
                     // outside of the tree rooted at the original root.
                     return Ok(None),
                 Some(n) => node = n
             }
             // "5. Filter node and if the return value is FILTER_ACCEPT, then
             //     set the currentNode attribute to node and return node."
-            if NodeFilterConstants::FILTER_ACCEPT == try!(self.accept_node(&node)) {
+            if NodeFilterConstants::FILTER_ACCEPT == self.accept_node(&node)? {
                 self.current_node.set(&node);
                 return Ok(Some(node))
             }
         }
         // "6. Return null."
         Ok(None)
     }
 
@@ -215,17 +215,17 @@ impl TreeWalkerMethods for TreeWalker {
                     break;
                 }
                 match node.GetFirstChild() {
                     None => break,
                     Some(child) => {
                         // "1. Set node to its first child."
                         node = child;
                         // "2. Filter node and set result to the return value."
-                        result = try!(self.accept_node(&node));
+                        result = self.accept_node(&node)?;
                         // "3. If result is FILTER_ACCEPT, then
                         //     set the currentNode attribute to node and return node."
                         if NodeFilterConstants::FILTER_ACCEPT == result {
                             self.current_node.set(&node);
                             return Ok(Some(node))
                         }
                     }
                 }
@@ -233,17 +233,17 @@ impl TreeWalkerMethods for TreeWalker {
             // "2. If a node is following node and is not following root,
             //     set node to the first such node."
             // "Otherwise, return null."
             match self.first_following_node_not_following_root(&node) {
                 None => return Ok(None),
                 Some(n) => {
                     node = n;
                     // "3. Filter node and set result to the return value."
-                    result = try!(self.accept_node(&node));
+                    result = self.accept_node(&node)?;
                     // "4. If result is FILTER_ACCEPT, then
                     //     set the currentNode attribute to node and return node."
                     if NodeFilterConstants::FILTER_ACCEPT == result {
                         self.current_node.set(&node);
                         return Ok(Some(node))
                     }
                 }
             }
@@ -270,17 +270,17 @@ impl TreeWalker {
         let mut node = match next_child(&cur) {
             Some(node) => node,
             None => return Ok(None),
         };
 
         // 4. Main: Repeat these substeps:
         'main: loop {
             // "1. Filter node and let result be the return value."
-            let result = try!(self.accept_node(&node));
+            let result = self.accept_node(&node)?;
             match result {
                 // "2. If result is FILTER_ACCEPT, then set the currentNode
                 //     attribute to node and return node."
                 NodeFilterConstants::FILTER_ACCEPT => {
                     self.current_node.set(&node);
                     return Ok(Some(Root::from_ref(&node)))
                 },
                 // "3. If result is FILTER_SKIP, run these subsubsteps:"
@@ -345,17 +345,17 @@ impl TreeWalker {
             // "1. Let sibling be node's next sibling if type is next,
             //  and node's previous sibling if type is previous."
             let mut sibling_op = next_sibling(&node);
             // "2. While sibling is not null, run these subsubsteps:"
             while sibling_op.is_some() {
                 // "1. Set node to sibling."
                 node = sibling_op.unwrap();
                 // "2. Filter node and let result be the return value."
-                let result = try!(self.accept_node(&node));
+                let result = self.accept_node(&node)?;
                 // "3. If result is FILTER_ACCEPT, then set the currentNode
                 //     attribute to node and return node."
                 if NodeFilterConstants::FILTER_ACCEPT == result {
                     self.current_node.set(&node);
                     return Ok(Some(node))
                 }
 
                 // "4. Set sibling to node's first child if type is next,
@@ -373,17 +373,17 @@ impl TreeWalker {
             // "3. Set node to its parent."
             match node.GetParentNode() {
                 // "4. If node is null or is root, return null."
                 None => return Ok(None),
                 Some(ref n) if self.is_root_node(&n) => return Ok(None),
                 // "5. Filter node and if the return value is FILTER_ACCEPT, then return null."
                 Some(n) => {
                     node = n;
-                    if NodeFilterConstants::FILTER_ACCEPT == try!(self.accept_node(&node)) {
+                    if NodeFilterConstants::FILTER_ACCEPT == self.accept_node(&node)? {
                         return Ok(None)
                     }
                 }
             }
             // "6. Run these substeps again."
         }
     }
 
--- a/servo/components/script/dom/vrdisplay.rs
+++ b/servo/components/script/dom/vrdisplay.rs
@@ -631,15 +631,15 @@ fn parse_bounds(src: &Option<Vec<Finite<
 }
 
 fn validate_layer(cx: *mut JSContext,
                   layer: &VRLayer)
                   -> Result<(WebVRLayer, Root<WebGLRenderingContext>), &'static str> {
     let ctx = layer.source.as_ref().map(|ref s| s.get_or_init_webgl_context(cx, None)).unwrap_or(None);
     if let Some(ctx) = ctx {
         let mut data = WebVRLayer::default();
-        try!(parse_bounds(&layer.leftBounds, &mut data.left_bounds));
-        try!(parse_bounds(&layer.rightBounds, &mut data.right_bounds));
+        parse_bounds(&layer.leftBounds, &mut data.left_bounds)?;
+        parse_bounds(&layer.rightBounds, &mut data.right_bounds)?;
         Ok((data, ctx))
     } else {
         Err("VRLayer source must be a WebGL Context")
     }
 }
--- a/servo/components/script/dom/webgl_validations/tex_image_2d.rs
+++ b/servo/components/script/dom/webgl_validations/tex_image_2d.rs
@@ -280,17 +280,17 @@ impl<'a> WebGLValidator for TexImage2DVa
         let CommonTexImage2DValidatorResult {
             texture,
             target,
             level,
             internal_format,
             width,
             height,
             border,
-        } = try!(self.common_validator.validate());
+        } = self.common_validator.validate()?;
 
         // GL_INVALID_VALUE is generated if target is one of the six cube map 2D
         // image targets and the width and height parameters are not equal.
         if target.is_cubic() && width != height {
             context.webgl_error(InvalidValue);
             return Err(TexImageValidationError::InvalidCubicTextureDimensions);
         }
 
--- a/servo/components/script/dom/webglrenderingcontext.rs
+++ b/servo/components/script/dom/webglrenderingcontext.rs
@@ -1491,17 +1491,17 @@ impl WebGLRenderingContextMethods for We
     unsafe fn BufferData(&self, cx: *mut JSContext, target: u32, data: *mut JSObject, usage: u32) -> Fallible<()> {
         if data.is_null() {
             return Ok(self.webgl_error(InvalidValue));
         }
 
         typedarray!(in(cx) let array_buffer: ArrayBuffer = data);
         let data_vec = match array_buffer {
             Ok(mut data) => data.as_slice().to_vec(),
-            Err(_) => try!(fallible_array_buffer_view_to_vec(cx, data)),
+            Err(_) => fallible_array_buffer_view_to_vec(cx, data)?,
         };
 
         let bound_buffer = match target {
             constants::ARRAY_BUFFER => self.bound_buffer_array.get(),
             constants::ELEMENT_ARRAY_BUFFER => self.bound_buffer_element_array.get(),
             _ => return Ok(self.webgl_error(InvalidEnum)),
         };
 
@@ -1559,17 +1559,17 @@ impl WebGLRenderingContextMethods for We
     unsafe fn BufferSubData(&self, cx: *mut JSContext, target: u32, offset: i64, data: *mut JSObject) -> Fallible<()> {
         if data.is_null() {
             return Ok(self.webgl_error(InvalidValue));
         }
 
         typedarray!(in(cx) let array_buffer: ArrayBuffer = data);
         let data_vec = match array_buffer {
             Ok(mut data) => data.as_slice().to_vec(),
-            Err(_) => try!(fallible_array_buffer_view_to_vec(cx, data)),
+            Err(_) => fallible_array_buffer_view_to_vec(cx, data)?,
         };
 
         let bound_buffer = match target {
             constants::ARRAY_BUFFER => self.bound_buffer_array.get(),
             constants::ELEMENT_ARRAY_BUFFER => self.bound_buffer_element_array.get(),
             _ => return Ok(self.webgl_error(InvalidEnum)),
         };
 
@@ -1591,29 +1591,29 @@ impl WebGLRenderingContextMethods for We
 
         Ok(())
     }
 
     #[allow(unsafe_code)]
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
     unsafe fn CompressedTexImage2D(&self, cx: *mut JSContext, _target: u32, _level: i32, _internal_format: u32,
                             _width: i32, _height: i32, _border: i32, pixels: *mut JSObject) -> Fallible<()> {
-        let _data = try!(fallible_array_buffer_view_to_vec(cx, pixels) );
+        let _data = fallible_array_buffer_view_to_vec(cx, pixels)?;
         // FIXME: No compressed texture format is currently supported, so error out as per
         // https://www.khronos.org/registry/webgl/specs/latest/1.0/#COMPRESSED_TEXTURE_SUPPORT
         self.webgl_error(InvalidEnum);
         Ok(())
     }
 
     #[allow(unsafe_code)]
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
     unsafe fn CompressedTexSubImage2D(&self, cx: *mut JSContext, _target: u32, _level: i32,
                                _xoffset: i32, _yoffset: i32, _width: i32, _height: i32,
                                _format: u32, pixels: *mut JSObject) -> Fallible<()> {
-        let _data = try!(fallible_array_buffer_view_to_vec(cx, pixels));
+        let _data = fallible_array_buffer_view_to_vec(cx, pixels)?;
         // FIXME: No compressed texture format is currently supported, so error out as per
         // https://www.khronos.org/registry/webgl/specs/latest/1.0/#COMPRESSED_TEXTURE_SUPPORT
         self.webgl_error(InvalidEnum);
 
         Ok(())
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.8
@@ -2677,17 +2677,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform1iv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default));
+        let data_vec = typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default)?;
 
         if self.validate_uniform_parameters(uniform, UniformSetterType::Int, &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform1iv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
 
         Ok(())
@@ -2695,17 +2695,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform1fv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
 
         if self.validate_uniform_parameters(uniform, UniformSetterType::Float, &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform1fv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
 
         Ok(())
@@ -2724,17 +2724,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform2fv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
 
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::FloatVec2,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform2fv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
@@ -2757,17 +2757,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform2iv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default));
+        let data_vec = typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default)?;
 
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::IntVec2,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform2iv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
@@ -2790,17 +2790,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform3fv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
 
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::FloatVec3,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform3fv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
@@ -2823,17 +2823,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform3iv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default));
+        let data_vec = typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default)?;
 
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::IntVec3,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform3iv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
@@ -2857,17 +2857,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform4iv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default));
+        let data_vec = typed_array_or_sequence_to_vec::<Int32>(cx, data, ConversionBehavior::Default)?;
 
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::IntVec4,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform4iv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
@@ -2890,17 +2890,17 @@ impl WebGLRenderingContextMethods for We
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn Uniform4fv(&self,
                   cx: *mut JSContext,
                   uniform: Option<&WebGLUniformLocation>,
                   data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
 
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::FloatVec4,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::Uniform4fv(uniform.unwrap().id(), data_vec)))
                 .unwrap()
         }
@@ -2911,17 +2911,17 @@ impl WebGLRenderingContextMethods for We
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn UniformMatrix2fv(&self,
                         cx: *mut JSContext,
                         uniform: Option<&WebGLUniformLocation>,
                         transpose: bool,
                         data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::FloatMat2,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::UniformMatrix2fv(uniform.unwrap().id(), transpose, data_vec)))
                 .unwrap()
         }
 
@@ -2931,17 +2931,17 @@ impl WebGLRenderingContextMethods for We
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn UniformMatrix3fv(&self,
                         cx: *mut JSContext,
                         uniform: Option<&WebGLUniformLocation>,
                         transpose: bool,
                         data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::FloatMat3,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::UniformMatrix3fv(uniform.unwrap().id(), transpose, data_vec)))
                 .unwrap()
         }
 
@@ -2951,17 +2951,17 @@ impl WebGLRenderingContextMethods for We
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn UniformMatrix4fv(&self,
                         cx: *mut JSContext,
                         uniform: Option<&WebGLUniformLocation>,
                         transpose: bool,
                         data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
         if self.validate_uniform_parameters(uniform,
                                             UniformSetterType::FloatMat4,
                                             &data_vec) {
             self.ipc_renderer
                 .send(CanvasMsg::WebGL(WebGLCommand::UniformMatrix4fv(uniform.unwrap().id(), transpose, data_vec)))
                 .unwrap()
         }
 
@@ -2991,68 +2991,68 @@ impl WebGLRenderingContextMethods for We
     fn VertexAttrib1f(&self, indx: u32, x: f32) {
         self.vertex_attrib(indx, x, 0f32, 0f32, 1f32)
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn VertexAttrib1fv(&self, cx: *mut JSContext, indx: u32, data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
         if data_vec.len() < 1 {
             return Ok(self.webgl_error(InvalidOperation));
         }
         self.vertex_attrib(indx, data_vec[0], 0f32, 0f32, 1f32);
         Ok(())
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     fn VertexAttrib2f(&self, indx: u32, x: f32, y: f32) {
         self.vertex_attrib(indx, x, y, 0f32, 1f32)
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn VertexAttrib2fv(&self, cx: *mut JSContext, indx: u32, data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
         if data_vec.len() < 2 {
             return Ok(self.webgl_error(InvalidOperation));
         }
         self.vertex_attrib(indx, data_vec[0], data_vec[1], 0f32, 1f32);
         Ok(())
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     fn VertexAttrib3f(&self, indx: u32, x: f32, y: f32, z: f32) {
         self.vertex_attrib(indx, x, y, z, 1f32)
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn VertexAttrib3fv(&self, cx: *mut JSContext, indx: u32, data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
         if data_vec.len() < 3 {
             return Ok(self.webgl_error(InvalidOperation));
         }
         self.vertex_attrib(indx, data_vec[0], data_vec[1], data_vec[2], 1f32);
         Ok(())
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     fn VertexAttrib4f(&self, indx: u32, x: f32, y: f32, z: f32, w: f32) {
         self.vertex_attrib(indx, x, y, z, w)
     }
 
     // https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.10
     #[allow(unsafe_code)]
     unsafe fn VertexAttrib4fv(&self, cx: *mut JSContext, indx: u32, data: *mut JSObject) -> Fallible<()> {
         assert!(!data.is_null());
-        let data_vec = try!(typed_array_or_sequence_to_vec::<Float32>(cx, data, ()));
+        let data_vec = typed_array_or_sequence_to_vec::<Float32>(cx, data, ())?;
         if data_vec.len() < 4 {
             return Ok(self.webgl_error(InvalidOperation));
         }
 
         self.vertex_attrib(indx, data_vec[0], data_vec[1], data_vec[2], data_vec[3]);
         Ok(())
     }
 
@@ -3129,17 +3129,17 @@ impl WebGLRenderingContextMethods for We
                   data_ptr: *mut JSObject) -> Fallible<()> {
         if !self.extension_manager.is_tex_type_enabled(data_type) {
             return Ok(self.webgl_error(InvalidEnum));
         }
 
         let data = if data_ptr.is_null() {
             None
         } else {
-            Some(try!(fallible_array_buffer_view_to_vec(cx, data_ptr)))
+            Some(fallible_array_buffer_view_to_vec(cx, data_ptr)?)
         };
 
         let validator = TexImage2DValidator::new(self, target, level,
                                                  internal_format, width, height,
                                                  border, format, data_type);
 
         let TexImage2DValidatorResult {
             texture,
@@ -3256,17 +3256,17 @@ impl WebGLRenderingContextMethods for We
                      width: i32,
                      height: i32,
                      format: u32,
                      data_type: u32,
                      data_ptr: *mut JSObject) -> Fallible<()> {
         let data = if data_ptr.is_null() {
             None
         } else {
-            Some(try!(fallible_array_buffer_view_to_vec(cx, data_ptr)))
+            Some(fallible_array_buffer_view_to_vec(cx, data_ptr)?)
         };
 
         let validator = TexImage2DValidator::new(self, target, level,
                                                  format, width, height,
                                                  0, format, data_type);
         let TexImage2DValidatorResult {
             texture,
             target,
--- a/servo/components/script/dom/websocket.rs
+++ b/servo/components/script/dom/websocket.rs
@@ -311,17 +311,17 @@ impl WebSocketMethods for WebSocket {
     // https://html.spec.whatwg.org/multipage/#dom-websocket-protocol
     fn Protocol(&self) -> DOMString {
          DOMString::from(self.protocol.borrow().clone())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-websocket-send
     fn Send(&self, data: USVString) -> ErrorResult {
         let data_byte_len = data.0.as_bytes().len() as u64;
-        let send_data = try!(self.send_impl(data_byte_len));
+        let send_data = self.send_impl(data_byte_len)?;
 
         if send_data {
             let mut other_sender = self.sender.borrow_mut();
             let my_sender = other_sender.as_mut().unwrap();
             let _ = my_sender.send(WebSocketDomAction::SendMessage(MessageData::Text(data.0)));
         }
 
         Ok(())
@@ -329,17 +329,17 @@ impl WebSocketMethods for WebSocket {
 
     // https://html.spec.whatwg.org/multipage/#dom-websocket-send
     fn Send_(&self, blob: &Blob) -> ErrorResult {
         /* As per https://html.spec.whatwg.org/multipage/#websocket
            the buffered amount needs to be clamped to u32, even though Blob.Size() is u64
            If the buffer limit is reached in the first place, there are likely other major problems
         */
         let data_byte_len = blob.Size();
-        let send_data = try!(self.send_impl(data_byte_len));
+        let send_data = self.send_impl(data_byte_len)?;
 
         if send_data {
             let mut other_sender = self.sender.borrow_mut();
             let my_sender = other_sender.as_mut().unwrap();
             let bytes = blob.get_bytes().unwrap_or(vec![]);
             let _ = my_sender.send(WebSocketDomAction::SendMessage(MessageData::Binary(bytes)));
         }
 
--- a/servo/components/script/dom/window.rs
+++ b/servo/components/script/dom/window.rs
@@ -760,17 +760,17 @@ impl WindowMethods for Window {
             url => match ServoUrl::parse(&url) {
                 Ok(url) => Some(url.origin().clone()),
                 Err(_) => return Err(Error::Syntax),
             }
         };
 
         // Step 1-2, 6-8.
         // TODO(#12717): Should implement the `transfer` argument.
-        let data = try!(StructuredCloneData::write(cx, message));
+        let data = StructuredCloneData::write(cx, message)?;
 
         // Step 9.
         self.post_message(origin, data);
         Ok(())
     }
 
     // https://html.spec.whatwg.org/multipage/#dom-window-captureevents
     fn CaptureEvents(&self) {
@@ -988,19 +988,19 @@ impl WindowMethods for Window {
 
     // https://html.spec.whatwg.org/multipage/#dom-window-status
     fn SetStatus(&self, status: DOMString) {
         *self.status.borrow_mut() = status
     }
 
     // check-tidy: no specs after this line
     fn OpenURLInDefaultBrowser(&self, href: DOMString) -> ErrorResult {
-        let url = try!(ServoUrl::parse(&href).map_err(|e| {
+        let url = ServoUrl::parse(&href).map_err(|e| {
             Error::Type(format!("Couldn't parse URL: {}", e))
-        }));
+        })?;
         match open::that(url.as_str()) {
             Ok(_) => Ok(()),
             Err(e) => Err(Error::Type(format!("Couldn't open URL: {}", e))),
         }
     }
 
     // https://drafts.csswg.org/cssom-view/#dom-window-matchmedia
     fn MatchMedia(&self, query: DOMString) -> Root<MediaQueryList> {
--- a/servo/components/script/dom/worker.rs
+++ b/servo/components/script/dom/worker.rs
@@ -162,17 +162,17 @@ impl Worker {
         global.report_an_error(error_info, unsafe { NullHandleValue });
     }
 }
 
 impl WorkerMethods for Worker {
     #[allow(unsafe_code)]
     // https://html.spec.whatwg.org/multipage/#dom-worker-postmessage
     unsafe fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
-        let data = try!(StructuredCloneData::write(cx, message));
+        let data = StructuredCloneData::write(cx, message)?;
         let address = Trusted::new(self);
 
         // NOTE: step 9 of https://html.spec.whatwg.org/multipage/#dom-messageport-postmessage
         // indicates that a nonexistent communication channel should result in a silent error.
         let _ = self.sender.send((address, WorkerScriptMsg::DOMMessage(data)));
         Ok(())
     }
 
--- a/servo/components/script/dom/xmlhttprequest.rs
+++ b/servo/components/script/dom/xmlhttprequest.rs
@@ -496,17 +496,17 @@ impl XMLHttpRequestMethods for XMLHttpRe
         // Step 3
         let data = match *self.request_method.borrow() {
             Method::Get | Method::Head => None,
             _ => data
         };
         // Step 4 (first half)
         let extracted_or_serialized = match data {
             Some(DocumentOrBodyInit::Document(ref doc)) => {
-                let data = Vec::from(try!(serialize_document(&doc)).as_ref());
+                let data = Vec::from(serialize_document(&doc)?.as_ref());
                 let content_type = if doc.is_html_document() {
                     "text/html;charset=UTF-8"
                 } else {
                     "application/xml;charset=UTF-8"
                 };
                 Some((data, Some(DOMString::from(content_type))))
             },
             Some(DocumentOrBodyInit::Blob(ref b)) => Some(b.extract()),
@@ -714,17 +714,17 @@ impl XMLHttpRequestMethods for XMLHttpRe
     // https://xhr.spec.whatwg.org/#the-overridemimetype()-method
     fn OverrideMimeType(&self, mime: DOMString) -> ErrorResult {
         // Step 1
         match self.ready_state.get() {
             XMLHttpRequestState::Loading | XMLHttpRequestState::Done => return Err(Error::InvalidState),
             _ => {},
         }
         // Step 2
-        let override_mime = try!(mime.parse::<Mime>().map_err(|_| Error::Syntax));
+        let override_mime = mime.parse::<Mime>().map_err(|_| Error::Syntax)?;
         // Step 3
         let mime_no_params = Mime(override_mime.clone().0, override_mime.clone().1, vec![]);
         *self.override_mime_type.borrow_mut() = Some(mime_no_params);
         // Step 4
         let value = override_mime.get_param(mime::Attr::Charset);
         *self.override_charset.borrow_mut() = value.and_then(|value| {
             encoding_from_whatwg_label(value)
         });
--- a/servo/components/script/layout_wrapper.rs
+++ b/servo/components/script/layout_wrapper.rs
@@ -366,19 +366,19 @@ impl<'ld> ServoLayoutDocument<'ld> {
 #[derive(Copy, Clone)]
 pub struct ServoLayoutElement<'le> {
     element: LayoutJS<Element>,
     chain: PhantomData<&'le ()>,
 }
 
 impl<'le> fmt::Debug for ServoLayoutElement<'le> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "<{}", self.element.local_name()));
+        write!(f, "<{}", self.element.local_name())?;
         if let &Some(ref id) = unsafe { &*self.element.id_attribute() } {
-            try!(write!(f, " id={}", id));
+            write!(f, " id={}", id)?;
         }
         write!(f, "> ({:#x})", self.as_node().opaque().0)
     }
 }
 
 impl<'le> PresentationalHintsSynthesizer for ServoLayoutElement<'le> {
     fn synthesize_presentational_hints_for_legacy_attributes<V>(&self,
                                                                 _visited_handling: VisitedHandlingMode,
--- a/servo/components/script_traits/lib.rs
+++ b/servo/components/script_traits/lib.rs
@@ -91,17 +91,17 @@ unsafe impl Send for UntrustedNodeAddres
 impl Serialize for UntrustedNodeAddress {
     fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
         (self.0 as usize).serialize(s)
     }
 }
 
 impl<'de> Deserialize<'de> for UntrustedNodeAddress {
     fn deserialize<D: Deserializer<'de>>(d: D) -> Result<UntrustedNodeAddress, D::Error> {
-        let value: usize = try!(Deserialize::deserialize(d));
+        let value: usize = Deserialize::deserialize(d)?;
         Ok(UntrustedNodeAddress::from_id(value))
     }
 }
 
 impl UntrustedNodeAddress {
     /// Creates an `UntrustedNodeAddress` from the given pointer address value.
     #[inline]
     pub fn from_id(id: usize) -> UntrustedNodeAddress {
--- a/servo/components/selectors/parser.rs
+++ b/servo/components/selectors/parser.rs
@@ -1814,17 +1814,17 @@ pub mod tests {
             }
         }
 
         fn parse_non_ts_functional_pseudo_class<'t>(&self, name: CompactCowStr<'i>,
                                                     parser: &mut CssParser<'i, 't>)
                                                     -> Result<PseudoClass,
                                                               ParseError<'i, SelectorParseError<'i, ()>>> {
             match_ignore_ascii_case! { &name,
-                "lang" => Ok(PseudoClass::Lang(try!(parser.expect_ident_or_string()).into_owned())),
+                "lang" => Ok(PseudoClass::Lang(parser.expect_ident_or_string()?.into_owned())),
                 _ => Err(SelectorParseError::Custom(()).into())
             }
         }
 
         fn parse_pseudo_element(&self, name: CompactCowStr<'i>)
                                 -> Result<PseudoElement,
                                           ParseError<'i, SelectorParseError<'i, ()>>> {
             match_ignore_ascii_case! { &name,
--- a/servo/components/style/attr.rs
+++ b/servo/components/style/attr.rs
@@ -507,18 +507,18 @@ pub fn parse_legacy_color(mut input: &st
         }
     }
 
     fn hex_string(string: &[u8]) -> Result<u8, ()> {
         match string.len() {
             0 => Err(()),
             1 => hex(string[0] as char),
             _ => {
-                let upper = try!(hex(string[0] as char));
-                let lower = try!(hex(string[1] as char));
+                let upper = hex(string[0] as char)?;
+                let lower = hex(string[1] as char)?;
                 Ok((upper << 4) | lower)
             }
         }
     }
 }
 
 /// Parses a [dimension value][dim]. If unparseable, `Auto` is returned.
 ///
--- a/servo/components/style/context.rs
+++ b/servo/components/style/context.rs
@@ -215,32 +215,32 @@ impl<'a> Add for &'a TraversalStatistics
     }
 }
 
 /// Format the statistics in a way that the performance test harness understands.
 /// See https://bugzilla.mozilla.org/show_bug.cgi?id=1331856#c2
 impl fmt::Display for TraversalStatistics {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         debug_assert!(self.traversal_time_ms != 0.0, "should have set traversal time");
-        try!(writeln!(f, "[PERF] perf block start"));
-        try!(writeln!(f, "[PERF],traversal,{}", if self.is_parallel.unwrap() {
+        writeln!(f, "[PERF] perf block start")?;
+        writeln!(f, "[PERF],traversal,{}", if self.is_parallel.unwrap() {
             "parallel"
         } else {
             "sequential"
-        }));
-        try!(writeln!(f, "[PERF],elements_traversed,{}", self.elements_traversed));
-        try!(writeln!(f, "[PERF],elements_styled,{}", self.elements_styled));
-        try!(writeln!(f, "[PERF],elements_matched,{}", self.elements_matched));
-        try!(writeln!(f, "[PERF],styles_shared,{}", self.styles_shared));
-        try!(writeln!(f, "[PERF],selectors,{}", self.selectors));
-        try!(writeln!(f, "[PERF],revalidation_selectors,{}", self.revalidation_selectors));
-        try!(writeln!(f, "[PERF],dependency_selectors,{}", self.dependency_selectors));
-        try!(writeln!(f, "[PERF],declarations,{}", self.declarations));
-        try!(writeln!(f, "[PERF],stylist_rebuilds,{}", self.stylist_rebuilds));
-        try!(writeln!(f, "[PERF],traversal_time_ms,{}", self.traversal_time_ms));
+        })?;
+        writeln!(f, "[PERF],elements_traversed,{}", self.elements_traversed)?;
+        writeln!(f, "[PERF],elements_styled,{}", self.elements_styled)?;
+        writeln!(f, "[PERF],elements_matched,{}", self.elements_matched)?;
+        writeln!(f, "[PERF],styles_shared,{}", self.styles_shared)?;
+        writeln!(f, "[PERF],selectors,{}", self.selectors)?;
+        writeln!(f, "[PERF],revalidation_selectors,{}", self.revalidation_selectors)?;
+        writeln!(f, "[PERF],dependency_selectors,{}", self.dependency_selectors)?;
+        writeln!(f, "[PERF],declarations,{}", self.declarations)?;
+        writeln!(f, "[PERF],stylist_rebuilds,{}", self.stylist_rebuilds)?;
+        writeln!(f, "[PERF],traversal_time_ms,{}", self.traversal_time_ms)?;
         writeln!(f, "[PERF] perf block end")
     }
 }
 
 impl TraversalStatistics {
     /// Computes the traversal time given the start time in seconds.
     pub fn finish<E, D>(&mut self, traversal: &D, start: f64)
         where E: TElement,
--- a/servo/components/style/custom_properties.rs
+++ b/servo/components/style/custom_properties.rs
@@ -130,46 +130,45 @@ impl ComputedValue {
     }
 }
 
 impl SpecifiedValue {
     /// Parse a custom property SpecifiedValue.
     pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<Box<Self>, ParseError<'i>> {
         let mut references = Some(HashSet::new());
-        let (first, css, last) = try!(parse_self_contained_declaration_value(input, &mut references));
+        let (first, css, last) = parse_self_contained_declaration_value(input, &mut references)?;
         Ok(Box::new(SpecifiedValue {
             css: css.into_owned(),
             first_token_type: first,
             last_token_type: last,
             references: references.unwrap(),
         }))
     }
 }
 
 /// Parse the value of a non-custom property that contains `var()` references.
 pub fn parse_non_custom_with_var<'i, 't>
                                 (input: &mut Parser<'i, 't>)
                                 -> Result<(TokenSerializationType, Cow<'i, str>), ParseError<'i>> {
-    let (first_token_type, css, _) = try!(parse_self_contained_declaration_value(input, &mut None));
+    let (first_token_type, css, _) = parse_self_contained_declaration_value(input, &mut None)?;
     Ok((first_token_type, css))
 }
 
 fn parse_self_contained_declaration_value<'i, 't>
                                          (input: &mut Parser<'i, 't>,
                                           references: &mut Option<HashSet<Name>>)
                                           -> Result<(
                                               TokenSerializationType,
                                               Cow<'i, str>,
                                               TokenSerializationType
                                           ), ParseError<'i>> {
     let start_position = input.position();
     let mut missing_closing_characters = String::new();
-    let (first, last) = try!(
-        parse_declaration_value(input, references, &mut missing_closing_characters));
+    let (first, last) = parse_declaration_value(input, references, &mut missing_closing_characters)?;
     let mut css: Cow<str> = input.slice_from(start_position).into();
     if !missing_closing_characters.is_empty() {
         // Unescaped backslash at EOF in a quoted string is ignored.
         if css.ends_with("\\") && matches!(missing_closing_characters.as_bytes()[0], b'"' | b'\'') {
             css.to_mut().pop();
         }
         css.to_mut().push_str(&missing_closing_characters);
     }
@@ -180,17 +179,17 @@ fn parse_self_contained_declaration_valu
 fn parse_declaration_value<'i, 't>
                           (input: &mut Parser<'i, 't>,
                            references: &mut Option<HashSet<Name>>,
                            missing_closing_characters: &mut String)
                           -> Result<(TokenSerializationType, TokenSerializationType), ParseError<'i>> {
     input.parse_until_before(Delimiter::Bang | Delimiter::Semicolon, |input| {
         // Need at least one token
         let start_position = input.position();
-        try!(input.next_including_whitespace());
+        input.next_including_whitespace()?;
         input.reset(start_position);
 
         parse_declaration_value_block(input, references, missing_closing_characters)
     })
 }
 
 /// Like parse_declaration_value, but accept `!` and `;` since they are only
 /// invalid at the top level
@@ -204,19 +203,19 @@ fn parse_declaration_value_block<'i, 't>
     let mut token = match input.next_including_whitespace_and_comments() {
         Ok(token) => token,
         Err(_) => return Ok((TokenSerializationType::nothing(), TokenSerializationType::nothing()))
     };
     let first_token_type = token.serialization_type();
     loop {
         macro_rules! nested {
             () => {
-                try!(input.parse_nested_block(|input| {
+                input.parse_nested_block(|input| {
                     parse_declaration_value_block(input, references, missing_closing_characters)
-                }))
+                })?
             }
         }
         macro_rules! check_closed {
             ($closing: expr) => {
                 if !input.slice_from(token_start).ends_with($closing) {
                     missing_closing_characters.push_str($closing)
                 }
             }
@@ -238,19 +237,19 @@ fn parse_declaration_value_block<'i, 't>
                 return Err(StyleParseError::UnbalancedCloseParenthesisInDeclarationValueBlock.into()),
             Token::CloseSquareBracket =>
                 return Err(StyleParseError::UnbalancedCloseSquareBracketInDeclarationValueBlock.into()),
             Token::CloseCurlyBracket =>
                 return Err(StyleParseError::UnbalancedCloseCurlyBracketInDeclarationValueBlock.into()),
             Token::Function(ref name) => {
                 if name.eq_ignore_ascii_case("var") {
                     let position = input.position();
-                    try!(input.parse_nested_block(|input| {
+                    input.parse_nested_block(|input| {
                         parse_var_function(input, references)
-                    }));
+                    })?;
                     input.reset(position);
                 }
                 nested!();
                 check_closed!(")");
                 Token::CloseParenthesis.serialization_type()
             }
             Token::ParenthesisBlock => {
                 nested!();
@@ -306,31 +305,31 @@ fn parse_declaration_value_block<'i, 't>
         };
     }
 }
 
 // If the var function is valid, return Ok((custom_property_name, fallback))
 fn parse_var_function<'i, 't>(input: &mut Parser<'i, 't>,
                               references: &mut Option<HashSet<Name>>)
                               -> Result<(), ParseError<'i>> {
-    let name = try!(input.expect_ident());
+    let name = input.expect_ident()?;
     let name: Result<_, ParseError> =
         parse_name(&name)
         .map_err(|()| SelectorParseError::UnexpectedIdent(name.clone()).into());
-    let name = try!(name);
+    let name = name?;
     if input.try(|input| input.expect_comma()).is_ok() {
         // Exclude `!` and `;` at the top level
         // https://drafts.csswg.org/css-syntax/#typedef-declaration-value
-        try!(input.parse_until_before(Delimiter::Bang | Delimiter::Semicolon, |input| {
+        input.parse_until_before(Delimiter::Bang | Delimiter::Semicolon, |input| {
             // At least one non-comment token.
-            try!(input.next_including_whitespace());
+            input.next_including_whitespace()?;
             // Skip until the end.
             while let Ok(_) = input.next_including_whitespace_and_comments() {}
             Ok(())
-        }));
+        })?;
     }
     if let Some(ref mut refs) = *references {
         refs.insert(Atom::from(name));
     }
     Ok(())
 }
 
 /// Add one custom property declaration to a map, unless another with the same
@@ -557,52 +556,52 @@ fn substitute_block<'i, 't, F>(input: &m
         let token = match next {
             Ok(token) => token,
             Err(..) => break,
         };
         match token {
             Token::Function(ref name) if name.eq_ignore_ascii_case("var") => {
                 partial_computed_value.push(
                     input.slice(position.0..before_this_token), position.1, last_token_type);
-                try!(input.parse_nested_block(|input| {
+                input.parse_nested_block(|input| {
                     // parse_var_function() ensures neither .unwrap() will fail.
                     let name = input.expect_ident().unwrap();
                     let name = Atom::from(parse_name(&name).unwrap());
 
                     if let Ok(last) = substitute_one(&name, partial_computed_value) {
                         last_token_type = last;
                         // Skip over the fallback, as `parse_nested_block` would return `Err`
                         // if we don’t consume all of `input`.
                         // FIXME: Add a specialized method to cssparser to do this with less work.
                         while let Ok(_) = input.next() {}
                     } else {
-                        try!(input.expect_comma());
+                        input.expect_comma()?;
                         let position = input.position();
                         let first_token_type = input.next_including_whitespace_and_comments()
                             // parse_var_function() ensures that .unwrap() will not fail.
                             .unwrap()
                             .serialization_type();
                         input.reset(position);
                         let mut position = (position, first_token_type);
-                        last_token_type = try!(substitute_block(
-                            input, &mut position, partial_computed_value, substitute_one));
+                        last_token_type = substitute_block(
+                            input, &mut position, partial_computed_value, substitute_one)?;
                         partial_computed_value.push_from(position, input, last_token_type);
                     }
                     Ok(())
-                }));
+                })?;
                 set_position_at_next_iteration = true
             }
 
             Token::Function(_) |
             Token::ParenthesisBlock |
             Token::CurlyBracketBlock |
             Token::SquareBracketBlock => {
-                try!(input.parse_nested_block(|input| {
+                input.parse_nested_block(|input| {
                     substitute_block(input, position, partial_computed_value, substitute_one)
-                }));
+                })?;
                 // It’s the same type for CloseCurlyBracket and CloseSquareBracket.
                 last_token_type = Token::CloseParenthesis.serialization_type();
             }
 
             _ => last_token_type = token.serialization_type()
         }
     }
     // FIXME: deal with things being implicitly closed at the end of the input. E.g.
@@ -618,21 +617,21 @@ fn substitute_block<'i, 't, F>(input: &m
 /// Return `Err(())` for invalid at computed time.
 pub fn substitute<'i>(input: &'i str, first_token_type: TokenSerializationType,
                       computed_values_map: &Option<Arc<HashMap<Name, ComputedValue>>>)
                       -> Result<String, ParseError<'i>> {
     let mut substituted = ComputedValue::empty();
     let mut input = ParserInput::new(input);
     let mut input = Parser::new(&mut input);
     let mut position = (input.position(), first_token_type);
-    let last_token_type = try!(substitute_block(
+    let last_token_type = substitute_block(
         &mut input, &mut position, &mut substituted, &mut |name, substituted| {
             if let Some(value) = computed_values_map.as_ref().and_then(|map| map.get(name)) {
                 substituted.push_variable(value);
                 Ok(value.last_token_type)
             } else {
                 Err(())
             }
         }
-    ));
+    )?;
     substituted.push_from(position, &input, last_token_type);
     Ok(substituted.css)
 }
--- a/servo/components/style/dom.rs
+++ b/servo/components/style/dom.rs
@@ -175,37 +175,37 @@ impl<N: TNode> Debug for ShowDataAndPrim
     }
 }
 
 /// Wrapper to output the subtree rather than the single node when formatting
 /// for Debug.
 pub struct ShowSubtree<N: TNode>(pub N);
 impl<N: TNode> Debug for ShowSubtree<N> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(writeln!(f, "DOM Subtree:"));
+        writeln!(f, "DOM Subtree:")?;
         fmt_subtree(f, &|f, n| write!(f, "{:?}", n), self.0, 1)
     }
 }
 
 /// Wrapper to output the subtree along with the ElementData when formatting
 /// for Debug.
 pub struct ShowSubtreeData<N: TNode>(pub N);
 impl<N: TNode> Debug for ShowSubtreeData<N> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(writeln!(f, "DOM Subtree:"));
+        writeln!(f, "DOM Subtree:")?;
         fmt_subtree(f, &|f, n| fmt_with_data(f, n), self.0, 1)
     }
 }
 
 /// Wrapper to output the subtree along with the ElementData and primary
 /// ComputedValues when formatting for Debug. This is extremely verbose.
 pub struct ShowSubtreeDataAndPrimaryValues<N: TNode>(pub N);
 impl<N: TNode> Debug for ShowSubtreeDataAndPrimaryValues<N> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(writeln!(f, "DOM Subtree:"));
+        writeln!(f, "DOM Subtree:")?;
         fmt_subtree(f, &|f, n| fmt_with_data_and_primary_values(f, n), self.0, 1)
     }
 }
 
 fn fmt_with_data<N: TNode>(f: &mut fmt::Formatter, n: N) -> fmt::Result {
     if let Some(el) = n.as_element() {
         write!(f, "{:?} dd={} data={:?}", el, el.has_dirty_descendants(), el.borrow_data())
     } else {
@@ -225,22 +225,22 @@ fn fmt_with_data_and_primary_values<N: T
     }
 }
 
 fn fmt_subtree<F, N: TNode>(f: &mut fmt::Formatter, stringify: &F, n: N, indent: u32)
                             -> fmt::Result
     where F: Fn(&mut fmt::Formatter, N) -> fmt::Result
 {
     for _ in 0..indent {
-        try!(write!(f, "  "));
+        write!(f, "  ")?;
     }
-    try!(stringify(f, n));
+    stringify(f, n)?;
     for kid in n.traversal_children() {
-        try!(writeln!(f, ""));
-        try!(fmt_subtree(f, stringify, kid, indent + 1));
+        writeln!(f, "")?;
+        fmt_subtree(f, stringify, kid, indent + 1)?;
     }
 
     Ok(())
 }
 
 /// Flag that this element has a descendant for style processing, propagating
 /// the bit up to the root as needed.
 ///
--- a/servo/components/style/gecko/media_queries.rs
+++ b/servo/components/style/gecko/media_queries.rs
@@ -225,17 +225,17 @@ impl Resolution {
         match *self {
             Resolution::Dpi(f) => f,
             Resolution::Dppx(f) => f * 96.0,
             Resolution::Dpcm(f) => f * 2.54,
         }
     }
 
     fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
-        let (value, unit) = match try!(input.next()) {
+        let (value, unit) = match input.next()? {
             Token::Dimension { value, unit, .. } => {
                 (value, unit)
             },
             t => return Err(BasicParseError::UnexpectedToken(t).into()),
         };
 
         if value <= 0. {
             return Err(StyleParseError::UnspecifiedError.into())
@@ -457,19 +457,19 @@ impl Expression {
 
     /// Parse a media expression of the form:
     ///
     /// ```
     /// (media-feature: media-value)
     /// ```
     pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<Self, ParseError<'i>> {
-        try!(input.expect_parenthesis_block());
+        input.expect_parenthesis_block()?;
         input.parse_nested_block(|input| {
-            let ident = try!(input.expect_ident());
+            let ident = input.expect_ident()?;
 
             let mut flags = 0;
             let result = {
                 let mut feature_name = &*ident;
 
                 // TODO(emilio): this is under a pref in Gecko.
                 if starts_with_ignore_ascii_case(feature_name, "-webkit-") {
                     feature_name = &feature_name[8..];
--- a/servo/components/style/gecko/wrapper.rs
+++ b/servo/components/style/gecko/wrapper.rs
@@ -402,19 +402,19 @@ impl<'lb> GeckoXBLBinding<'lb> {
 }
 
 /// A simple wrapper over a non-null Gecko `Element` pointer.
 #[derive(Clone, Copy)]
 pub struct GeckoElement<'le>(pub &'le RawGeckoElement);
 
 impl<'le> fmt::Debug for GeckoElement<'le> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(write!(f, "<{}", self.get_local_name()));
+        write!(f, "<{}", self.get_local_name())?;
         if let Some(id) = self.get_id() {
-            try!(write!(f, " id={}", id));
+            write!(f, " id={}", id)?;
         }
 
         let mut first = true;
         let mut any = false;
         self.each_class(|c| {
             if first {
                 first = false;
                 any = true;
--- a/servo/components/style/gecko_string_cache/mod.rs
+++ b/servo/components/style/gecko_string_cache/mod.rs
@@ -230,17 +230,17 @@ impl fmt::Debug for WeakAtom {
     fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
         write!(w, "Gecko WeakAtom({:p}, {})", self, self)
     }
 }
 
 impl fmt::Display for WeakAtom {
     fn fmt(&self, w: &mut fmt::Formatter) -> fmt::Result {
         for c in self.chars() {
-            try!(w.write_char(c.unwrap_or(char::REPLACEMENT_CHARACTER)))
+            w.write_char(c.unwrap_or(char::REPLACEMENT_CHARACTER))?
         }
         Ok(())
     }
 }
 
 impl Atom {
     /// Execute a callback with the atom represented by `ptr`.
     pub unsafe fn with<F, R>(ptr: *mut nsIAtom, callback: F) -> R where F: FnOnce(&Atom) -> R {
--- a/servo/components/style/lib.rs
+++ b/servo/components/style/lib.rs
@@ -202,21 +202,21 @@ pub fn serialize_comma_separated_list<W,
                                             -> fmt::Result
     where W: fmt::Write,
           T: ToCss,
 {
     if list.is_empty() {
         return Ok(());
     }
 
-    try!(list[0].to_css(dest));
+    list[0].to_css(dest)?;
 
     for item in list.iter().skip(1) {
-        try!(write!(dest, ", "));
-        try!(item.to_css(dest));
+        write!(dest, ", ")?;
+        item.to_css(dest)?;
     }
 
     Ok(())
 }
 
 #[cfg(feature = "gecko")] use gecko_string_cache::WeakAtom;
 #[cfg(feature = "servo")] use servo_atoms::Atom as WeakAtom;
 
--- a/servo/components/style/logical_geometry.rs
+++ b/servo/components/style/logical_geometry.rs
@@ -139,30 +139,30 @@ impl WritingMode {
             bidi::Level::rtl()
         }
     }
 }
 
 impl fmt::Display for WritingMode {
     fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error> {
         if self.is_vertical() {
-            try!(write!(formatter, "V"));
+            write!(formatter, "V")?;
             if self.is_vertical_lr() {
-                try!(write!(formatter, " LR"));
+                write!(formatter, " LR")?;
             } else {
-                try!(write!(formatter, " RL"));
+                write!(formatter, " RL")?;
             }
             if self.intersects(FLAG_SIDEWAYS) {
-                try!(write!(formatter, " Sideways"));
+                write!(formatter, " Sideways")?;
             }
             if self.intersects(FLAG_LINE_INVERTED) {
-                try!(write!(formatter, " Inverted"));
+                write!(formatter, " Inverted")?;
             }
         } else {
-            try!(write!(formatter, "H"));
+            write!(formatter, "H")?;
         }
         if self.is_bidi_ltr() {
             write!(formatter, " LTR")
         } else {
             write!(formatter, " RTL")
         }
     }
 }
--- a/servo/components/style/media_queries.rs
+++ b/servo/components/style/media_queries.rs
@@ -89,49 +89,49 @@ impl MediaQuery {
     }
 }
 
 impl ToCss for MediaQuery {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result
         where W: fmt::Write,
     {
         if let Some(qual) = self.qualifier {
-            try!(qual.to_css(dest));
-            try!(write!(dest, " "));
+            qual.to_css(dest)?;
+            write!(dest, " ")?;
         }
 
         match self.media_type {
             MediaQueryType::All => {
                 // We need to print "all" if there's a qualifier, or there's
                 // just an empty list of expressions.
                 //
                 // Otherwise, we'd serialize media queries like "(min-width:
                 // 40px)" in "all (min-width: 40px)", which is unexpected.
                 if self.qualifier.is_some() || self.expressions.is_empty() {
-                    try!(write!(dest, "all"));
+                    write!(dest, "all")?;
                 }
             },
-            MediaQueryType::Known(MediaType::Screen) => try!(write!(dest, "screen")),
-            MediaQueryType::Known(MediaType::Print) => try!(write!(dest, "print")),
-            MediaQueryType::Unknown(ref desc) => try!(write!(dest, "{}", desc)),
+            MediaQueryType::Known(MediaType::Screen) => write!(dest, "screen")?,
+            MediaQueryType::Known(MediaType::Print) => write!(dest, "print")?,
+            MediaQueryType::Unknown(ref desc) => write!(dest, "{}", desc)?,
         }
 
         if self.expressions.is_empty() {
             return Ok(());
         }
 
         if self.media_type != MediaQueryType::All || self.qualifier.is_some() {
-            try!(write!(dest, " and "));
+            write!(dest, " and ")?;
         }
 
-        try!(self.expressions[0].to_css(dest));
+        self.expressions[0].to_css(dest)?;
 
         for expr in self.expressions.iter().skip(1) {
-            try!(write!(dest, " and "));
-            try!(expr.to_css(dest));
+            write!(dest, " and ")?;
+            expr.to_css(dest)?;
         }
         Ok(())
     }
 }
 
 /// http://dev.w3.org/csswg/mediaqueries-3/#media0
 #[derive(PartialEq, Eq, Clone, Debug)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
@@ -210,37 +210,37 @@ impl MediaQuery {
         } else {
             None
         };
 
         let media_type = match input.try(|input| input.expect_ident()) {
             Ok(ident) => {
                 let result: Result<_, ParseError> = MediaQueryType::parse(&*ident)
                     .map_err(|()| SelectorParseError::UnexpectedIdent(ident).into());
-                try!(result)
+                result?
             }
             Err(_) => {
                 // Media type is only optional if qualifier is not specified.
                 if qualifier.is_some() {
                     return Err(StyleParseError::UnspecifiedError.into())
                 }
 
                 // Without a media type, require at least one expression.
-                expressions.push(try!(Expression::parse(context, input)));
+                expressions.push(Expression::parse(context, input)?);
 
                 MediaQueryType::All
             }
         };
 
         // Parse any subsequent expressions
         loop {
             if input.try(|input| input.expect_ident_matching("and")).is_err() {
                 return Ok(MediaQuery::new(qualifier, media_type, expressions))
             }
-            expressions.push(try!(Expression::parse(context, input)))
+            expressions.push(Expression::parse(context, input)?)
         }
     }
 }
 
 /// Parse a media query list from CSS.
 ///
 /// Always returns a media query list. If any invalid media query is found, the
 /// media query list is only filled with the equivalent of "not all", see:
--- a/servo/components/style/properties/declaration_block.rs
+++ b/servo/components/style/properties/declaration_block.rs
@@ -835,20 +835,20 @@ pub fn append_serialization<'a, W, I, N>
                                          appendable_value: AppendableValue<'a, I>,
                                          importance: Importance,
                                          is_first_serialization: &mut bool)
                                          -> fmt::Result
     where W: fmt::Write,
           I: Iterator<Item=&'a PropertyDeclaration>,
           N: ToCss,
 {
-    try!(handle_first_serialization(dest, is_first_serialization));
+    handle_first_serialization(dest, is_first_serialization)?;
 
-    try!(property_name.to_css(dest));
-    try!(dest.write_char(':'));
+    property_name.to_css(dest)?;
+    dest.write_char(':')?;
 
     // for normal parsed values, add a space between key: and value
     match appendable_value {
         AppendableValue::Declaration(decl) => {
             if !decl.value_is_unparsed() {
                 // For normal parsed values, add a space between key: and value.
                 dest.write_str(" ")?
             }
@@ -858,20 +858,20 @@ pub fn append_serialization<'a, W, I, N>
                 dest.write_str(" ")?
             }
         }
         // Currently append_serialization is only called with a Css or
         // a Declaration AppendableValue.
         AppendableValue::DeclarationsForShorthand(..) => unreachable!(),
     }
 
-    try!(append_declaration_value(dest, appendable_value));
+    append_declaration_value(dest, appendable_value)?;
 
     if importance.important() {
-        try!(dest.write_str(" !important"));
+        dest.write_str(" !important")?;
     }
 
     dest.write_char(';')
 }
 
 /// A helper to parse the style attribute of an element, in order for this to be
 /// shared between Servo and Gecko.
 pub fn parse_style_attribute(input: &str,
@@ -929,17 +929,17 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for Pr
 }
 
 impl<'a, 'b, 'i> DeclarationParser<'i> for PropertyDeclarationParser<'a, 'b> {
     type Declaration = Importance;
     type Error = SelectorParseError<'i, StyleParseError<'i>>;
 
     fn parse_value<'t>(&mut self, name: CompactCowStr<'i>, input: &mut Parser<'i, 't>)
                        -> Result<Importance, ParseError<'i>> {
-        let id = try!(PropertyId::parse(name));
+        let id = PropertyId::parse(name)?;
         input.parse_until_before(Delimiter::Bang, |input| {
             PropertyDeclaration::parse_into(self.declarations, id, self.context, input)
                 .map_err(|e| e.into())
         })?;
         let importance = match input.try(parse_important) {
             Ok(()) => Importance::Important,
             Err(_) => Importance::Normal,
         };
--- a/servo/components/style/properties/helpers.mako.rs
+++ b/servo/components/style/properties/helpers.mako.rs
@@ -153,54 +153,54 @@
             }
 
             impl ToCss for computed_value::T {
                 fn to_css<W>(&self, dest: &mut W) -> fmt::Result
                     where W: fmt::Write,
                 {
                     let mut iter = self.0.iter();
                     if let Some(val) = iter.next() {
-                        try!(val.to_css(dest));
+                        val.to_css(dest)?;
                     } else {
                         % if allow_empty:
-                            try!(dest.write_str("none"));
+                            dest.write_str("none")?;
                         % else:
                             warn!("Found empty value for property ${name}");
                         % endif
                     }
                     for i in iter {
-                        try!(dest.write_str(", "));
-                        try!(i.to_css(dest));
+                        dest.write_str(", ")?;
+                        i.to_css(dest)?;
                     }
                     Ok(())
                 }
             }
 
             /// The specified value of ${name}.
             #[derive(Clone, Debug, HasViewportPercentage, PartialEq)]
             #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
             pub struct SpecifiedValue(pub Vec<single_value::SpecifiedValue>);
 
             impl ToCss for SpecifiedValue {
                 fn to_css<W>(&self, dest: &mut W) -> fmt::Result
                     where W: fmt::Write,
                 {
                     let mut iter = self.0.iter();
                     if let Some(val) = iter.next() {
-                        try!(val.to_css(dest));
+                        val.to_css(dest)?;
                     } else {
                         % if allow_empty:
-                            try!(dest.write_str("none"));
+                            dest.write_str("none")?;
                         % else:
                             warn!("Found empty value for property ${name}");
                         % endif
                     }
                     for i in iter {
-                        try!(dest.write_str(", "));
-                        try!(i.to_css(dest));
+                        dest.write_str(", ")?;
+                        i.to_css(dest)?;
                     }
                     Ok(())
                 }
             }
 
             pub fn get_initial_value() -> computed_value::T {
                 % if allow_empty:
                     computed_value::T(SmallVec::new())
@@ -457,18 +457,18 @@
                         let start = input.position();
                         let specified = parse_specified(context, input);
                         if specified.is_err() {
                             while let Ok(_) = input.next() {}  // Look for var() after the error.
                         }
                         let var = input.seen_var_functions();
                         if specified.is_err() && var {
                             input.reset(start);
-                            let (first_token_type, css) = try!(
-                                ::custom_properties::parse_non_custom_with_var(input));
+                            let (first_token_type, css) =
+                                ::custom_properties::parse_non_custom_with_var(input)?;
                             return Ok(PropertyDeclaration::WithVariables(LonghandId::${property.camel_case},
                                                                          Arc::new(UnparsedValue {
                                 css: css.into_owned(),
                                 first_token_type: first_token_type,
                                 url_data: context.url_data.clone(),
                                 from_shorthand: None,
                             })))
                         }
@@ -871,18 +871,18 @@
                 % for sub_property in shorthand.sub_properties:
                     declarations.push(PropertyDeclaration::${sub_property.camel_case}(
                         value.${sub_property.ident}
                     ));
                 % endfor
                 Ok(())
             } else if var {
                 input.reset(start);
-                let (first_token_type, css) = try!(
-                    ::custom_properties::parse_non_custom_with_var(input));
+                let (first_token_type, css) =
+                    ::custom_properties::parse_non_custom_with_var(input)?;
                 let unparsed = Arc::new(UnparsedValue {
                     css: css.into_owned(),
                     first_token_type: first_token_type,
                     url_data: context.url_data.clone(),
                     from_shorthand: Some(ShorthandId::${shorthand.camel_case}),
                 });
                 % for sub_property in shorthand.sub_properties:
                     declarations.push(PropertyDeclaration::WithVariables(
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -218,17 +218,17 @@ impl TransitionProperty {
                 }
             % endif
         % endfor
         false
     }
 
     /// Parse a transition-property value.
     pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
-        let ident = try!(input.expect_ident());
+        let ident = input.expect_ident()?;
         let supported = match_ignore_ascii_case! { &ident,
             "all" => Ok(Some(TransitionProperty::All)),
             % for prop in data.longhands + data.shorthands_except_all():
                 % if prop.transitionable:
                     "${prop.name}" => Ok(Some(TransitionProperty::${prop.camel_case})),
                 % endif
             % endfor
             "none" => Err(()),
@@ -981,28 +981,28 @@ impl Animatable for Visibility {
             Ok(1.0)
         }
     }
 }
 
 impl<T: Animatable + Copy> Animatable for Size2D<T> {
     #[inline]
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
-        let width = try!(self.width.add_weighted(&other.width, self_portion, other_portion));
-        let height = try!(self.height.add_weighted(&other.height, self_portion, other_portion));
+        let width = self.width.add_weighted(&other.width, self_portion, other_portion)?;
+        let height = self.height.add_weighted(&other.height, self_portion, other_portion)?;
 
         Ok(Size2D::new(width, height))
     }
 }
 
 impl<T: Animatable + Copy> Animatable for Point2D<T> {
     #[inline]
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
-        let x = try!(self.x.add_weighted(&other.x, self_portion, other_portion));
-        let y = try!(self.y.add_weighted(&other.y, self_portion, other_portion));
+        let x = self.x.add_weighted(&other.x, self_portion, other_portion)?;
+        let y = self.y.add_weighted(&other.y, self_portion, other_portion)?;
 
         Ok(Point2D::new(x, y))
     }
 }
 
 impl Animatable for BorderCornerRadius {
     #[inline]
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
@@ -1011,18 +1011,18 @@ impl Animatable for BorderCornerRadius {
 
     #[inline]
     fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
         self.compute_squared_distance(other).map(|sd| sd.sqrt())
     }
 
     #[inline]
     fn compute_squared_distance(&self, other: &Self) -> Result<f64, ()> {
-        Ok(try!(self.0.width.compute_squared_distance(&other.0.width)) +
-           try!(self.0.height.compute_squared_distance(&other.0.height)))
+        Ok(self.0.width.compute_squared_distance(&other.0.width)? +
+           self.0.height.compute_squared_distance(&other.0.height)?)
     }
 }
 
 /// https://drafts.csswg.org/css-transitions/#animtype-length
 impl Animatable for VerticalAlign {
     #[inline]
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         match (*self, *other) {
@@ -1482,20 +1482,18 @@ macro_rules! option_try {
     ($e:expr) => (match $e { Some(e) => e, None => return None })
 }
 
 /// https://drafts.csswg.org/css-transitions/#animtype-simple-list
 impl<H: Animatable, V: Animatable> Animatable for generic_position::Position<H, V> {
     #[inline]
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(generic_position::Position {
-            horizontal: try!(self.horizontal.add_weighted(&other.horizontal,
-                                                          self_portion, other_portion)),
-            vertical: try!(self.vertical.add_weighted(&other.vertical,
-                                                      self_portion, other_portion)),
+            horizontal: self.horizontal.add_weighted(&other.horizontal, self_portion, other_portion)?,
+            vertical: self.vertical.add_weighted(&other.vertical, self_portion, other_portion)?,
         })
     }
 
     #[inline]
     fn get_zero_value(&self) -> Option<Self> {
         Some(generic_position::Position {
             horizontal: option_try!(self.horizontal.get_zero_value()),
             vertical: option_try!(self.vertical.get_zero_value()),
@@ -1504,48 +1502,50 @@ impl<H: Animatable, V: Animatable> Anima
 
     #[inline]
     fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
         self.compute_squared_distance(other).map(|sd| sd.sqrt())
     }
 
     #[inline]
     fn compute_squared_distance(&self, other: &Self) -> Result<f64, ()> {
-        Ok(try!(self.horizontal.compute_squared_distance(&other.horizontal)) +
-           try!(self.vertical.compute_squared_distance(&other.vertical)))
+        Ok(self.horizontal.compute_squared_distance(&other.horizontal)? +
+           self.vertical.compute_squared_distance(&other.vertical)?)
     }
 }
 
 impl<H, V> RepeatableListAnimatable for generic_position::Position<H, V>
     where H: RepeatableListAnimatable, V: RepeatableListAnimatable {}
 
 /// https://drafts.csswg.org/css-transitions/#animtype-rect
 impl Animatable for ClipRect {
     #[inline]
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64)
         -> Result<Self, ()> {
         Ok(ClipRect {
-            top: try!(self.top.add_weighted(&other.top, self_portion, other_portion)),
-            right: try!(self.right.add_weighted(&other.right, self_portion, other_portion)),
-            bottom: try!(self.bottom.add_weighted(&other.bottom, self_portion, other_portion)),
-            left: try!(self.left.add_weighted(&other.left, self_portion, other_portion)),
+            top: self.top.add_weighted(&other.top, self_portion, other_portion)?,
+            right: self.right.add_weighted(&other.right, self_portion, other_portion)?,
+            bottom: self.bottom.add_weighted(&other.bottom, self_portion, other_portion)?,
+            left: self.left.add_weighted(&other.left, self_portion, other_portion)?,
         })
     }
 
     #[inline]
     fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
         self.compute_squared_distance(other).map(|sd| sd.sqrt())
     }
 
     #[inline]
     fn compute_squared_distance(&self, other: &Self) -> Result<f64, ()> {
-        let list = [ try!(self.top.compute_distance(&other.top)),
-                     try!(self.right.compute_distance(&other.right)),
-                     try!(self.bottom.compute_distance(&other.bottom)),
-                     try!(self.left.compute_distance(&other.left)) ];
+        let list = [
+            self.top.compute_distance(&other.top)?,
+            self.right.compute_distance(&other.right)?,
+            self.bottom.compute_distance(&other.bottom)?,
+            self.left.compute_distance(&other.left)?
+        ];
         Ok(list.iter().fold(0.0f64, |sum, diff| sum + diff * diff))
     }
 }
 
 /// Check if it's possible to do a direct numerical interpolation
 /// between these two transform lists.
 /// http://dev.w3.org/csswg/css-transforms/#transform-transform-animation
 fn can_interpolate_list(from_list: &[TransformOperation],
@@ -1625,19 +1625,19 @@ fn build_identity_transform_list(list: &
 /// an initial_value and uses that to produce an interpolated value.
 /// This is used for values such as 'scale' where the initial value is 1 and where if we interpolate
 /// the absolute values, we will produce odd results for accumulation.
 fn add_weighted_with_initial_val<T: Animatable>(a: &T,
                                                 b: &T,
                                                 a_portion: f64,
                                                 b_portion: f64,
                                                 initial_val: &T) -> Result<T, ()> {
-    let a = try!(a.add_weighted(&initial_val, 1.0, -1.0));
-    let b = try!(b.add_weighted(&initial_val, 1.0, -1.0));
-    let result = try!(a.add_weighted(&b, a_portion, b_portion));
+    let a = a.add_weighted(&initial_val, 1.0, -1.0)?;
+    let b = b.add_weighted(&initial_val, 1.0, -1.0)?;
+    let result = a.add_weighted(&b, a_portion, b_portion)?;
     result.add_weighted(&initial_val, 1.0, 1.0)
 }
 
 /// Add two transform lists.
 /// http://dev.w3.org/csswg/css-transforms/#interpolation-of-transforms
 fn add_weighted_transform_lists(from_list: &[TransformOperation],
                                 to_list: &[TransformOperation],
                                 self_portion: f64,
@@ -1788,40 +1788,40 @@ pub struct MatrixDecomposed2D {
     pub angle: f32,
     /// The inner matrix.
     pub matrix: InnerMatrix2D,
 }
 
 impl Animatable for InnerMatrix2D {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(InnerMatrix2D {
-            m11: try!(add_weighted_with_initial_val(&self.m11, &other.m11,
-                                                    self_portion, other_portion, &1.0)),
-            m12: try!(self.m12.add_weighted(&other.m12, self_portion, other_portion)),
-            m21: try!(self.m21.add_weighted(&other.m21, self_portion, other_portion)),
-            m22: try!(add_weighted_with_initial_val(&self.m22, &other.m22,
-                                                    self_portion, other_portion, &1.0)),
+            m11: add_weighted_with_initial_val(&self.m11, &other.m11,
+                                               self_portion, other_portion, &1.0)?,
+            m12: self.m12.add_weighted(&other.m12, self_portion, other_portion)?,
+            m21: self.m21.add_weighted(&other.m21, self_portion, other_portion)?,
+            m22: add_weighted_with_initial_val(&self.m22, &other.m22,
+                                               self_portion, other_portion, &1.0)?,
         })
     }
 }
 
 impl Animatable for Translate2D {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(Translate2D(
-            try!(self.0.add_weighted(&other.0, self_portion, other_portion)),
-            try!(self.1.add_weighted(&other.1, self_portion, other_portion))
+            self.0.add_weighted(&other.0, self_portion, other_portion)?,
+            self.1.add_weighted(&other.1, self_portion, other_portion)?,
         ))
     }
 }
 
 impl Animatable for Scale2D {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(Scale2D(
-            try!(add_weighted_with_initial_val(&self.0, &other.0, self_portion, other_portion, &1.0)),
-            try!(add_weighted_with_initial_val(&self.1, &other.1, self_portion, other_portion, &1.0))
+            add_weighted_with_initial_val(&self.0, &other.0, self_portion, other_portion, &1.0)?,
+            add_weighted_with_initial_val(&self.1, &other.1, self_portion, other_portion, &1.0)?,
         ))
     }
 }
 
 impl Animatable for MatrixDecomposed2D {
     /// https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-2d-matrix-values
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         // If x-axis of one is flipped, and y-axis of the other,
@@ -1848,21 +1848,20 @@ impl Animatable for MatrixDecomposed2D {
                 angle -= 360.
             }
             else{
                 other_angle -= 360.
             }
         }
 
         // Interpolate all values.
-        let translate = try!(self.translate.add_weighted(&other.translate,
-                                                         self_portion, other_portion));
-        let scale = try!(scale.add_weighted(&other.scale, self_portion, other_portion));
-        let angle = try!(angle.add_weighted(&other_angle, self_portion, other_portion));
-        let matrix = try!(self.matrix.add_weighted(&other.matrix, self_portion, other_portion));
+        let translate = self.translate.add_weighted(&other.translate, self_portion, other_portion)?;
+        let scale = scale.add_weighted(&other.scale, self_portion, other_portion)?;
+        let angle = angle.add_weighted(&other_angle, self_portion, other_portion)?;
+        let matrix = self.matrix.add_weighted(&other.matrix, self_portion, other_portion)?;
 
         Ok(MatrixDecomposed2D {
             translate: translate,
             scale: scale,
             angle: angle,
             matrix: matrix,
         })
     }
@@ -1870,29 +1869,28 @@ impl Animatable for MatrixDecomposed2D {
 
 impl Animatable for ComputedMatrix {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         if self.is_3d() || other.is_3d() {
             let decomposed_from = decompose_3d_matrix(*self);
             let decomposed_to = decompose_3d_matrix(*other);
             match (decomposed_from, decomposed_to) {
                 (Ok(from), Ok(to)) => {
-                    let sum = try!(from.add_weighted(&to, self_portion, other_portion));
+                    let sum = from.add_weighted(&to, self_portion, other_portion)?;
                     Ok(ComputedMatrix::from(sum))
                 },
                 _ => {
                     let result = if self_portion > other_portion {*self} else {*other};
                     Ok(result)
                 }
             }
         } else {
             let decomposed_from = MatrixDecomposed2D::from(*self);
             let decomposed_to = MatrixDecomposed2D::from(*other);
-            let sum = try!(decomposed_from.add_weighted(&decomposed_to,
-                                                        self_portion, other_portion));
+            let sum = decomposed_from.add_weighted(&decomposed_to, self_portion, other_portion)?;
             Ok(ComputedMatrix::from(sum))
         }
     }
 }
 
 impl From<ComputedMatrix> for MatrixDecomposed2D {
     /// Decompose a 2D matrix.
     /// https://drafts.csswg.org/css-transforms/#decomposing-a-2d-matrix
@@ -2223,71 +2221,69 @@ fn cross(row1: [f32; 3], row2: [f32; 3])
         row1[2] * row2[0] - row1[0] * row2[2],
         row1[0] * row2[1] - row1[1] * row2[0]
     ]
 }
 
 impl Animatable for Translate3D {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(Translate3D(
-            try!(self.0.add_weighted(&other.0, self_portion, other_portion)),
-            try!(self.1.add_weighted(&other.1, self_portion, other_portion)),
-            try!(self.2.add_weighted(&other.2, self_portion, other_portion))
+            self.0.add_weighted(&other.0, self_portion, other_portion)?,
+            self.1.add_weighted(&other.1, self_portion, other_portion)?,
+            self.2.add_weighted(&other.2, self_portion, other_portion)?,
         ))
     }
 }
 
 impl Animatable for Scale3D {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(Scale3D(
-            try!(add_weighted_with_initial_val(&self.0, &other.0, self_portion, other_portion, &1.0)),
-            try!(add_weighted_with_initial_val(&self.1, &other.1, self_portion, other_portion, &1.0)),
-            try!(add_weighted_with_initial_val(&self.2, &other.2, self_portion, other_portion, &1.0))
+            add_weighted_with_initial_val(&self.0, &other.0, self_portion, other_portion, &1.0)?,
+            add_weighted_with_initial_val(&self.1, &other.1, self_portion, other_portion, &1.0)?,
+            add_weighted_with_initial_val(&self.2, &other.2, self_portion, other_portion, &1.0)?,
         ))
     }
 }
 
 impl Animatable for Skew {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(Skew(
-            try!(self.0.add_weighted(&other.0, self_portion, other_portion)),
-            try!(self.1.add_weighted(&other.1, self_portion, other_portion)),
-            try!(self.2.add_weighted(&other.2, self_portion, other_portion))
+            self.0.add_weighted(&other.0, self_portion, other_portion)?,
+            self.1.add_weighted(&other.1, self_portion, other_portion)?,
+            self.2.add_weighted(&other.2, self_portion, other_portion)?,
         ))
     }
 }
 
 impl Animatable for Perspective {
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         Ok(Perspective(
-            try!(self.0.add_weighted(&other.0, self_portion, other_portion)),
-            try!(self.1.add_weighted(&other.1, self_portion, other_portion)),
-            try!(self.2.add_weighted(&other.2, self_portion, other_portion)),
-            try!(add_weighted_with_initial_val(&self.3, &other.3, self_portion, other_portion, &1.0))
+            self.0.add_weighted(&other.0, self_portion, other_portion)?,
+            self.1.add_weighted(&other.1, self_portion, other_portion)?,
+            self.2.add_weighted(&other.2, self_portion, other_portion)?,
+            add_weighted_with_initial_val(&self.3, &other.3, self_portion, other_portion, &1.0)?,
         ))
     }
 }
 
 impl Animatable for MatrixDecomposed3D {
     /// https://drafts.csswg.org/css-transforms/#interpolation-of-decomposed-3d-matrix-values
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64)
         -> Result<Self, ()> {
         assert!(self_portion + other_portion == 1.0f64 ||
                 other_portion == 1.0f64,
                 "add_weighted should only be used for interpolating or accumulating transforms");
 
         let mut sum = *self;
 
         // Add translate, scale, skew and perspective components.
-        sum.translate = try!(self.translate.add_weighted(&other.translate,
-                                                         self_portion, other_portion));
-        sum.scale = try!(self.scale.add_weighted(&other.scale, self_portion, other_portion));
-        sum.skew = try!(self.skew.add_weighted(&other.skew, self_portion, other_portion));
-        sum.perspective = try!(self.perspective.add_weighted(&other.perspective,
-                                                             self_portion, other_portion));
+        sum.translate = self.translate.add_weighted(&other.translate, self_portion, other_portion)?;
+        sum.scale = self.scale.add_weighted(&other.scale, self_portion, other_portion)?;
+        sum.skew = self.skew.add_weighted(&other.skew, self_portion, other_portion)?;
+        sum.perspective = self.perspective.add_weighted(&other.perspective, self_portion, other_portion)?;
 
         // Add quaternions using spherical linear interpolation (Slerp).
         //
         // We take a specialized code path for accumulation (where other_portion is 1)
         if other_portion == 1.0 {
             if self_portion == 0.0 {
                 return Ok(*other)
             }
@@ -2729,35 +2725,32 @@ impl IntermediateRGBA {
     }
 }
 
 /// Unlike Animatable for RGBA we don't clamp any component values.
 impl Animatable for IntermediateRGBA {
     #[inline]
     fn add_weighted(&self, other: &IntermediateRGBA, self_portion: f64, other_portion: f64)
         -> Result<Self, ()> {
-        let mut alpha = try!(self.alpha.add_weighted(&other.alpha, self_portion, other_portion));
+        let mut alpha = self.alpha.add_weighted(&other.alpha, self_portion, other_portion)?;
         if alpha <= 0. {
             // Ideally we should return color value that only alpha component is
             // 0, but this is what current gecko does.
             Ok(IntermediateRGBA::transparent())
         } else {
             alpha = alpha.min(1.);
-            let red = try!((self.red * self.alpha)
-                            .add_weighted(&(other.red * other.alpha),
-                                          self_portion, other_portion))
-                            * 1. / alpha;
-            let green = try!((self.green * self.alpha)
-                             .add_weighted(&(other.green * other.alpha),
-                                           self_portion, other_portion))
-                             * 1. / alpha;
-            let blue = try!((self.blue * self.alpha)
-                             .add_weighted(&(other.blue * other.alpha),
-                                           self_portion, other_portion))
-                             * 1. / alpha;
+            let red = (self.red * self.alpha).add_weighted(
+                &(other.red * other.alpha), self_portion, other_portion
+            )? * 1. / alpha;
+            let green = (self.green * self.alpha).add_weighted(
+                &(other.green * other.alpha), self_portion, other_portion
+            )? * 1. / alpha;
+            let blue = (self.blue * self.alpha).add_weighted(
+                &(other.blue * other.alpha), self_portion, other_portion
+            )? * 1. / alpha;
             Ok(IntermediateRGBA::new(red, green, blue, alpha))
         }
     }
 
     #[inline]
     fn get_zero_value(&self) -> Option<Self> {
         Some(IntermediateRGBA::new(0., 0., 0., 1.))
     }
@@ -3088,23 +3081,21 @@ impl From<Shadow> for IntermediateShadow
 impl Animatable for IntermediateShadow {
     #[inline]
     fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64) -> Result<Self, ()> {
         // It can't be interpolated if inset does not match.
         if self.inset != other.inset {
             return Err(());
         }
 
-        let x = try!(self.offset_x.add_weighted(&other.offset_x, self_portion, other_portion));
-        let y = try!(self.offset_y.add_weighted(&other.offset_y, self_portion, other_portion));
-        let color = try!(self.color.add_weighted(&other.color, self_portion, other_portion));
-        let blur = try!(self.blur_radius.add_weighted(&other.blur_radius,
-                                                      self_portion, other_portion));
-        let spread = try!(self.spread_radius.add_weighted(&other.spread_radius,
-                                                          self_portion, other_portion));
+        let x = self.offset_x.add_weighted(&other.offset_x, self_portion, other_portion)?;
+        let y = self.offset_y.add_weighted(&other.offset_y, self_portion, other_portion)?;
+        let color = self.color.add_weighted(&other.color, self_portion, other_portion)?;
+        let blur = self.blur_radius.add_weighted(&other.blur_radius, self_portion, other_portion)?;
+        let spread = self.spread_radius.add_weighted(&other.spread_radius, self_portion, other_portion)?;
 
         Ok(IntermediateShadow {
             offset_x: x,
             offset_y: y,
             blur_radius: blur,
             spread_radius: spread,
             color: color,
             inset: self.inset,
@@ -3116,21 +3107,22 @@ impl Animatable for IntermediateShadow {
         self.compute_squared_distance(other).map(|sd| sd.sqrt())
     }
 
     #[inline]
     fn compute_squared_distance(&self, other: &Self) -> Result<f64, ()> {
         if self.inset != other.inset {
             return Err(());
         }
-        let list = [ try!(self.offset_x.compute_distance(&other.offset_x)),
-                     try!(self.offset_y.compute_distance(&other.offset_y)),
-                     try!(self.blur_radius.compute_distance(&other.blur_radius)),
-                     try!(self.color.compute_distance(&other.color)),
-                     try!(self.spread_radius.compute_distance(&other.spread_radius)),
+        let list = [
+            self.offset_x.compute_distance(&other.offset_x)?,
+            self.offset_y.compute_distance(&other.offset_y)?,
+            self.blur_radius.compute_distance(&other.blur_radius)?,
+            self.color.compute_distance(&other.color)?,
+            self.spread_radius.compute_distance(&other.spread_radius)?,
         ];
         Ok(list.iter().fold(0.0f64, |sum, diff| sum + diff * diff))
     }
 }
 
 /// https://drafts.csswg.org/css-transitions/#animtype-shadow-list
 impl Animatable for IntermediateShadowList {
     #[inline]
@@ -3150,18 +3142,19 @@ impl Animatable for IntermediateShadowLi
         let mut result = if max_len > 1 {
             SmallVec::from_vec(Vec::with_capacity(max_len))
         } else {
             SmallVec::new()
         };
 
         for i in 0..max_len {
             let shadow = match (self.0.get(i), other.0.get(i)) {
-                (Some(shadow), Some(other)) =>
-                    try!(shadow.add_weighted(other, self_portion, other_portion)),
+                (Some(shadow), Some(other)) => {
+                    shadow.add_weighted(other, self_portion, other_portion)?
+                }
                 (Some(shadow), None) => {
                         zero.inset = shadow.inset;
                         shadow.add_weighted(&zero, self_portion, other_portion).unwrap()
                 }
                 (None, Some(shadow)) => {
                     zero.inset = shadow.inset;
                     zero.add_weighted(&shadow, self_portion, other_portion).unwrap()
                 }
--- a/servo/components/style/properties/longhand/background.mako.rs
+++ b/servo/components/style/properties/longhand/background.mako.rs
@@ -61,36 +61,36 @@
     no_viewport_percentage!(SpecifiedValue);
 
     impl ToCss for computed_value::T {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             match (self.0, self.1) {
                 (RepeatKeyword::Repeat, RepeatKeyword::NoRepeat) => dest.write_str("repeat-x"),
                 (RepeatKeyword::NoRepeat, RepeatKeyword::Repeat) => dest.write_str("repeat-y"),
                 (horizontal, vertical) => {
-                    try!(horizontal.to_css(dest));
+                    horizontal.to_css(dest)?;
                     if horizontal != vertical {
-                        try!(dest.write_str(" "));
-                        try!(vertical.to_css(dest));
+                        dest.write_str(" ")?;
+                        vertical.to_css(dest)?;
                     }
                     Ok(())
                 },
             }
         }
     }
     impl ToCss for SpecifiedValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             match *self {
                 SpecifiedValue::RepeatX => dest.write_str("repeat-x"),
                 SpecifiedValue::RepeatY => dest.write_str("repeat-y"),
                 SpecifiedValue::Other(horizontal, vertical) => {
-                    try!(horizontal.to_css(dest));
+                    horizontal.to_css(dest)?;
                     if let Some(vertical) = vertical {
-                        try!(dest.write_str(" "));
-                        try!(vertical.to_css(dest));
+                        dest.write_str(" ")?;
+                        vertical.to_css(dest)?;
                     }
                     Ok(())
                 }
             }
         }
     }
 
     #[inline]
@@ -133,17 +133,17 @@
         let ident = input.expect_ident()?;
         (match_ignore_ascii_case! { &ident,
             "repeat-x" => Ok(SpecifiedValue::RepeatX),
             "repeat-y" => Ok(SpecifiedValue::RepeatY),
             _ => Err(()),
         }).or_else(|()| {
             let horizontal: Result<_, ParseError> = RepeatKeyword::from_ident(&ident)
                 .map_err(|()| SelectorParseError::UnexpectedIdent(ident).into());
-            let horizontal = try!(horizontal);
+            let horizontal = horizontal?;
             let vertical = input.try(RepeatKeyword::parse).ok();
             Ok(SpecifiedValue::Other(horizontal, vertical))
         })
     }
 </%helpers:vector_longhand>
 
 ${helpers.single_keyword("background-attachment",
                          "scroll fixed" + (" local" if product == "gecko" else ""),
--- a/servo/components/style/properties/longhand/border.mako.rs
+++ b/servo/components/style/properties/longhand/border.mako.rs
@@ -86,39 +86,39 @@
         impl ToCss for computed_value::T {
             fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
                 match self.0 {
                     None => return dest.write_str("none"),
                     Some(ref vec) => {
                         let mut first = true;
                         for ref color in vec {
                             if !first {
-                                try!(dest.write_str(" "));
+                                dest.write_str(" ")?;
                             }
                             first = false;
-                            try!(color.to_css(dest))
+                            color.to_css(dest)?
                         }
                         Ok(())
                     }
                 }
             }
         }
 
         impl ToCss for SpecifiedValue {
             fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
                 match *self {
                     SpecifiedValue::None => return dest.write_str("none"),
                     SpecifiedValue::Colors(ref vec) => {
                         let mut first = true;
                         for ref color in vec {
                             if !first {
-                                try!(dest.write_str(" "));
+                                dest.write_str(" ")?;
                             }
                             first = false;
-                            try!(color.to_css(dest))
+                            color.to_css(dest)?
                         }
                         Ok(())
                     }
                 }
             }
         }
 
         #[inline] pub fn get_initial_value() -> computed_value::T {
@@ -235,20 +235,20 @@
     define_css_keyword_enum!(RepeatKeyword:
                              "stretch" => Stretch,
                              "repeat" => Repeat,
                              "round" => Round,
                              "space" => Space);
 
     impl ToCss for SpecifiedValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
-            try!(self.0.to_css(dest));
+            self.0.to_css(dest)?;
             if let Some(second) = self.1 {
-                try!(dest.write_str(" "));
-                try!(second.to_css(dest));
+                dest.write_str(" ")?;
+                second.to_css(dest)?;
             }
             Ok(())
         }
     }
 
     #[inline]
     pub fn get_initial_value() -> computed_value::T {
         computed_value::T(RepeatKeyword::Stretch, RepeatKeyword::Stretch)
@@ -269,17 +269,17 @@
         #[inline]
         fn from_computed_value(computed: &computed_value::T) -> Self {
             SpecifiedValue(computed.0, Some(computed.1))
         }
     }
 
     pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<SpecifiedValue, ParseError<'i>> {
-        let first = try!(RepeatKeyword::parse(input));
+        let first = RepeatKeyword::parse(input)?;
         let second = input.try(RepeatKeyword::parse).ok();
 
         Ok(SpecifiedValue(first, second))
     }
 </%helpers:longhand>
 
 ${helpers.predefined_type("border-image-width", "BorderImageWidth",
     initial_value="computed::BorderImageSideWidth::one().into()",
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -562,17 +562,17 @@
 
     impl Parse for SpecifiedValue {
         fn parse<'i, 't>(_context: &ParserContext, input: &mut ::cssparser::Parser<'i, 't>)
                          -> Result<Self, ParseError<'i>> {
             if input.try(|input| input.expect_ident_matching("infinite")).is_ok() {
                 return Ok(SpecifiedValue::Infinite)
             }
 
-            let number = try!(input.expect_number());
+            let number = input.expect_number()?;
             if number < 0.0 {
                 return Err(StyleParseError::UnspecifiedError.into());
             }
 
             Ok(SpecifiedValue::Number(number))
         }
     }
 
@@ -931,20 +931,20 @@
 
             if self.0.is_empty() {
                 return dest.write_str("none")
             }
 
             let mut first = true;
             for operation in &self.0 {
                 if !first {
-                    try!(dest.write_str(" "));
+                    dest.write_str(" ")?;
                 }
                 first = false;
-                try!(operation.to_css(dest))
+                operation.to_css(dest)?
             }
             Ok(())
         }
     }
 
     #[inline]
     pub fn get_initial_value() -> computed_value::T {
         computed_value::T(None)
@@ -961,22 +961,22 @@
         loop {
             let name = match input.try(|i| i.expect_function()) {
                 Ok(name) => name,
                 Err(_) => break,
             };
             let valid_fn = match_ignore_ascii_case! {
                 &name,
                 "matrix" => {
-                    try!(input.parse_nested_block(|input| {
+                    input.parse_nested_block(|input| {
                         // Standard matrix parsing.
                         if !prefixed {
-                            let values = try!(input.parse_comma_separated(|input| {
+                            let values = input.parse_comma_separated(|input| {
                                 specified::parse_number(context, input)
-                            }));
+                            })?;
                             if values.len() != 6 {
                                 return Err(StyleParseError::UnspecifiedError.into())
                             }
 
                             result.push(SpecifiedOperation::Matrix {
                                 a: values[0],
                                 b: values[1],
                                 c: values[2],
@@ -1013,23 +1013,23 @@
                             a: values[0],
                             b: values[1],
                             c: values[2],
                             d: values[3],
                             e: lengths[0].clone(),
                             f: lengths[1].clone(),
                         });
                         Ok(true)
-                    }))
+                    })?
                 },
                 "matrix3d" => {
-                    try!(input.parse_nested_block(|input| {
+                    input.parse_nested_block(|input| {
                         // Standard matrix3d parsing.
                         if !prefixed {
-                            let values = try!(input.parse_comma_separated(|i| specified::parse_number(context, i)));
+                            let values = input.parse_comma_separated(|i| specified::parse_number(context, i))?;
                             if values.len() != 16 {
                                 return Err(StyleParseError::UnspecifiedError.into())
                             }
 
                             result.push(SpecifiedOperation::Matrix3D {
                                 m11: values[ 0], m12: values[ 1], m13: values[ 2], m14: values[ 3],
                                 m21: values[ 4], m22: values[ 5], m23: values[ 6], m24: values[ 7],
                                 m31: values[ 8], m32: values[ 9], m33: values[10], m34: values[11],
@@ -1068,180 +1068,180 @@
                         result.push(SpecifiedOperation::PrefixedMatrix3D {
                             m11: values[ 0], m12: values[ 1], m13: values[ 2], m14: values[ 3],
                             m21: values[ 4], m22: values[ 5], m23: values[ 6], m24: values[ 7],
                             m31: values[ 8], m32: values[ 9], m33: values[10], m34: values[11],
                             m41: lops[0].clone(), m42: lops[1].clone(), m43: length_or_number.unwrap(),
                             m44: values[12]
                         });
                         Ok(true)
-                    }))
+                    })?
                 },
                 "translate" => {
-                    try!(input.parse_nested_block(|input| {
-                        let sx = try!(specified::LengthOrPercentage::parse(context, input));
+                    input.parse_nested_block(|input| {
+                        let sx = specified::LengthOrPercentage::parse(context, input)?;
                         if input.try(|input| input.expect_comma()).is_ok() {
-                            let sy = try!(specified::LengthOrPercentage::parse(context, input));
+                            let sy = specified::LengthOrPercentage::parse(context, input)?;
                             result.push(SpecifiedOperation::Translate(sx, Some(sy)));
                         } else {
                             result.push(SpecifiedOperation::Translate(sx, None));
                         }
                         Ok(true)
-                    }))
+                    })?
                 },
                 "translatex" => {
-                    try!(input.parse_nested_block(|input| {
-                        let tx = try!(specified::LengthOrPercentage::parse(context, input));
+                    input.parse_nested_block(|input| {
+                        let tx = specified::LengthOrPercentage::parse(context, input)?;
                         result.push(SpecifiedOperation::TranslateX(tx));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "translatey" => {
-                    try!(input.parse_nested_block(|input| {
-                        let ty = try!(specified::LengthOrPercentage::parse(context, input));
+                    input.parse_nested_block(|input| {
+                        let ty = specified::LengthOrPercentage::parse(context, input)?;
                         result.push(SpecifiedOperation::TranslateY(ty));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "translatez" => {
-                    try!(input.parse_nested_block(|input| {
-                        let tz = try!(specified::Length::parse(context, input));
+                    input.parse_nested_block(|input| {
+                        let tz = specified::Length::parse(context, input)?;
                         result.push(SpecifiedOperation::TranslateZ(tz));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "translate3d" => {
-                    try!(input.parse_nested_block(|input| {
-                        let tx = try!(specified::LengthOrPercentage::parse(context, input));
-                        try!(input.expect_comma());
-                        let ty = try!(specified::LengthOrPercentage::parse(context, input));
-                        try!(input.expect_comma());
-                        let tz = try!(specified::Length::parse(context, input));
+                    input.parse_nested_block(|input| {
+                        let tx = specified::LengthOrPercentage::parse(context, input)?;
+                        input.expect_comma()?;
+                        let ty = specified::LengthOrPercentage::parse(context, input)?;
+                        input.expect_comma()?;
+                        let tz = specified::Length::parse(context, input)?;
                         result.push(SpecifiedOperation::Translate3D(tx, ty, tz));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "scale" => {
-                    try!(input.parse_nested_block(|input| {
-                        let sx = try!(specified::parse_number(context, input));
+                    input.parse_nested_block(|input| {
+                        let sx = specified::parse_number(context, input)?;
                         if input.try(|input| input.expect_comma()).is_ok() {
-                            let sy = try!(specified::parse_number(context, input));
+                            let sy = specified::parse_number(context, input)?;
                             result.push(SpecifiedOperation::Scale(sx, Some(sy)));
                         } else {
                             result.push(SpecifiedOperation::Scale(sx, None));
                         }
                         Ok(true)
-                    }))
+                    })?
                 },
                 "scalex" => {
-                    try!(input.parse_nested_block(|input| {
-                        let sx = try!(specified::parse_number(context, input));
+                    input.parse_nested_block(|input| {
+                        let sx = specified::parse_number(context, input)?;
                         result.push(SpecifiedOperation::ScaleX(sx));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "scaley" => {
-                    try!(input.parse_nested_block(|input| {
-                        let sy = try!(specified::parse_number(context, input));
+                    input.parse_nested_block(|input| {
+                        let sy = specified::parse_number(context, input)?;
                         result.push(SpecifiedOperation::ScaleY(sy));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "scalez" => {
-                    try!(input.parse_nested_block(|input| {
-                        let sz = try!(specified::parse_number(context, input));
+                    input.parse_nested_block(|input| {
+                        let sz = specified::parse_number(context, input)?;
                         result.push(SpecifiedOperation::ScaleZ(sz));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "scale3d" => {
-                    try!(input.parse_nested_block(|input| {
-                        let sx = try!(specified::parse_number(context, input));
-                        try!(input.expect_comma());
-                        let sy = try!(specified::parse_number(context, input));
-                        try!(input.expect_comma());
-                        let sz = try!(specified::parse_number(context, input));
+                    input.parse_nested_block(|input| {
+                        let sx = specified::parse_number(context, input)?;
+                        input.expect_comma()?;
+                        let sy = specified::parse_number(context, input)?;
+                        input.expect_comma()?;
+                        let sz = specified::parse_number(context, input)?;
                         result.push(SpecifiedOperation::Scale3D(sx, sy, sz));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "rotate" => {
-                    try!(input.parse_nested_block(|input| {
-                        let theta = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let theta = specified::Angle::parse_with_unitless(context, input)?;
                         result.push(SpecifiedOperation::Rotate(theta));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "rotatex" => {
-                    try!(input.parse_nested_block(|input| {
-                        let theta = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let theta = specified::Angle::parse_with_unitless(context, input)?;
                         result.push(SpecifiedOperation::RotateX(theta));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "rotatey" => {
-                    try!(input.parse_nested_block(|input| {
-                        let theta = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let theta = specified::Angle::parse_with_unitless(context, input)?;
                         result.push(SpecifiedOperation::RotateY(theta));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "rotatez" => {
-                    try!(input.parse_nested_block(|input| {
-                        let theta = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let theta = specified::Angle::parse_with_unitless(context, input)?;
                         result.push(SpecifiedOperation::RotateZ(theta));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "rotate3d" => {
-                    try!(input.parse_nested_block(|input| {
-                        let ax = try!(specified::parse_number(context, input));
-                        try!(input.expect_comma());
-                        let ay = try!(specified::parse_number(context, input));
-                        try!(input.expect_comma());
-                        let az = try!(specified::parse_number(context, input));
-                        try!(input.expect_comma());
-                        let theta = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let ax = specified::parse_number(context, input)?;
+                        input.expect_comma()?;
+                        let ay = specified::parse_number(context, input)?;
+                        input.expect_comma()?;
+                        let az = specified::parse_number(context, input)?;
+                        input.expect_comma()?;
+                        let theta = specified::Angle::parse_with_unitless(context, input)?;
                         // TODO(gw): Check the axis can be normalized!!
                         result.push(SpecifiedOperation::Rotate3D(ax, ay, az, theta));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "skew" => {
-                    try!(input.parse_nested_block(|input| {
-                        let theta_x = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let theta_x = specified::Angle::parse_with_unitless(context, input)?;
                         if input.try(|input| input.expect_comma()).is_ok() {
-                            let theta_y = try!(specified::Angle::parse_with_unitless(context, input));
+                            let theta_y = specified::Angle::parse_with_unitless(context, input)?;
                             result.push(SpecifiedOperation::Skew(theta_x, Some(theta_y)));
                         } else {
                             result.push(SpecifiedOperation::Skew(theta_x, None));
                         }
                         Ok(true)
-                    }))
+                    })?
                 },
                 "skewx" => {
-                    try!(input.parse_nested_block(|input| {
-                        let theta_x = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let theta_x = specified::Angle::parse_with_unitless(context, input)?;
                         result.push(SpecifiedOperation::SkewX(theta_x));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "skewy" => {
-                    try!(input.parse_nested_block(|input| {
-                        let theta_y = try!(specified::Angle::parse_with_unitless(context, input));
+                    input.parse_nested_block(|input| {
+                        let theta_y = specified::Angle::parse_with_unitless(context, input)?;
                         result.push(SpecifiedOperation::SkewY(theta_y));
                         Ok(true)
-                    }))
+                    })?
                 },
                 "perspective" => {
-                    try!(input.parse_nested_block(|input| {
-                        let d = try!(specified::Length::parse_non_negative(context, input));
+                    input.parse_nested_block(|input| {
+                        let d = specified::Length::parse_non_negative(context, input)?;
                         result.push(SpecifiedOperation::Perspective(d));
                         Ok(true)
-                    }))
+                    })?
                 },
                 _ => false
             };
             if !valid_fn {
                 return Err(StyleParseError::UnexpectedFunction(name).into());
             }
         }
 
@@ -1752,20 +1752,20 @@
                 return dest.write_str("strict")
             }
 
             let mut has_any = false;
             macro_rules! maybe_write_value {
                 ($ident:ident => $str:expr) => {
                     if self.contains($ident) {
                         if has_any {
-                            try!(dest.write_str(" "));
+                            dest.write_str(" ")?;
                         }
                         has_any = true;
-                        try!(dest.write_str($str));
+                        dest.write_str($str)?;
                     }
                 }
             }
             maybe_write_value!(LAYOUT => "layout");
             maybe_write_value!(STYLE => "style");
             maybe_write_value!(PAINT => "paint");
 
             debug_assert!(has_any);
--- a/servo/components/style/properties/longhand/counters.mako.rs
+++ b/servo/components/style/properties/longhand/counters.mako.rs
@@ -66,28 +66,28 @@
             % endif
         }
 
         impl ToCss for ContentItem {
             fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
                 match *self {
                     ContentItem::String(ref s) => s.to_css(dest),
                     ContentItem::Counter(ref s, ref counter_style) => {
-                        try!(dest.write_str("counter("));
-                        try!(cssparser::serialize_identifier(&**s, dest));
-                        try!(dest.write_str(", "));
-                        try!(counter_style.to_css(dest));
+                        dest.write_str("counter(")?;
+                        cssparser::serialize_identifier(&**s, dest)?;
+                        dest.write_str(", ")?;
+                        counter_style.to_css(dest)?;
                         dest.write_str(")")
                     }
                     ContentItem::Counters(ref s, ref separator, ref counter_style) => {
-                        try!(dest.write_str("counters("));
-                        try!(cssparser::serialize_identifier(&**s, dest));
-                        try!(dest.write_str(", "));
+                        dest.write_str("counters(")?;
+                        cssparser::serialize_identifier(&**s, dest)?;
+                        dest.write_str(", ")?;
                         separator.to_css(dest)?;
-                        try!(dest.write_str(", "));
+                        dest.write_str(", ")?;
                         counter_style.to_css(dest)?;
                         dest.write_str(")")
                     }
                     ContentItem::OpenQuote => dest.write_str("open-quote"),
                     ContentItem::CloseQuote => dest.write_str("close-quote"),
                     ContentItem::NoOpenQuote => dest.write_str("no-open-quote"),
                     ContentItem::NoCloseQuote => dest.write_str("no-close-quote"),
 
@@ -116,20 +116,20 @@
                 match *self {
                     T::Normal => dest.write_str("normal"),
                     T::None => dest.write_str("none"),
                     % if product == "gecko":
                         T::MozAltContent => dest.write_str("-moz-alt-content"),
                     % endif
                     T::Items(ref content) => {
                         let mut iter = content.iter();
-                        try!(iter.next().unwrap().to_css(dest));
+                        iter.next().unwrap().to_css(dest)?;
                         for c in iter {
-                            try!(dest.write_str(" "));
-                            try!(c.to_css(dest));
+                            dest.write_str(" ")?;
+                            c.to_css(dest)?;
                         }
                         Ok(())
                     }
                 }
             }
         }
     }
     #[inline]
@@ -181,36 +181,36 @@
             % endif
             match input.next() {
                 Ok(Token::QuotedString(value)) => {
                     content.push(ContentItem::String(value.into_owned()))
                 }
                 Ok(Token::Function(name)) => {
                     let result = match_ignore_ascii_case! { &name,
                         "counter" => Some(input.parse_nested_block(|input| {
-                            let name = try!(input.expect_ident()).into_owned();
+                            let name = input.expect_ident()?.into_owned();
                             let style = parse_counter_style(context, input);
                             Ok(ContentItem::Counter(name, style))
                         })),
                         "counters" => Some(input.parse_nested_block(|input| {
-                            let name = try!(input.expect_ident()).into_owned();
-                            try!(input.expect_comma());
-                            let separator = try!(input.expect_string()).into_owned();
+                            let name = input.expect_ident()?.into_owned();
+                            input.expect_comma()?;
+                            let separator = input.expect_string()?.into_owned();
                             let style = parse_counter_style(context, input);
                             Ok(ContentItem::Counters(name, separator, style))
                         })),
                         % if product == "gecko":
                             "attr" => Some(input.parse_nested_block(|input| {
                                 Ok(ContentItem::Attr(Attr::parse_function(context, input)?))
                             })),
                         % endif
                         _ => None
                     };
                     match result {
-                        Some(result) => content.push(try!(result)),
+                        Some(result) => content.push(result?),
                         None => return Err(StyleParseError::UnexpectedFunction(name).into())
                     }
                 }
                 Ok(Token::Ident(ident)) => {
                     let valid = match_ignore_ascii_case! { &ident,
                         "open-quote" => { content.push(ContentItem::OpenQuote); true },
                         "close-quote" => { content.push(ContentItem::CloseQuote); true },
                         "no-open-quote" => { content.push(ContentItem::NoOpenQuote); true },
--- a/servo/components/style/properties/longhand/effects.mako.rs
+++ b/servo/components/style/properties/longhand/effects.mako.rs
@@ -154,66 +154,66 @@
             }
         }
     }
 
     impl ToCss for computed_value::T {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             let mut iter = self.filters.iter();
             if let Some(filter) = iter.next() {
-                try!(filter.to_css(dest));
+                filter.to_css(dest)?;
             } else {
-                try!(dest.write_str("none"));
+                dest.write_str("none")?;
                 return Ok(())
             }
             for filter in iter {
-                try!(dest.write_str(" "));
-                try!(filter.to_css(dest));
+                dest.write_str(" ")?;
+                filter.to_css(dest)?;
             }
             Ok(())
         }
     }
 
     impl ToCss for SpecifiedValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             let mut iter = self.0.iter();
             if let Some(filter) = iter.next() {
-                try!(filter.to_css(dest));
+                filter.to_css(dest)?;
             } else {
-                try!(dest.write_str("none"));
+                dest.write_str("none")?;
                 return Ok(())
             }
             for filter in iter {
-                try!(dest.write_str(" "));
-                try!(filter.to_css(dest));
+                dest.write_str(" ")?;
+                filter.to_css(dest)?;
             }
             Ok(())
         }
     }
 
     impl ToCss for computed_value::Filter {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             match *self {
                 computed_value::Filter::Blur(ref value) => {
-                    try!(dest.write_str("blur("));
-                    try!(value.to_css(dest));
-                    try!(dest.write_str(")"));
+                    dest.write_str("blur(")?;
+                    value.to_css(dest)?;
+                    dest.write_str(")")?;
                 }
-                computed_value::Filter::Brightness(value) => try!(write!(dest, "brightness({})", value)),
-                computed_value::Filter::Contrast(value) => try!(write!(dest, "contrast({})", value)),
-                computed_value::Filter::Grayscale(value) => try!(write!(dest, "grayscale({})", value)),
+                computed_value::Filter::Brightness(value) => write!(dest, "brightness({})", value)?,
+                computed_value::Filter::Contrast(value) => write!(dest, "contrast({})", value)?,
+                computed_value::Filter::Grayscale(value) => write!(dest, "grayscale({})", value)?,
                 computed_value::Filter::HueRotate(value) => {
-                    try!(dest.write_str("hue-rotate("));
-                    try!(value.to_css(dest));
-                    try!(dest.write_str(")"));
+                    dest.write_str("hue-rotate(")?;
+                    value.to_css(dest)?;
+                    dest.write_str(")")?;
                 }
-                computed_value::Filter::Invert(value) => try!(write!(dest, "invert({})", value)),
-                computed_value::Filter::Opacity(value) => try!(write!(dest, "opacity({})", value)),
-                computed_value::Filter::Saturate(value) => try!(write!(dest, "saturate({})", value)),
-                computed_value::Filter::Sepia(value) => try!(write!(dest, "sepia({})", value)),
+                computed_value::Filter::Invert(value) => write!(dest, "invert({})", value)?,
+                computed_value::Filter::Opacity(value) => write!(dest, "opacity({})", value)?,
+                computed_value::Filter::Saturate(value) => write!(dest, "saturate({})", value)?,
+                computed_value::Filter::Sepia(value) => write!(dest, "sepia({})", value)?,
                 % if product == "gecko":
                 computed_value::Filter::DropShadow(shadow) => {
                     dest.write_str("drop-shadow(")?;
                     shadow.to_css(dest)?;
                     dest.write_str(")")?;
                 }
                 computed_value::Filter::Url(ref url) => {
                     url.to_css(dest)?;
@@ -223,32 +223,32 @@
             Ok(())
         }
     }
 
     impl ToCss for SpecifiedFilter {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             match *self {
                 SpecifiedFilter::Blur(ref value) => {
-                    try!(dest.write_str("blur("));
-                    try!(value.to_css(dest));
-                    try!(dest.write_str(")"));
+                    dest.write_str("blur(")?;
+                    value.to_css(dest)?;
+                    dest.write_str(")")?;
                 }
-                SpecifiedFilter::Brightness(value) => try!(write!(dest, "brightness({})", value)),
-                SpecifiedFilter::Contrast(value) => try!(write!(dest, "contrast({})", value)),
-                SpecifiedFilter::Grayscale(value) => try!(write!(dest, "grayscale({})", value)),
+                SpecifiedFilter::Brightness(value) => write!(dest, "brightness({})", value)?,
+                SpecifiedFilter::Contrast(value) => write!(dest, "contrast({})", value)?,
+                SpecifiedFilter::Grayscale(value) => write!(dest, "grayscale({})", value)?,
                 SpecifiedFilter::HueRotate(value) => {
-                    try!(dest.write_str("hue-rotate("));
-                    try!(value.to_css(dest));
-                    try!(dest.write_str(")"));
+                    dest.write_str("hue-rotate(")?;
+                    value.to_css(dest)?;
+                    dest.write_str(")")?;
                 }
-                SpecifiedFilter::Invert(value) => try!(write!(dest, "invert({})", value)),
-                SpecifiedFilter::Opacity(value) => try!(write!(dest, "opacity({})", value)),
-                SpecifiedFilter::Saturate(value) => try!(write!(dest, "saturate({})", value)),
-                SpecifiedFilter::Sepia(value) => try!(write!(dest, "sepia({})", value)),
+                SpecifiedFilter::Invert(value) => write!(dest, "invert({})", value)?,
+                SpecifiedFilter::Opacity(value) => write!(dest, "opacity({})", value)?,
+                SpecifiedFilter::Saturate(value) => write!(dest, "saturate({})", value)?,
+                SpecifiedFilter::Sepia(value) => write!(dest, "sepia({})", value)?,
                 % if product == "gecko":
                 SpecifiedFilter::DropShadow(ref shadow) => {
                     dest.write_str("drop-shadow(")?;
                     shadow.to_css(dest)?;
                     dest.write_str(")")?;
                 }
                 SpecifiedFilter::Url(ref url) => {
                     url.to_css(dest)?;
@@ -272,34 +272,34 @@
         }
         loop {
             % if product == "gecko":
                 if let Ok(url) = input.try(|i| SpecifiedUrl::parse(context, i)) {
                     filters.push(SpecifiedFilter::Url(url));
                 } else
             % endif
             if let Ok(function_name) = input.try(|input| input.expect_function()) {
-                filters.push(try!(input.parse_nested_block(|input| {
+                filters.push(input.parse_nested_block(|input| {
                     match_ignore_ascii_case! { &function_name,
                         "blur" => specified::Length::parse_non_negative(context, input).map(SpecifiedFilter::Blur),
                         "brightness" => parse_factor(input).map(SpecifiedFilter::Brightness),
                         "contrast" => parse_factor(input).map(SpecifiedFilter::Contrast),
                         "grayscale" => parse_factor(input).map(SpecifiedFilter::Grayscale),
                         "hue-rotate" => Angle::parse(context, input).map(SpecifiedFilter::HueRotate),
                         "invert" => parse_factor(input).map(SpecifiedFilter::Invert),
                         "opacity" => parse_factor(input).map(SpecifiedFilter::Opacity),
                         "saturate" => parse_factor(input).map(SpecifiedFilter::Saturate),
                         "sepia" => parse_factor(input).map(SpecifiedFilter::Sepia),
                         % if product == "gecko":
                         "drop-shadow" => specified::Shadow::parse(context, input, true)
                                              .map(SpecifiedFilter::DropShadow),
                         % endif
                         _ => Err(StyleParseError::UnexpectedFunction(function_name.clone()).into())
                     }
-                })));
+                })?);
             } else if filters.is_empty() {
                 return Err(StyleParseError::UnspecifiedError.into())
             } else {
                 return Ok(SpecifiedValue(filters))
             }
         }
     }
 
--- a/servo/components/style/properties/longhand/font.mako.rs
+++ b/servo/components/style/properties/longhand/font.mako.rs
@@ -155,17 +155,17 @@ macro_rules! impl_gecko_keyword_from_tra
             /// Parse a font-family value
             pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
                 if let Ok(value) = input.try(|input| input.expect_string()) {
                     return Ok(FontFamily::FamilyName(FamilyName {
                         name: Atom::from(&*value),
                         quoted: true,
                     }))
                 }
-                let first_ident = try!(input.expect_ident());
+                let first_ident = input.expect_ident()?;
 
                 // FIXME(bholley): The fast thing to do here would be to look up the
                 // string (as lowercase) in the static atoms table. We don't have an
                 // API to do that yet though, so we do the simple thing for now.
                 let mut css_wide_keyword = false;
                 match_ignore_ascii_case! { &first_ident,
                     "serif" => return Ok(FontFamily::Generic(atom!("serif"))),
                     "sans-serif" => return Ok(FontFamily::Generic(atom!("sans-serif"))),
@@ -266,20 +266,20 @@ macro_rules! impl_gecko_keyword_from_tra
                     },
                 }
             }
         }
 
         impl ToCss for T {
             fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
                 let mut iter = self.0.iter();
-                try!(iter.next().unwrap().to_css(dest));
+                iter.next().unwrap().to_css(dest)?;
                 for family in iter {
-                    try!(dest.write_str(", "));
-                    try!(family.to_css(dest));
+                    dest.write_str(", ")?;
+                    family.to_css(dest)?;
                 }
                 Ok(())
             }
         }
 
         #[derive(Debug, Clone, PartialEq, Eq, Hash)]
         #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
         pub struct T(pub Vec<FontFamily>);
@@ -1120,18 +1120,17 @@ macro_rules! impl_gecko_keyword_from_tra
             }
         }
 
         impl Animatable for T {
             fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64)
                 -> Result<Self, ()> {
                 match (*self, *other) {
                     (T::Number(ref number), T::Number(ref other)) =>
-                        Ok(T::Number(try!(number.add_weighted(other,
-                                                              self_portion, other_portion)))),
+                        Ok(T::Number(number.add_weighted(other, self_portion, other_portion)?)),
                     _ => Err(()),
                 }
             }
 
             #[inline]
             fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
                 match (*self, *other) {
                     (T::Number(ref number), T::Number(ref other)) =>
@@ -1156,17 +1155,17 @@ macro_rules! impl_gecko_keyword_from_tra
     pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<SpecifiedValue, ParseError<'i>> {
         use values::specified::Number;
 
         if input.try(|input| input.expect_ident_matching("none")).is_ok() {
             return Ok(SpecifiedValue::None);
         }
 
-        Ok(SpecifiedValue::Number(try!(Number::parse_non_negative(context, input))))
+        Ok(SpecifiedValue::Number(Number::parse_non_negative(context, input)?))
     }
 </%helpers:longhand>
 
 <%helpers:longhand products="gecko" name="font-synthesis" animation_value_type="discrete"
                    spec="https://drafts.csswg.org/css-fonts/#propdef-font-synthesis">
     use std::fmt;
     use style_traits::ToCss;
     use values::computed::ComputedValueAsSpecified;
@@ -1322,20 +1321,20 @@ macro_rules! impl_gecko_keyword_from_tra
             }
 
             let mut has_any = false;
 
             macro_rules! write_value {
                 ($ident:ident => $str:expr) => {
                     if self.intersects($ident) {
                         if has_any {
-                            try!(dest.write_str(" "));
+                            dest.write_str(" ")?;
                         }
                         has_any = true;
-                        try!(dest.write_str($str));
+                        dest.write_str($str)?;
                     }
                 }
             }
 
             write_value!(HISTORICAL_FORMS => "historical-forms");
             write_value!(STYLISTIC => "stylistic");
             write_value!(STYLESET => "styleset");
             write_value!(CHARACTER_VARIANT => "character-variant");
@@ -1468,20 +1467,20 @@ macro_rules! exclusive_value {
             }
 
             let mut has_any = false;
 
             macro_rules! write_value {
                 ($ident:ident => $str:expr) => {
                     if self.intersects($ident) {
                         if has_any {
-                            try!(dest.write_str(" "));
+                            dest.write_str(" ")?;
                         }
                         has_any = true;
-                        try!(dest.write_str($str));
+                        dest.write_str($str)?;
                     }
                 }
             }
 
             write_value!(JIS78 => "jis78");
             write_value!(JIS83 => "jis83");
             write_value!(JIS90 => "jis90");
             write_value!(JIS04 => "jis04");
@@ -1615,20 +1614,20 @@ macro_rules! exclusive_value {
             }
 
             let mut has_any = false;
 
             macro_rules! write_value {
                 ($ident:ident => $str:expr) => {
                     if self.intersects($ident) {
                         if has_any {
-                            try!(dest.write_str(" "));
+                            dest.write_str(" ")?;
                         }
                         has_any = true;
-                        try!(dest.write_str($str));
+                        dest.write_str($str)?;
                     }
                 }
             }
 
             write_value!(COMMON_LIGATURES => "common-ligatures");
             write_value!(NO_COMMON_LIGATURES => "no-common-ligatures");
             write_value!(DISCRETIONARY_LIGATURES => "discretionary-ligatures");
             write_value!(NO_DISCRETIONARY_LIGATURES => "no-discretionary-ligatures");
@@ -1771,20 +1770,20 @@ macro_rules! exclusive_value {
             }
 
             let mut has_any = false;
 
             macro_rules! write_value {
                 ($ident:ident => $str:expr) => {
                     if self.intersects($ident) {
                         if has_any {
-                            try!(dest.write_str(" "));
+                            dest.write_str(" ")?;
                         }
                         has_any = true;
-                        try!(dest.write_str($str));
+                        dest.write_str($str)?;
                     }
                 }
             }
 
             write_value!(LINING_NUMS => "lining-nums");
             write_value!(OLDSTYLE_NUMS => "oldstyle-nums");
             write_value!(PROPORTIONAL_NUMS => "proportional-nums");
             write_value!(TABULAR_NUMS => "tabular-nums");
--- a/servo/components/style/properties/longhand/inherited_box.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_box.mako.rs
@@ -77,17 +77,17 @@
     pub struct SpecifiedValue {
         pub angle: Option<Angle>,
         pub flipped: bool
     }
 
     impl ToCss for SpecifiedValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             if let Some(angle) = self.angle {
-                try!(angle.to_css(dest));
+                angle.to_css(dest)?;
                 if self.flipped {
                     dest.write_str(" flip")
                 } else {
                     Ok(())
                 }
             } else {
                 if self.flipped {
                     dest.write_str("flip")
@@ -158,19 +158,19 @@
         }
     }
 
     impl ToCss for computed_value::T {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             match *self {
                 computed_value::T::FromImage => dest.write_str("from-image"),
                 computed_value::T::AngleWithFlipped(angle, flipped) => {
-                    try!(angle.to_css(dest));
+                    angle.to_css(dest)?;
                     if flipped {
-                        try!(dest.write_str(" flip"));
+                        dest.write_str(" flip")?;
                     }
                     Ok(())
                 },
             }
         }
     }
 
     // from-image | <angle> | [<angle>? flip]
--- a/servo/components/style/properties/longhand/inherited_table.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_table.mako.rs
@@ -39,32 +39,32 @@
         }
 
         /// https://drafts.csswg.org/css-transitions/#animtype-simple-list
         impl Animatable for T {
             #[inline]
             fn add_weighted(&self, other: &Self, self_portion: f64, other_portion: f64)
                 -> Result<Self, ()> {
                 Ok(T {
-                    horizontal: try!(self.horizontal.add_weighted(&other.horizontal,
-                                                                  self_portion, other_portion)),
-                    vertical: try!(self.vertical.add_weighted(&other.vertical,
-                                                              self_portion, other_portion)),
+                    horizontal: self.horizontal.add_weighted(&other.horizontal,
+                                                             self_portion, other_portion)?,
+                    vertical: self.vertical.add_weighted(&other.vertical,
+                                                         self_portion, other_portion)?,
                 })
             }
 
             #[inline]
             fn compute_distance(&self, other: &Self) -> Result<f64, ()> {
                 self.compute_squared_distance(other).map(|sd| sd.sqrt())
             }
 
             #[inline]
             fn compute_squared_distance(&self, other: &Self) -> Result<f64, ()> {
-                Ok(try!(self.horizontal.compute_squared_distance(&other.horizontal)) +
-                   try!(self.vertical.compute_squared_distance(&other.vertical)))
+                Ok(self.horizontal.compute_squared_distance(&other.horizontal)? +
+                   self.vertical.compute_squared_distance(&other.vertical)?)
             }
         }
     }
 
     #[derive(Clone, Debug, HasViewportPercentage, PartialEq)]
     #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
     pub struct SpecifiedValue {
         pub horizontal: Length,
@@ -78,19 +78,19 @@
             vertical: Au(0),
         }
     }
 
     impl ToCss for SpecifiedValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result
             where W: fmt::Write,
         {
-            try!(self.horizontal.to_css(dest));
+            self.horizontal.to_css(dest)?;
             if let Some(vertical) = self.vertical.as_ref() {
-                try!(dest.write_str(" "));
+                dest.write_str(" ")?;
                 vertical.to_css(dest)?;
             }
             Ok(())
         }
     }
 
     impl ToComputedValue for SpecifiedValue {
         type ComputedValue = computed_value::T;
--- a/servo/components/style/properties/longhand/inherited_text.mako.rs
+++ b/servo/components/style/properties/longhand/inherited_text.mako.rs
@@ -465,38 +465,38 @@
         Shape(ShapeKeyword),
         FillAndShape(bool, ShapeKeyword),
     }
 
     impl ToCss for KeywordValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             if let Some(fill) = self.fill() {
                 if fill {
-                    try!(dest.write_str("filled"));
+                    dest.write_str("filled")?;
                 } else {
-                    try!(dest.write_str("open"));
+                    dest.write_str("open")?;
                 }
             }
             if let Some(shape) = self.shape() {
                 if self.fill().is_some() {
-                    try!(dest.write_str(" "));
+                    dest.write_str(" ")?;
                 }
-                try!(shape.to_css(dest));
+                shape.to_css(dest)?;
             }
             Ok(())
         }
     }
     impl ToCss for computed_value::KeywordValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             if self.fill {
-                try!(dest.write_str("filled"));
+                dest.write_str("filled")?;
             } else {
-                try!(dest.write_str("open"));
+                dest.write_str("open")?;
             }
-            try!(dest.write_str(" "));
+            dest.write_str(" ")?;
             self.shape.to_css(dest)
         }
     }
 
     impl KeywordValue {
         fn fill(&self) -> Option<bool> {
             match *self {
                 KeywordValue::Fill(fill) |
@@ -638,21 +638,21 @@
 
     pub fn get_initial_value() -> computed_value::T {
         SpecifiedValue(HorizontalWritingModeValue::Over, VerticalWritingModeValue::Right)
     }
 
     pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<SpecifiedValue, ParseError<'i>> {
        if let Ok(horizontal) = input.try(|input| HorizontalWritingModeValue::parse(input)) {
-            let vertical = try!(VerticalWritingModeValue::parse(input));
+            let vertical = VerticalWritingModeValue::parse(input)?;
             Ok(SpecifiedValue(horizontal, vertical))
         } else {
-            let vertical = try!(VerticalWritingModeValue::parse(input));
-            let horizontal = try!(HorizontalWritingModeValue::parse(input));
+            let vertical = VerticalWritingModeValue::parse(input)?;
+            let horizontal = HorizontalWritingModeValue::parse(input)?;
             Ok(SpecifiedValue(horizontal, vertical))
         }
     }
 
     % if product == "gecko":
         impl SpecifiedValue {
             pub fn from_gecko_keyword(kw: u32) -> Self {
                 use gecko_bindings::structs;
--- a/servo/components/style/properties/longhand/pointing.mako.rs
+++ b/servo/components/style/properties/longhand/pointing.mako.rs
@@ -47,33 +47,33 @@
         pub struct T {
             pub images: Vec<Image>,
             pub keyword: Keyword,
         }
 
         #[cfg(feature = "gecko")]
         impl ToCss for Image {
             fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
-                try!(self.url.to_css(dest));
+                self.url.to_css(dest)?;
                 if let Some((x, y)) = self.hotspot {
-                    try!(dest.write_str(" "));
-                    try!(x.to_css(dest));
-                    try!(dest.write_str(" "));
-                    try!(y.to_css(dest));
+                    dest.write_str(" ")?;
+                    x.to_css(dest)?;
+                    dest.write_str(" ")?;
+                    y.to_css(dest)?;
                 }
                 Ok(())
             }
         }
 
         #[cfg(feature = "gecko")]
         impl ToCss for T {
             fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
                 for url in &self.images {
-                    try!(url.to_css(dest));
-                    try!(dest.write_str(", "));
+                    url.to_css(dest)?;
+                    dest.write_str(", ")?;
                 }
                 self.keyword.to_css(dest)
             }
         }
     }
 
     #[cfg(not(feature = "gecko"))]
     #[inline]
@@ -90,34 +90,34 @@
         }
     }
 
     impl Parse for computed_value::Keyword {
         fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<computed_value::Keyword, ParseError<'i>> {
             use std::ascii::AsciiExt;
             use style_traits::cursor::Cursor;
-            let ident = try!(input.expect_ident());
+            let ident = input.expect_ident()?;
             if ident.eq_ignore_ascii_case("auto") {
                 Ok(computed_value::Keyword::Auto)
             } else {
                 Cursor::from_css_keyword(&ident)
                     .map(computed_value::Keyword::Cursor)
                     .map_err(|()| SelectorParseError::UnexpectedIdent(ident).into())
             }
         }
     }
 
     #[cfg(feature = "gecko")]
     fn parse_image<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                            -> Result<computed_value::Image, ParseError<'i>> {
         Ok(computed_value::Image {
-            url: try!(SpecifiedUrl::parse(context, input)),
+            url: SpecifiedUrl::parse(context, input)?,
             hotspot: match input.try(|input| input.expect_number()) {
-                Ok(number) => Some((number, try!(input.expect_number()))),
+                Ok(number) => Some((number, input.expect_number()?)),
                 Err(_) => None,
             },
         })
     }
 
     #[cfg(not(feature = "gecko"))]
     pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<SpecifiedValue, ParseError<'i>> {
@@ -132,22 +132,22 @@
         loop {
             match input.try(|input| parse_image(context, input)) {
                 Ok(mut image) => {
                     image.url.build_image_value();
                     images.push(image)
                 }
                 Err(_) => break,
             }
-            try!(input.expect_comma());
+            input.expect_comma()?;
         }
 
         Ok(computed_value::T {
             images: images,
-            keyword: try!(computed_value::Keyword::parse(context, input)),
+            keyword: computed_value::Keyword::parse(context, input)?,
         })
     }
 </%helpers:longhand>
 
 // NB: `pointer-events: auto` (and use of `pointer-events` in anything that isn't SVG, in fact)
 // is nonstandard, slated for CSS4-UI.
 // TODO(pcwalton): SVG-only values.
 ${helpers.single_keyword("pointer-events", "auto none", animation_value_type="discrete",
--- a/servo/components/style/properties/longhand/text.mako.rs
+++ b/servo/components/style/properties/longhand/text.mako.rs
@@ -52,21 +52,21 @@
             pub sides_are_logical: bool
         }
     }
 
     impl ToCss for computed_value::T {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
             if self.sides_are_logical {
                 assert!(self.first == Side::Clip);
-                try!(self.second.to_css(dest));
+                self.second.to_css(dest)?;
             } else {
-                try!(self.first.to_css(dest));
-                try!(dest.write_str(" "));
-                try!(self.second.to_css(dest));
+                self.first.to_css(dest)?;
+                dest.write_str(" ")?;
+                self.second.to_css(dest)?;
             }
             Ok(())
         }
     }
 
     impl ToComputedValue for SpecifiedValue {
         type ComputedValue = computed_value::T;
 
@@ -128,20 +128,20 @@
                 }
                 other => Err(BasicParseError::UnexpectedToken(other).into()),
             }
         }
     }
 
     impl ToCss for SpecifiedValue {
         fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
-            try!(self.first.to_css(dest));
+            self.first.to_css(dest)?;
             if let Some(ref second) = self.second {
-                try!(dest.write_str(" "));
-                try!(second.to_css(dest));
+                dest.write_str(" ")?;
+                second.to_css(dest)?;
             }
             Ok(())
         }
     }
 </%helpers:longhand>
 
 ${helpers.single_keyword("unicode-bidi",
                          "normal embed isolate bidi-override isolate-override plaintext",
--- a/servo/components/style/properties/longhand/ui.mako.rs
+++ b/servo/components/style/properties/longhand/ui.mako.rs
@@ -73,17 +73,17 @@
     pub fn get_initial_specified_value() -> SpecifiedValue {
         computed_value::T(false)
     }
 
     impl ComputedValueAsSpecified for SpecifiedValue {}
 
     pub fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<SpecifiedValue, ParseError<'i>> {
-        match try!(input.expect_integer()) {
+        match input.expect_integer()? {
             0 => Ok(computed_value::T(false)),
             1 => Ok(computed_value::T(true)),
             _ => Err(StyleParseError::UnspecifiedError.into()),
         }
     }
 
     impl From<u8> for SpecifiedValue {
         fn from(bits: u8) -> SpecifiedValue {
--- a/servo/components/style/properties/properties.mako.rs
+++ b/servo/components/style/properties/properties.mako.rs
@@ -229,18 +229,18 @@ pub mod shorthands {
             //
             // FIXME(heycam) Try to share code with the helpers:shorthand
             // definition.
             input.look_for_var_functions();
             let start = input.position();
             while let Ok(_) = input.next() {}  // Look for var()
             if input.seen_var_functions() {
                 input.reset(start);
-                let (first_token_type, css) = try!(
-                    ::custom_properties::parse_non_custom_with_var(input));
+                let (first_token_type, css) =
+                    ::custom_properties::parse_non_custom_with_var(input)?;
                 declarations.all_shorthand = AllShorthand::WithVariables(Arc::new(UnparsedValue {
                     css: css.into_owned(),
                     first_token_type: first_token_type,
                     url_data: context.url_data.clone(),
                     from_shorthand: Some(ShorthandId::All),
                 }));
                 Ok(())
             } else {
@@ -1132,18 +1132,18 @@ impl HasViewportPercentage for PropertyD
                 val.borrow().has_viewport_percentage()
             }
         }
     }
 }
 
 impl fmt::Debug for PropertyDeclaration {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        try!(self.id().to_css(f));
-        try!(f.write_str(": "));
+        self.id().to_css(f)?;
+        f.write_str(": ")?;
         self.to_css(f)
     }
 }
 
 impl ToCss for PropertyDeclaration {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result
         where W: fmt::Write,
     {
--- a/servo/components/style/properties/shorthand/background.mako.rs
+++ b/servo/components/style/properties/shorthand/background.mako.rs
@@ -34,17 +34,17 @@
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
         let mut background_color = None;
 
         % for name in "image position_x position_y repeat size attachment origin clip".split():
             let mut background_${name} = background_${name}::SpecifiedValue(Vec::new());
         % endfor
-        try!(input.parse_comma_separated(|input| {
+        input.parse_comma_separated(|input| {
             // background-color can only be in the last element, so if it
             // is parsed anywhere before, the value is invalid.
             if background_color.is_some() {
                 return Err(StyleParseError::UnspecifiedError.into());
             }
 
             % for name in "image position repeat size attachment origin clip".split():
                 let mut ${name} = None;
@@ -57,17 +57,17 @@
                     }
                 }
                 if position.is_none() {
                     if let Ok(value) = input.try(|input| Position::parse(context, input)) {
                         position = Some(value);
 
                         // Parse background size, if applicable.
                         size = input.try(|input| {
-                            try!(input.expect_delim('/'));
+                            input.expect_delim('/')?;
                             background_size::single_value::parse(context, input)
                         }).ok();
 
                         continue
                     }
                 }
                 % for name in "image repeat attachment origin clip".split():
                     if ${name}.is_none() {
@@ -105,17 +105,17 @@
                         background_${name}.0.push(background_${name}::single_value
                                                                     ::get_initial_specified_value());
                     }
                 % endfor
                 Ok(())
             } else {
                 Err(StyleParseError::UnspecifiedError.into())
             }
-        }));
+        })?;
 
         Ok(expanded! {
              background_color: background_color.unwrap_or(Color::transparent()),
              background_image: background_image,
              background_position_x: background_position_x,
              background_position_y: background_position_y,
              background_repeat: background_repeat,
              background_attachment: background_attachment,
@@ -143,47 +143,47 @@
             % endfor
 
             for i in 0..len {
                 % for name in "image position_x position_y repeat size attachment origin clip".split():
                     let ${name} = &self.background_${name}.0[i];
                 % endfor
 
                 if i != 0 {
-                    try!(write!(dest, ", "));
+                    write!(dest, ", ")?;
                 }
 
                 if i == len - 1 {
-                    try!(self.background_color.to_css(dest));
-                    try!(write!(dest, " "));
+                    self.background_color.to_css(dest)?;
+                    write!(dest, " ")?;
                 }
 
-                try!(image.to_css(dest));
+                image.to_css(dest)?;
                 % for name in "repeat attachment".split():
-                    try!(write!(dest, " "));
-                    try!(${name}.to_css(dest));
+                    write!(dest, " ")?;
+                    ${name}.to_css(dest)?;
                 % endfor
 
-                try!(write!(dest, " "));
+                write!(dest, " ")?;
                 Position {
                     horizontal: position_x.clone(),
                     vertical: position_y.clone()
                 }.to_css(dest)?;
 
                 if *size != background_size::single_value::get_initial_specified_value() {
-                    try!(write!(dest, " / "));
-                    try!(size.to_css(dest));
+                    write!(dest, " / ")?;
+                    size.to_css(dest)?;
                 }
 
                 if *origin != Origin::padding_box || *clip != Clip::border_box {
-                    try!(write!(dest, " "));
-                    try!(origin.to_css(dest));
+                    write!(dest, " ")?;
+                    origin.to_css(dest)?;
                     if *clip != From::from(*origin) {
-                        try!(write!(dest, " "));
-                        try!(clip.to_css(dest));
+                        write!(dest, " ")?;
+                        clip.to_css(dest)?;
                     }
                 }
             }
 
             Ok(())
         }
     }
 </%helpers:shorthand>
--- a/servo/components/style/properties/shorthand/border.mako.rs
+++ b/servo/components/style/properties/shorthand/border.mako.rs
@@ -99,17 +99,17 @@ pub fn parse_border<'i, 't>(context: &Pa
             'border-%s-%s' % (side, prop)
             for prop in ['color', 'style', 'width']
         )}"
         alias="${maybe_moz_logical_alias(product, (side, logical), '-moz-border-%s')}"
         spec="${spec}">
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
-        let (color, style, width) = try!(super::parse_border(context, input));
+        let (color, style, width) = super::parse_border(context, input)?;
         Ok(expanded! {
             border_${to_rust_ident(side)}_color: color,
             border_${to_rust_ident(side)}_style: style,
             border_${to_rust_ident(side)}_width: width
         })
     }
 
     impl<'a> ToCss for LonghandsToSerialize<'a>  {
@@ -141,17 +141,17 @@ pub fn parse_border<'i, 't>(context: &Pa
                                     _moz_border_bottom_colors, _moz_border_left_colors};
     % endif
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
         use properties::longhands::{border_image_outset, border_image_repeat, border_image_slice};
         use properties::longhands::{border_image_source, border_image_width};
 
-        let (color, style, width) = try!(super::parse_border(context, input));
+        let (color, style, width) = super::parse_border(context, input)?;
         Ok(expanded! {
             % for side in PHYSICAL_SIDES:
                 border_${side}_color: color.clone(),
                 border_${side}_style: style,
                 border_${side}_width: width.clone(),
                 % if product == "gecko":
                     _moz_border_${side}_colors: _moz_border_${side}_colors::get_initial_specified_value(),
                 % endif
@@ -209,17 +209,17 @@ pub fn parse_border<'i, 't>(context: &Pa
      for corner in ['top-left', 'top-right', 'bottom-right', 'bottom-left']
 )}" extra_prefixes="webkit" spec="https://drafts.csswg.org/css-backgrounds/#border-radius">
     use values::generics::rect::Rect;
     use values::specified::border::BorderRadius;
     use parser::Parse;
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
-        let radii = try!(BorderRadius::parse(context, input));
+        let radii = BorderRadius::parse(context, input)?;
         Ok(expanded! {
             border_top_left_radius: radii.top_left,
             border_top_right_radius: radii.top_right,
             border_bottom_right_radius: radii.bottom_right,
             border_bottom_left_radius: radii.bottom_left,
         })
     }
 
@@ -257,25 +257,25 @@ pub fn parse_border<'i, 't>(context: &Pa
                 let mut ${name} = None;
             % endfor
             loop {
                 if slice.is_none() {
                     if let Ok(value) = input.try(|input| border_image_slice::parse(context, input)) {
                         slice = Some(value);
                         // Parse border image width and outset, if applicable.
                         let maybe_width_outset: Result<_, ParseError> = input.try(|input| {
-                            try!(input.expect_delim('/'));
+                            input.expect_delim('/')?;
 
                             // Parse border image width, if applicable.
                             let w = input.try(|input|
                                 border_image_width::parse(context, input)).ok();
 
                             // Parse border image outset if applicable.
                             let o = input.try(|input| {
-                                try!(input.expect_delim('/'));
+                                input.expect_delim('/')?;
                                 border_image_outset::parse(context, input)
                             }).ok();
                             if w.is_none() && o.is_none() {
                                Err(StyleParseError::UnspecifiedError.into())
                             }
                             else {
                                Ok((w, o))
                             }
@@ -308,17 +308,17 @@ pub fn parse_border<'i, 't>(context: &Pa
                         border_image_${name} = b_${name};
                     }
                 % endfor
                 Ok(())
             } else {
                 Err(StyleParseError::UnspecifiedError.into())
             }
         });
-        try!(result);
+        result?;
 
         Ok(expanded! {
             % for name in "outset repeat slice source width".split():
                 border_image_${name}: border_image_${name},
             % endfor
          })
     }
 
--- a/servo/components/style/properties/shorthand/box.mako.rs
+++ b/servo/components/style/properties/shorthand/box.mako.rs
@@ -130,17 +130,17 @@ macro_rules! try_parse_one {
             }
         }
 
         % for prop in "property duration timing_function delay".split():
         let mut ${prop}s = Vec::new();
         % endfor
 
         if input.try(|input| input.expect_ident_matching("none")).is_err() {
-            let results = try!(input.parse_comma_separated(|i| parse_one_transition(context, i)));
+            let results = input.parse_comma_separated(|i| parse_one_transition(context, i))?;
             for result in results {
                 % for prop in "property duration timing_function delay".split():
                 ${prop}s.push(result.transition_${prop});
                 % endfor
             }
         } else {
             // `transition: none` is a valid syntax, and we keep transition_property empty because |none| is not
             // a valid TransitionProperty.
@@ -252,17 +252,17 @@ macro_rules! try_parse_one {
                 })
             }
         }
 
         % for prop in props:
         let mut ${prop}s = vec![];
         % endfor
 
-        let results = try!(input.parse_comma_separated(|i| parse_one_animation(context, i)));
+        let results = input.parse_comma_separated(|i| parse_one_animation(context, i))?;
         for result in results.into_iter() {
             % for prop in props:
             ${prop}s.push(result.animation_${prop});
             % endfor
         }
 
         Ok(expanded! {
             % for prop in props:
@@ -284,17 +284,17 @@ macro_rules! try_parse_one {
             % for name in props[1:]:
                 if len != self.animation_${name}.0.len() {
                     return Ok(())
                 }
             % endfor
 
             for i in 0..len {
                 if i != 0 {
-                    try!(write!(dest, ", "));
+                    write!(dest, ", ")?;
                 }
 
                 % for name in props[1:]:
                     self.animation_${name}.0[i].to_css(dest)?;
                     dest.write_str(" ")?;
                 % endfor
                 self.animation_name.0[i].to_css(dest)?;
             }
@@ -305,17 +305,17 @@ macro_rules! try_parse_one {
 
 <%helpers:shorthand name="scroll-snap-type" products="gecko"
                     sub_properties="scroll-snap-type-x scroll-snap-type-y"
                     spec="https://drafts.csswg.org/css-scroll-snap/#propdef-scroll-snap-type">
     use properties::longhands::scroll_snap_type_x;
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
-        let result = try!(scroll_snap_type_x::parse(context, input));
+        let result = scroll_snap_type_x::parse(context, input)?;
         Ok(expanded! {
             scroll_snap_type_x: result,
             scroll_snap_type_y: result,
         })
     }
 
     impl<'a> ToCss for LonghandsToSerialize<'a>  {
         // Serializes into the single keyword value if both scroll-snap-type and scroll-snap-type-y are same.
--- a/servo/components/style/properties/shorthand/font.mako.rs
+++ b/servo/components/style/properties/shorthand/font.mako.rs
@@ -84,29 +84,29 @@
                 }
             }
             if stretch.is_none() {
                 if let Ok(value) = input.try(|input| font_stretch::parse(context, input)) {
                     stretch = Some(value);
                     continue
                 }
             }
-            size = Some(try!(font_size::parse(context, input)));
+            size = Some(font_size::parse(context, input)?);
             break
         }
         #[inline]
         fn count<T>(opt: &Option<T>) -> u8 {
             if opt.is_some() { 1 } else { 0 }
         }
         if size.is_none() ||
            (count(&style) + count(&weight) + count(&variant_caps) + count(&stretch) + nb_normals) > 4 {
             return Err(StyleParseError::UnspecifiedError.into())
         }
         let line_height = if input.try(|input| input.expect_delim('/')).is_ok() {
-            Some(try!(LineHeight::parse(context, input)))
+            Some(LineHeight::parse(context, input)?)
         } else {
             None
         };
         let family = FontFamily::parse(input)?;
         Ok(expanded! {
             % for name in "style weight stretch size variant_caps".split():
                 font_${name}: unwrap_or_initial!(font_${name}, ${name}),
             % endfor
--- a/servo/components/style/properties/shorthand/mask.mako.rs
+++ b/servo/components/style/properties/shorthand/mask.mako.rs
@@ -36,17 +36,17 @@
     }
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
         % for name in "image mode position_x position_y size repeat origin clip composite".split():
             let mut mask_${name} = mask_${name}::SpecifiedValue(Vec::new());
         % endfor
 
-        try!(input.parse_comma_separated(|input| {
+        input.parse_comma_separated(|input| {
             % for name in "image mode position size repeat origin clip composite".split():
                 let mut ${name} = None;
             % endfor
             loop {
                 if image.is_none() {
                     if let Ok(value) = input.try(|input| mask_image::single_value
                                                                    ::parse(context, input)) {
                         image = Some(value);
@@ -54,17 +54,17 @@
                     }
                 }
                 if position.is_none() {
                     if let Ok(value) = input.try(|input| Position::parse(context, input)) {
                         position = Some(value);
 
                         // Parse mask size, if applicable.
                         size = input.try(|input| {
-                            try!(input.expect_delim('/'));
+                            input.expect_delim('/')?;
                             mask_size::single_value::parse(context, input)
                         }).ok();
 
                         continue
                     }
                 }
                 % for name in "repeat origin clip composite mode".split():
                     if ${name}.is_none() {
@@ -101,17 +101,17 @@
                         mask_${name}.0.push(mask_${name}::single_value
                                                         ::get_initial_specified_value());
                     }
                 % endfor
                 Ok(())
             } else {
                 Err(StyleParseError::UnspecifiedError.into())
             }
-        }));
+        })?;
 
         Ok(expanded! {
             % for name in "image mode position_x position_y size repeat origin clip composite".split():
                 mask_${name}: mask_${name},
             % endfor
          })
     }
 
--- a/servo/components/style/properties/shorthand/outline.mako.rs
+++ b/servo/components/style/properties/shorthand/outline.mako.rs
@@ -61,17 +61,17 @@
     for corner in ['topleft', 'topright', 'bottomright', 'bottomleft']
 )}" products="gecko" spec="Nonstandard (https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius)">
     use values::generics::rect::Rect;
     use values::specified::border::BorderRadius;
     use parser::Parse;
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
-        let radii = try!(BorderRadius::parse(context, input));
+        let radii = BorderRadius::parse(context, input)?;
         Ok(expanded! {
             _moz_outline_radius_topleft: radii.top_left,
             _moz_outline_radius_topright: radii.top_right,
             _moz_outline_radius_bottomright: radii.bottom_right,
             _moz_outline_radius_bottomleft: radii.bottom_left,
         })
     }
 
--- a/servo/components/style/properties/shorthand/position.mako.rs
+++ b/servo/components/style/properties/shorthand/position.mako.rs
@@ -45,17 +45,17 @@
                     sub_properties="flex-grow flex-shrink flex-basis"
                     extra_prefixes="webkit"
                     derive_serialize="True"
                     spec="https://drafts.csswg.org/css-flexbox/#flex-property">
     use values::specified::Number;
 
     fn parse_flexibility<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                  -> Result<(Number, Option<Number>),ParseError<'i>> {
-        let grow = try!(Number::parse_non_negative(context, input));
+        let grow = Number::parse_non_negative(context, input)?;
         let shrink = input.try(|i| Number::parse_non_negative(context, i)).ok();
         Ok((grow, shrink))
     }
 
     pub fn parse_value<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                -> Result<Longhands, ParseError<'i>> {
         let mut grow = None;
         let mut shrink = None;
--- a/servo/components/style/servo/media_queries.rs
+++ b/servo/components/style/servo/media_queries.rs
@@ -149,30 +149,30 @@ impl Expression {
     ///
     /// ```
     /// (media-feature: media-value)
     /// ```
     ///
     /// Only supports width and width ranges for now.
     pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                          -> Result<Self, ParseError<'i>> {
-        try!(input.expect_parenthesis_block());
+        input.expect_parenthesis_block()?;
         input.parse_nested_block(|input| {
-            let name = try!(input.expect_ident());
-            try!(input.expect_colon());
+            let name = input.expect_ident()?;
+            input.expect_colon()?;
             // TODO: Handle other media features
             Ok(Expression(match_ignore_ascii_case! { &name,
                 "min-width" => {
-                    ExpressionKind::Width(Range::Min(try!(specified::Length::parse_non_negative(context, input))))
+                    ExpressionKind::Width(Range::Min(specified::Length::parse_non_negative(context, input)?))
                 },
                 "max-width" => {
-                    ExpressionKind::Width(Range::Max(try!(specified::Length::parse_non_negative(context, input))))
+                    ExpressionKind::Width(Range::Max(specified::Length::parse_non_negative(context, input)?))
                 },
                 "width" => {
-                    ExpressionKind::Width(Range::Eq(try!(specified::Length::parse_non_negative(context, input))))
+                    ExpressionKind::Width(Range::Eq(specified::Length::parse_non_negative(context, input)?))
                 },
                 _ => return Err(SelectorParseError::UnexpectedIdent(name.clone()).into())
             }))
         })
     }
 
     /// Evaluate this expression and return whether it matches the current
     /// device.
@@ -190,24 +190,24 @@ impl Expression {
         }
     }
 }
 
 impl ToCss for Expression {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result
         where W: fmt::Write,
     {
-        try!(write!(dest, "("));
+        write!(dest, "(")?;
         let (mm, l) = match self.0 {
             ExpressionKind::Width(Range::Min(ref l)) => ("min-", l),
             ExpressionKind::Width(Range::Max(ref l)) => ("max-", l),
             ExpressionKind::Width(Range::Eq(ref l)) => ("", l),
         };
-        try!(write!(dest, "{}width: ", mm));
-        try!(l.to_css(dest));
+        write!(dest, "{}width: ", mm)?;
+        l.to_css(dest)?;
         write!(dest, ")")
     }
 }
 
 /// An enumeration that represents a ranged value.
 ///
 /// Only public for testing, implementation details of `Expression` may change
 /// for Stylo.
--- a/servo/components/style/servo/restyle_damage.rs
+++ b/servo/components/style/servo/restyle_damage.rs
@@ -157,24 +157,24 @@ impl fmt::Display for ServoRestyleDamage
             , (REFLOW_OUT_OF_FLOW, "ReflowOutOfFlow")
             , (REFLOW, "Reflow")
             , (RESOLVE_GENERATED_CONTENT, "ResolveGeneratedContent")
             , (RECONSTRUCT_FLOW, "ReconstructFlow")
             ];
 
         for &(damage, damage_str) in &to_iter {
             if self.contains(damage) {
-                if !first_elem { try!(write!(f, " | ")); }
-                try!(write!(f, "{}", damage_str));
+                if !first_elem { write!(f, " | ")?; }
+                write!(f, "{}", damage_str)?;
                 first_elem = false;
             }
         }
 
         if first_elem {
-            try!(write!(f, "NoDamage"));
+            write!(f, "NoDamage")?;
         }
 
         Ok(())
     }
 }
 
 // NB: We need the braces inside the RHS due to Rust #8012.  This particular
 // version of this macro might be safe anyway, but we want to avoid silent
--- a/servo/components/style/stylesheets/document_rule.rs
+++ b/servo/components/style/stylesheets/document_rule.rs
@@ -25,22 +25,22 @@ pub struct DocumentRule {
     pub rules: Arc<Locked<CssRules>>,
     /// The line and column of the rule's source code.
     pub source_location: SourceLocation,
 }
 
 impl ToCssWithGuard for DocumentRule {
     fn to_css<W>(&self, guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
     where W: fmt::Write {
-        try!(dest.write_str("@-moz-document "));
-        try!(self.condition.to_css(dest));
-        try!(dest.write_str(" {"));
+        dest.write_str("@-moz-document ")?;
+        self.condition.to_css(dest)?;
+        dest.write_str(" {")?;
         for rule in self.rules.read_with(guard).0.iter() {
-            try!(dest.write_str(" "));
-            try!(rule.to_css(guard, dest));
+            dest.write_str(" ")?;
+            rule.to_css(guard, dest)?;
         }
         dest.write_str(" }")
     }
 }
 
 impl DeepCloneWithLock for DocumentRule {
     /// Deep clones this DocumentRule.
     fn deep_clone_with_lock(
--- a/servo/components/style/stylesheets/keyframes_rule.rs
+++ b/servo/components/style/stylesheets/keyframes_rule.rs
@@ -123,17 +123,17 @@ impl KeyframePercentage {
     }
 
     fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<KeyframePercentage, ParseError<'i>> {
         let percentage = if input.try(|input| input.expect_ident_matching("from")).is_ok() {
             KeyframePercentage::new(0.)
         } else if input.try(|input| input.expect_ident_matching("to")).is_ok() {
             KeyframePercentage::new(1.)
         } else {
-            let percentage = try!(input.expect_percentage());
+            let percentage = input.expect_percentage()?;
             if percentage >= 0. && percentage <= 1. {
                 KeyframePercentage::new(percentage)
             } else {
                 return Err(StyleParseError::UnspecifiedError.into());
             }
         };
 
         Ok(percentage)
@@ -188,19 +188,19 @@ pub struct Keyframe {
     /// `Arc` just for convenience.
     pub block: Arc<Locked<PropertyDeclarationBlock>>,
 }
 
 impl ToCssWithGuard for Keyframe {
     fn to_css<W>(&self, guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
     where W: fmt::Write {
         self.selector.to_css(dest)?;
-        try!(dest.write_str(" { "));
-        try!(self.block.read_with(guard).to_css(dest));
-        try!(dest.write_str(" }"));
+        dest.write_str(" { ")?;
+        self.block.read_with(guard).to_css(dest)?;
+        dest.write_str(" }")?;
         Ok(())
     }
 }
 
 impl Keyframe {
     /// Parse a CSS keyframe.
     pub fn parse<'i>(css: &'i str, parent_stylesheet: &Stylesheet)
                      -> Result<Arc<Locked<Self>>, ParseError<'i>> {
@@ -519,17 +519,17 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for Ke
 }
 
 impl<'a, 'b, 'i> DeclarationParser<'i> for KeyframeDeclarationParser<'a, 'b> {
     type Declaration = ();
     type Error = SelectorParseError<'i, StyleParseError<'i>>;
 
     fn parse_value<'t>(&mut self, name: CompactCowStr<'i>, input: &mut Parser<'i, 't>)
                        -> Result<(), ParseError<'i>> {
-        let id = try!(PropertyId::parse(name.into()));
+        let id = PropertyId::parse(name.into())?;
         match PropertyDeclaration::parse_into(self.declarations, id, self.context, input) {
             Ok(()) => {
                 // In case there is still unparsed text in the declaration, we should roll back.
                 input.expect_exhausted().map_err(|e| e.into())
             }
             Err(_e) => Err(StyleParseError::UnspecifiedError.into())
         }
     }
--- a/servo/components/style/stylesheets/rule_parser.rs
+++ b/servo/components/style/stylesheets/rule_parser.rs
@@ -447,17 +447,17 @@ impl<'a, 'b, 'i> AtRuleParser<'i> for Ne
                     rules: self.parse_nested_rules(input, CssRuleType::Supports),
                     enabled: enabled,
                     source_location: location,
                 }))))
             }
             AtRulePrelude::Viewport => {
                 let context = ParserContext::new_with_rule_type(self.context, Some(CssRuleType::Viewport));
                 Ok(CssRule::Viewport(Arc::new(self.shared_lock.wrap(
-                   try!(ViewportRule::parse(&context, input))))))
+                   ViewportRule::parse(&context, input)?))))
             }
             AtRulePrelude::Keyframes(name, prefix, location) => {
                 let context = ParserContext::new_with_rule_type(self.context, Some(CssRuleType::Keyframes));
                 Ok(CssRule::Keyframes(Arc::new(self.shared_lock.wrap(KeyframesRule {
                     name: name,
                     keyframes: parse_keyframe_list(&context, input, self.shared_lock),
                     vendor_prefix: prefix,
                     source_location: location,
--- a/servo/components/style/stylesheets/viewport_rule.rs
+++ b/servo/components/style/stylesheets/viewport_rule.rs
@@ -98,19 +98,19 @@ macro_rules! declare_viewport_descriptor
             }
         }
 
         impl ToCss for ViewportDescriptor {
             fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
                 match *self {
                     $(
                         ViewportDescriptor::$assigned_variant(ref val) => {
-                            try!(dest.write_str($assigned_variant_name));
-                            try!(dest.write_str(": "));
-                            try!(val.to_css(dest));
+                            dest.write_str($assigned_variant_name)?;
+                            dest.write_str(": ")?;
+                            val.to_css(dest)?;
                         },
                     )*
                 }
                 dest.write_str(";")
             }
         }
     };
 }
@@ -249,27 +249,27 @@ impl ViewportDescriptorDeclaration {
             descriptor: descriptor,
             important: important
         }
     }
 }
 
 impl ToCss for ViewportDescriptorDeclaration {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
-        try!(self.descriptor.to_css(dest));
+        self.descriptor.to_css(dest)?;
         if self.important {
-            try!(dest.write_str(" !important"));
+            dest.write_str(" !important")?;
         }
         dest.write_str(";")
     }
 }
 
 fn parse_shorthand<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                            -> Result<(ViewportLength, ViewportLength), ParseError<'i>> {
-    let min = try!(ViewportLength::parse(context, input));
+    let min = ViewportLength::parse(context, input)?;
     match input.try(|i| ViewportLength::parse(context, i)) {
         Err(_) => Ok((min.clone(), min)),
         Ok(max) => Ok((min, max))
     }
 }
 
 impl<'a, 'b, 'i> AtRuleParser<'i> for ViewportRuleParser<'a, 'b> {
     type Prelude = ();
@@ -296,17 +296,17 @@ impl<'a, 'b, 'i> DeclarationParser<'i> f
             }
         }
 
         macro_rules! ok {
             ($declaration:ident($parse:expr)) => {
                 Ok(vec![declaration!($declaration($parse))])
             };
             (shorthand -> [$min:ident, $max:ident]) => {{
-                let shorthand = try!(parse_shorthand(self.context, input));
+                let shorthand = parse_shorthand(self.context, input)?;
                 let important = input.try(parse_important).is_ok();
 
                 Ok(vec![declaration!($min(value: shorthand.0, important: important)),
                         declaration!($max(value: shorthand.1, important: important))])
             }}
         }
 
         match_ignore_ascii_case! { &*name,
@@ -510,22 +510,22 @@ impl ViewportRule {
         Some((name, value))
     }
 }
 
 impl ToCssWithGuard for ViewportRule {
     // Serialization of ViewportRule is not specced.
     fn to_css<W>(&self, _guard: &SharedRwLockReadGuard, dest: &mut W) -> fmt::Result
     where W: fmt::Write {
-        try!(dest.write_str("@viewport { "));
+        dest.write_str("@viewport { ")?;
         let mut iter = self.declarations.iter();
-        try!(iter.next().unwrap().to_css(dest));
+        iter.next().unwrap().to_css(dest)?;
         for declaration in iter {
-            try!(dest.write_str(" "));
-            try!(declaration.to_css(dest));
+            dest.write_str(" ")?;
+            declaration.to_css(dest)?;
         }
         dest.write_str(" }")
     }
 }
 
 /// Computes the cascade precedence as according to
 /// http://dev.w3.org/csswg/css-cascade/#cascade-origin
 fn cascade_precendence(origin: Origin, important: bool) -> u8 {
--- a/servo/components/style/values/computed/mod.rs
+++ b/servo/components/style/values/computed/mod.rs
@@ -516,42 +516,42 @@ pub struct ClipRect {
     pub top: Option<Au>,
     pub right: Option<Au>,
     pub bottom: Option<Au>,
     pub left: Option<Au>,
 }
 
 impl ToCss for ClipRect {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
-        try!(dest.write_str("rect("));
+        dest.write_str("rect(")?;
         if let Some(top) = self.top {
-            try!(top.to_css(dest));
-            try!(dest.write_str(", "));
+            top.to_css(dest)?;
+            dest.write_str(", ")?;
         } else {
-            try!(dest.write_str("auto, "));
+            dest.write_str("auto, ")?;
         }
 
         if let Some(right) = self.right {
-            try!(right.to_css(dest));
-            try!(dest.write_str(", "));
+            right.to_css(dest)?;
+            dest.write_str(", ")?;
         } else {
-            try!(dest.write_str("auto, "));
+            dest.write_str("auto, ")?;
         }
 
         if let Some(bottom) = self.bottom {
-            try!(bottom.to_css(dest));
-            try!(dest.write_str(", "));
+            bottom.to_css(dest)?;
+            dest.write_str(", ")?;
         } else {
-            try!(dest.write_str("auto, "));
+            dest.write_str("auto, ")?;
         }
 
         if let Some(left) = self.left {
-            try!(left.to_css(dest));
+            left.to_css(dest)?;
         } else {
-            try!(dest.write_str("auto"));
+            dest.write_str("auto")?;
         }
         dest.write_str(")")
     }
 }
 
 /// rect(...) | auto
 pub type ClipRectOrAuto = Either<ClipRect, Auto>;
 
--- a/servo/components/style/values/generics/mod.rs
+++ b/servo/components/style/values/generics/mod.rs
@@ -143,17 +143,17 @@ impl<T: Parse> Parse for FontSettingTag<
     /// https://drafts.csswg.org/css-fonts-4/#low-level-font-variation-
     /// settings-control-the-font-variation-settings-property
     /// <string> [ on | off | <integer> ]
     /// <string> <number>
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         use byteorder::{ReadBytesExt, BigEndian};
         use std::io::Cursor;
 
-        let tag = try!(input.expect_string());
+        let tag = input.expect_string()?;
 
         // allowed strings of length 4 containing chars: <U+20, U+7E>
         if tag.len() != 4 ||
            tag.chars().any(|c| c < ' ' || c > '~')
         {
             return Err(StyleParseError::UnspecifiedError.into())
         }
 
--- a/servo/components/style/values/specified/calc.rs
+++ b/servo/components/style/values/specified/calc.rs
@@ -89,47 +89,47 @@ impl HasViewportPercentage for CalcLengt
 
 impl ToCss for CalcLengthOrPercentage {
     #[allow(unused_assignments)]
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
         let mut first_value = true;
         macro_rules! first_value_check {
             () => {
                 if !first_value {
-                    try!(dest.write_str(" + "));
+                    dest.write_str(" + ")?;
                 } else {
                     first_value = false;
                 }
             };
         }
 
         macro_rules! serialize {
             ( $( $val:ident ),* ) => {
                 $(
                     if let Some(val) = self.$val {
                         first_value_check!();
-                        try!(val.to_css(dest));
-                        try!(dest.write_str(stringify!($val)));
+                        val.to_css(dest)?;
+                        dest.write_str(stringify!($val))?;
                     }
                 )*
             };
         }
 
-        try!(dest.write_str("calc("));
+        dest.write_str("calc(")?;
 
         serialize!(ch, em, ex, rem, vh, vmax, vmin, vw);
 
         #[cfg(feature = "gecko")]
         {
             serialize!(mozmm);
         }
 
         if let Some(val) = self.absolute {
             first_value_check!();
-            try!(val.to_css(dest));
+            val.to_css(dest)?;
         }
 
         if let Some(val) = self.percentage {
             first_value_check!();
             val.to_css(dest)?;
         }
 
         write!(dest, ")")
@@ -144,17 +144,17 @@ impl CalcNode {
     /// May return a "complex" `CalcNode`, in the presence of a parenthesized
     /// expression, for example.
     fn parse_one<'i, 't>(
         context: &ParserContext,
         input: &mut Parser<'i, 't>,
         expected_unit: CalcUnit)
         -> Result<Self, ParseError<'i>>
     {
-        match (try!(input.next()), expected_unit) {
+        match (input.next()?, expected_unit) {
             (Token::Number { value, .. }, _) => Ok(CalcNode::Number(value)),
             (Token::Dimension { value, ref unit, .. }, CalcUnit::Length) |
             (Token::Dimension { value, ref unit, .. }, CalcUnit::LengthOrPercentage) => {
                 NoCalcLength::parse_dimension(context, value, unit)
                     .map(CalcNode::Length)
                     .map_err(|()| StyleParseError::UnspecifiedError.into())
             }
             (Token::Dimension { value, ref unit, .. }, CalcUnit::Angle) => {
--- a/servo/components/style/values/specified/image.rs
+++ b/servo/components/style/values/specified/image.rs
@@ -147,17 +147,17 @@ impl Image {
 
 impl Parse for Gradient {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         enum Shape {
             Linear,
             Radial,
         }
 
-        let func = try!(input.expect_function());
+        let func = input.expect_function()?;
         let result = match_ignore_ascii_case! { &func,
             "linear-gradient" => {
                 Some((Shape::Linear, false, CompatMode::Modern))
             },
             "-webkit-linear-gradient" => {
                 Some((Shape::Linear, false, CompatMode::WebKit))
             },
             "repeating-linear-gradient" => {
@@ -650,50 +650,50 @@ impl EndingShape {
         })
     }
 }
 
 impl ShapeExtent {
     fn parse_with_compat_mode<'i, 't>(input: &mut Parser<'i, 't>,
                                       compat_mode: CompatMode)
                                       -> Result<Self, ParseError<'i>> {
-        match try!(Self::parse(input)) {
+        match Self::parse(input)? {
             ShapeExtent::Contain | ShapeExtent::Cover if compat_mode == CompatMode::Modern =>
                 Err(StyleParseError::UnspecifiedError.into()),
             keyword => Ok(keyword),
         }
     }
 }
 
 impl GradientItem {
     fn parse_comma_separated<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                      -> Result<Vec<Self>, ParseError<'i>> {
         let mut seen_stop = false;
-        let items = try!(input.parse_comma_separated(|input| {
+        let items = input.parse_comma_separated(|input| {
             if seen_stop {
                 if let Ok(hint) = input.try(|i| LengthOrPercentage::parse(context, i)) {
                     seen_stop = false;
                     return Ok(GenericGradientItem::InterpolationHint(hint));
                 }
             }
             seen_stop = true;
             ColorStop::parse(context, input).map(GenericGradientItem::ColorStop)
-        }));
+        })?;
         if !seen_stop || items.len() < 2 {
             return Err(StyleParseError::UnspecifiedError.into());
         }
         Ok(items)
     }
 }
 
 impl Parse for ColorStop {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                      -> Result<Self, ParseError<'i>> {
         Ok(ColorStop {
-            color: try!(RGBAColor::parse(context, input)),
+            color: RGBAColor::parse(context, input)?,
             position: input.try(|i| LengthOrPercentage::parse(context, i)).ok(),
         })
     }
 }
 
 impl Parse for PaintWorklet {
     fn parse<'i, 't>(_context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
         input.expect_function_matching("paint")?;
--- a/servo/components/style/values/specified/length.rs
+++ b/servo/components/style/values/specified/length.rs
@@ -604,17 +604,17 @@ impl Length {
     }
 
     #[inline]
     fn parse_internal<'i, 't>(context: &ParserContext,
                               input: &mut Parser<'i, 't>,
                               num_context: AllowedLengthType,
                               allow_quirks: AllowQuirks)
                               -> Result<Length, ParseError<'i>> {
-        let token = try!(input.next());
+        let token = input.next()?;
         match token {
             Token::Dimension { value, ref unit, .. } if num_context.is_ok(context.parsing_mode, value) => {
                 Length::parse_dimension(context, value, unit)
             }
             Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
                 if value != 0. &&
                    !context.parsing_mode.allows_unitless_lengths() &&
                    !allow_quirks.allowed(context.quirks_mode) {
@@ -716,17 +716,17 @@ impl ToCss for Percentage {
 }
 
 impl Percentage {
     /// Parse a specific kind of percentage.
     pub fn parse_with_clamping_mode<'i, 't>(context: &ParserContext,
                                             input: &mut Parser<'i, 't>,
                                             num_context: AllowedNumericType)
                                             -> Result<Self, ParseError<'i>> {
-        match try!(input.next()) {
+        match input.next()? {
             Token::Percentage { unit_value, .. } if num_context.is_ok(context.parsing_mode, unit_value) => {
                 Ok(Percentage(unit_value))
             }
             t => Err(BasicParseError::UnexpectedToken(t).into())
         }
     }
 
     /// Parses a percentage token, but rejects it if it's negative.
@@ -799,17 +799,17 @@ impl LengthOrPercentage {
     }
 
     fn parse_internal<'i, 't>(context: &ParserContext,
                               input: &mut Parser<'i, 't>,
                               num_context: AllowedLengthType,
                               allow_quirks: AllowQuirks)
                               -> Result<LengthOrPercentage, ParseError<'i>>
     {
-        let token = try!(input.next());
+        let token = input.next()?;
         match token {
             Token::Dimension { value, ref unit, .. } if num_context.is_ok(context.parsing_mode, value) => {
                 NoCalcLength::parse_dimension(context, value, unit).map(LengthOrPercentage::Length)
             }
             Token::Percentage { unit_value, .. } if num_context.is_ok(context.parsing_mode, unit_value) => {
                 return Ok(LengthOrPercentage::Percentage(Percentage(unit_value)))
             }
             Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
@@ -817,19 +817,19 @@ impl LengthOrPercentage {
                    !context.parsing_mode.allows_unitless_lengths() &&
                    !allow_quirks.allowed(context.quirks_mode) {
                     Err(())
                 } else {
                     return Ok(LengthOrPercentage::Length(NoCalcLength::from_px(value)))
                 }
             }
             Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
-                let calc = try!(input.parse_nested_block(|i| {
+                let calc = input.parse_nested_block(|i| {
                     CalcNode::parse_length_or_percentage(context, i, num_context)
-                }));
+                })?;
                 return Ok(LengthOrPercentage::Calc(Box::new(calc)))
             }
             _ => Err(())
         }.map_err(|()| BasicParseError::UnexpectedToken(token).into())
     }
 
     /// Parse a non-negative length.
     #[inline]
@@ -935,17 +935,17 @@ impl From<Percentage> for LengthOrPercen
 }
 
 impl LengthOrPercentageOrAuto {
     fn parse_internal<'i, 't>(context: &ParserContext,
                               input: &mut Parser<'i, 't>,
                               num_context: AllowedLengthType,
                               allow_quirks: AllowQuirks)
                               -> Result<Self, ParseError<'i>> {
-        let token = try!(input.next());
+        let token = input.next()?;
         match token {
             Token::Dimension { value, ref unit, .. } if num_context.is_ok(context.parsing_mode, value) => {
                 NoCalcLength::parse_dimension(context, value, unit).map(LengthOrPercentageOrAuto::Length)
             }
             Token::Percentage { unit_value, .. } if num_context.is_ok(context.parsing_mode, unit_value) => {
                 Ok(LengthOrPercentageOrAuto::Percentage(Percentage(unit_value)))
             }
             Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
@@ -957,19 +957,19 @@ impl LengthOrPercentageOrAuto {
                 Ok(LengthOrPercentageOrAuto::Length(
                     NoCalcLength::Absolute(AbsoluteLength::Px(value))
                 ))
             }
             Token::Ident(ref value) if value.eq_ignore_ascii_case("auto") => {
                 Ok(LengthOrPercentageOrAuto::Auto)
             }
             Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
-                let calc = try!(input.parse_nested_block(|i| {
+                let calc = input.parse_nested_block(|i| {
                     CalcNode::parse_length_or_percentage(context, i, num_context)
-                }));
+                })?;
                 Ok(LengthOrPercentageOrAuto::Calc(Box::new(calc)))
             }
             _ => Err(())
         }.map_err(|()| BasicParseError::UnexpectedToken(token).into())
     }
 
     /// Parse a non-negative length, percentage, or auto.
     #[inline]
@@ -1034,17 +1034,17 @@ pub enum LengthOrPercentageOrNone {
 
 impl LengthOrPercentageOrNone {
     fn parse_internal<'i, 't>(context: &ParserContext,
                               input: &mut Parser<'i, 't>,
                               num_context: AllowedLengthType,
                               allow_quirks: AllowQuirks)
                               -> Result<LengthOrPercentageOrNone, ParseError<'i>>
     {
-        let token = try!(input.next());
+        let token = input.next()?;
         match token {
             Token::Dimension { value, ref unit, .. } if num_context.is_ok(context.parsing_mode, value) => {
                 NoCalcLength::parse_dimension(context, value, unit).map(LengthOrPercentageOrNone::Length)
             }
             Token::Percentage { unit_value, .. } if num_context.is_ok(context.parsing_mode, unit_value) => {
                 Ok(LengthOrPercentageOrNone::Percentage(Percentage(unit_value)))
             }
             Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
@@ -1052,19 +1052,19 @@ impl LengthOrPercentageOrNone {
                    !allow_quirks.allowed(context.quirks_mode) {
                     return Err(StyleParseError::UnspecifiedError.into())
                 }
                 Ok(LengthOrPercentageOrNone::Length(
                     NoCalcLength::Absolute(AbsoluteLength::Px(value))
                 ))
             }
             Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
-                let calc = try!(input.parse_nested_block(|i| {
+                let calc = input.parse_nested_block(|i| {
                     CalcNode::parse_length_or_percentage(context, i, num_context)
-                }));
+                })?;
                 Ok(LengthOrPercentageOrNone::Calc(Box::new(calc)))
             }
             Token::Ident(ref value) if value.eq_ignore_ascii_case("none") =>
                 Ok(LengthOrPercentageOrNone::None),
             _ => Err(())
         }.map_err(|()| BasicParseError::UnexpectedToken(token).into())
     }
 
--- a/servo/components/style/values/specified/mod.rs
+++ b/servo/components/style/values/specified/mod.rs
@@ -76,38 +76,38 @@ use values::computed::ComputedValueAsSpe
 
 #[cfg(feature = "servo")]
 pub use ::servo::url::*;
 #[cfg(feature = "gecko")]
 pub use ::gecko::url::*;
 
 impl Parse for SpecifiedUrl {
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
-        let url = try!(input.expect_url());
+        let url = input.expect_url()?;
         Self::parse_from_string(url.into_owned(), context)
     }
 }
 
 impl Eq for SpecifiedUrl {}
 
 // TODO(emilio): Maybe consider ComputedUrl to save a word in style structs?
 impl ComputedValueAsSpecified for SpecifiedUrl {}
 
 no_viewport_percentage!(SpecifiedUrl);
 }
 
 /// Parse an `<integer>` value, handling `calc()` correctly.
 pub fn parse_integer<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                              -> Result<Integer, ParseError<'i>> {
-    match try!(input.next()) {
+    match input.next()? {
         Token::Number { int_value: Some(v), .. } => Ok(Integer::new(v)),
         Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
-            let result = try!(input.parse_nested_block(|i| {
+            let result = input.parse_nested_block(|i| {
                 CalcNode::parse_integer(context, i)
-            }));
+            })?;
 
             Ok(Integer::from_calc(result))
         }
         t => Err(BasicParseError::UnexpectedToken(t).into())
     }
 }
 
 /// Parse a `<number>` value, handling `calc()` correctly, and without length
@@ -117,27 +117,27 @@ pub fn parse_number<'i, 't>(context: &Pa
     parse_number_with_clamping_mode(context, input, AllowedNumericType::All)
 }
 
 /// Parse a `<number>` value, with a given clamping mode.
 pub fn parse_number_with_clamping_mode<'i, 't>(context: &ParserContext,
                                                input: &mut Parser<'i, 't>,
                                                clamping_mode: AllowedNumericType)
                                                -> Result<Number, ParseError<'i>> {
-    match try!(input.next()) {
+    match input.next()? {
         Token::Number { value, .. } if clamping_mode.is_ok(context.parsing_mode, value) => {
             Ok(Number {
                 value: value.min(f32::MAX).max(f32::MIN),
                 calc_clamping_mode: None,
             })
         },
         Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
-            let result = try!(input.parse_nested_block(|i| {
+            let result = input.parse_nested_block(|i| {
                 CalcNode::parse_number(context, i)
-            }));
+            })?;
 
             Ok(Number {
                 value: result.min(f32::MAX).max(f32::MIN),
                 calc_clamping_mode: Some(clamping_mode),
             })
         }
         t => Err(BasicParseError::UnexpectedToken(t).into())
     }
@@ -222,17 +222,17 @@ impl Angle {
             was_calc: true,
         }
     }
 }
 
 impl Parse for Angle {
     /// Parses an angle according to CSS-VALUES § 6.1.
     fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
-        let token = try!(input.next());
+        let token = input.next()?;
         match token {
             Token::Dimension { value, ref unit, .. } => {
                 Angle::parse_dimension(value, unit, /* from_calc = */ false)
             }
             Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
                 return input.parse_nested_block(|i| CalcNode::parse_angle(context, i))
             }
             _ => Err(())
@@ -262,17 +262,17 @@ impl Angle {
     /// Note that numbers without any AngleUnit, including unitless 0 angle,
     /// should be invalid. However, some properties still accept unitless 0
     /// angle and stores it as '0deg'.
     ///
     /// We can remove this and get back to the unified version Angle::parse once
     /// https://github.com/w3c/csswg-drafts/issues/1162 is resolved.
     pub fn parse_with_unitless<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
                                        -> Result<Self, ParseError<'i>> {
-        let token = try!(input.next());
+        let token = input.next()?;
         match token {
             Token::Dimension { value, ref unit, .. } => {
                 Angle::parse_dimension(value, unit, /* from_calc = */ false)
             }
             Token::Number { value, .. } if value == 0. => Ok(Angle::zero()),
             Token::Function(ref name) if name.eq_ignore_ascii_case("calc") => {
                 return input.parse_nested_block(|i| CalcNode::parse_angle(context, i))
             }
@@ -768,17 +768,17 @@ impl Shadow {
                 if input.try(|input| input.expect_ident_matching("inset")).is_ok() {
                     inset = true;
                     continue
                 }
             }
             if !lengths_parsed {
                 if let Ok(value) = input.try(|i| Length::parse(context, i)) {
                     lengths[0] = value;
-                    lengths[1] = try!(Length::parse(context, input));
+                    lengths[1] = Length::parse(context, input)?;
                     if let Ok(value) = input.try(|i| Length::parse_non_negative(context, i)) {
                         lengths[2] = value;
                         if !disable_spread_and_inset {
                             if let Ok(value) = input.try(|i| Length::parse(context, i)) {
                                 lengths[3] = value;
                             }
                         }
                     }
@@ -883,46 +883,46 @@ pub struct ClipRect {
     pub bottom: Option<Length>,
     /// <left> (<length> | <auto>)
     pub left: Option<Length>,
 }
 
 
 impl ToCss for ClipRect {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
-        try!(dest.write_str("rect("));
+        dest.write_str("rect(")?;
 
         if let Some(ref top) = self.top {
-            try!(top.to_css(dest));
-            try!(dest.write_str(", "));
+            top.to_css(dest)?;
+            dest.write_str(", ")?;
         } else {
-            try!(dest.write_str("auto, "));
+            dest.write_str("auto, ")?;
         }
 
         if let Some(ref right) = self.right {
-            try!(right.to_css(dest));
-            try!(dest.write_str(", "));
+            right.to_css(dest)?;
+            dest.write_str(", ")?;
         } else {
-            try!(dest.write_str("auto, "));
+            dest.write_str("auto, ")?;
         }
 
         if let Some(ref bottom) = self.bottom {
-            try!(bottom.to_css(dest));
-            try!(dest.write_str(", "));
+            bottom.to_css(dest)?;
+            dest.write_str(", ")?;
         } else {
-            try!(dest.write_str("auto, "));
+            dest.write_str("auto, ")?;
         }
 
         if let Some(ref left) = self.left {
-            try!(left.to_css(dest));
+            left.to_css(dest)?;
         } else {
-            try!(dest.write_str("auto"));
+            dest.write_str("auto")?;
         }
 
-        try!(dest.write_str(")"));
+        dest.write_str(")")?;
         Ok(())
     }
 }
 
 impl ToComputedValue for ClipRect {
     type ComputedValue = super::computed::ClipRect;
 
     #[inline]
@@ -962,37 +962,37 @@ impl ClipRect {
                                   allow_quirks: AllowQuirks) -> Result<Option<Length>, ParseError<'i>> {
             if input.try(|input| input.expect_ident_matching("auto")).is_ok() {
                 Ok(None)
             } else {
                 Length::parse_quirky(context, input, allow_quirks).map(Some)
             }
         }
 
-        let func = try!(input.expect_function());
+        let func = input.expect_function()?;
         if !func.eq_ignore_ascii_case("rect") {
             return Err(StyleParseError::UnexpectedFunction(func).into())
         }
 
         input.parse_nested_block(|input| {
-            let top = try!(parse_argument(context, input, allow_quirks));
+            let top = parse_argument(context, input, allow_quirks)?;
             let right;
             let bottom;
             let left;
 
             if input.try(|input| input.expect_comma()).is_ok() {
-                right = try!(parse_argument(context, input, allow_quirks));
-                try!(input.expect_comma());
-                bottom = try!(parse_argument(context, input, allow_quirks));
-                try!(input.expect_comma());
-                left = try!(parse_argument(context, input, allow_quirks));
+                right = parse_argument(context, input, allow_quirks)?;
+                input.expect_comma()?;
+                bottom = parse_argument(context, input, allow_quirks)?;
+                input.expect_comma()?;
+                left = parse_argument(context, input, allow_quirks)?;
             } else {
-                right = try!(parse_argument(context, input, allow_quirks));
-                bottom = try!(parse_argument(context, input, allow_quirks));
-                left = try!(parse_argument(context, input, allow_quirks));
+                right = parse_argument(context, input, allow_quirks)?;
+                bottom = parse_argument(context, input, allow_quirks)?;
+                left = parse_argument(context, input, allow_quirks)?;
             }
             Ok(ClipRect {
                 top: top,
                 right: right,
                 bottom: bottom,
                 left: left,
             })
         })
--- a/servo/components/style_traits/viewport.rs
+++ b/servo/components/style_traits/viewport.rs
@@ -90,28 +90,28 @@ pub struct ViewportConstraints {
     /// https://drafts.csswg.org/css-device-adapt/#orientation-desc
     pub orientation: Orientation
 }
 
 impl ToCss for ViewportConstraints {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result
         where W: fmt::Write
     {
-        try!(write!(dest, "@viewport {{"));
-        try!(write!(dest, " width: {}px;", self.size.width));
-        try!(write!(dest, " height: {}px;", self.size.height));
-        try!(write!(dest, " zoom: {};", self.initial_zoom.get()));
+        write!(dest, "@viewport {{")?;
+        write!(dest, " width: {}px;", self.size.width)?;
+        write!(dest, " height: {}px;", self.size.height)?;
+        write!(dest, " zoom: {};", self.initial_zoom.get())?;
         if let Some(min_zoom) = self.min_zoom {
-            try!(write!(dest, " min-zoom: {};", min_zoom.get()));
+            write!(dest, " min-zoom: {};", min_zoom.get())?;
         }
         if let Some(max_zoom) = self.max_zoom {
-            try!(write!(dest, " max-zoom: {};", max_zoom.get()));
+            write!(dest, " max-zoom: {};", max_zoom.get())?;
         }
-        try!(write!(dest, " user-zoom: ")); try!(self.user_zoom.to_css(dest));
-        try!(write!(dest, "; orientation: ")); try!(self.orientation.to_css(dest));
+        write!(dest, " user-zoom: ")?; self.user_zoom.to_css(dest)?;
+        write!(dest, "; orientation: ")?; self.orientation.to_css(dest)?;
         write!(dest, "; }}")
     }
 }
 
 /// https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom
 #[derive(Copy, Clone, Debug, PartialEq)]
 #[cfg_attr(feature = "servo", derive(HeapSizeOf))]
 pub enum Zoom {
@@ -139,17 +139,17 @@ impl Zoom {
     /// Parse a zoom value per:
     ///
     /// https://drafts.csswg.org/css-device-adapt/#descdef-viewport-zoom
     pub fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Zoom, ParseError<'i>> {
         use PARSING_MODE_DEFAULT;
         use cssparser::Token;
         use values::specified::AllowedLengthType::NonNegative;
 
-        match try!(input.next()) {
+        match input.next()? {
             // TODO: This parse() method should take ParserContext as an
             // argument, and pass ParsingMode owned by the ParserContext to
             // is_ok() instead of using PARSING_MODE_DEFAULT directly.
             // In order to do so, we might want to move these stuff into style::stylesheets::viewport_rule.
             Token::Percentage { unit_value, .. } if NonNegative.is_ok(PARSING_MODE_DEFAULT, unit_value) => {
                 Ok(Zoom::Percentage(unit_value))
             }
             Token::Number { value, .. } if NonNegative.is_ok(PARSING_MODE_DEFAULT, value) => {
--- a/servo/components/url/lib.rs
+++ b/servo/components/url/lib.rs
@@ -145,17 +145,17 @@ impl ServoUrl {
         self.0.path_segments()
     }
 
     pub fn query(&self) -> Option<&str> {
         self.0.query()
     }
 
     pub fn from_file_path<P: AsRef<Path>>(path: P) -> Result<Self, ()> {
-        Ok(Self::from_url(try!(Url::from_file_path(path))))
+        Ok(Self::from_url(Url::from_file_path(path)?))
     }
 }
 
 impl fmt::Display for ServoUrl {
     fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
         self.0.fmt(formatter)
     }
 }
--- a/servo/components/webdriver_server/keys.rs
+++ b/servo/components/webdriver_server/keys.rs
@@ -167,18 +167,17 @@ fn key_from_char(key_string: &char) -> O
         _ => None
     }
 }
 
 pub fn keycodes_to_keys(key_codes: &[char]) -> Result<Vec<(Key, KeyModifiers, KeyState)>, String> {
     let mut rv = vec![];
 
     for char_code in key_codes.iter() {
-        let (key, with_shift) = try!(
-            key_from_char(char_code).ok_or(format!("Unsupported character code {}", char_code)));
+        let (key, with_shift) = key_from_char(char_code).ok_or(format!("Unsupported character code {}", char_code))?;
         let modifiers = if with_shift {
             SHIFT
         } else {
             KeyModifiers::empty()
         };
         rv.push((key, modifiers, KeyState::Pressed));
         rv.push((key, modifiers, KeyState::Released));
     };
--- a/servo/components/webdriver_server/lib.rs
+++ b/servo/components/webdriver_server/lib.rs
@@ -150,25 +150,25 @@ enum ServoExtensionRoute {
 impl WebDriverExtensionRoute for ServoExtensionRoute {
     type Command = ServoExtensionCommand;
 
     fn command(&self,
                _captures: &Captures,
                body_data: &Json) -> WebDriverResult<WebDriverCommand<ServoExtensionCommand>> {
         let command = match *self {
             ServoExtensionRoute::GetPrefs => {
-                let parameters: GetPrefsParameters = try!(Parameters::from_json(&body_data));
+                let parameters: GetPrefsParameters = Parameters::from_json(&body_data)?;
                 ServoExtensionCommand::GetPrefs(parameters)
             }
             ServoExtensionRoute::SetPrefs => {
-                let parameters: SetPrefsParameters = try!(Parameters::from_json(&body_data));
+                let parameters: SetPrefsParameters = Parameters::from_json(&body_data)?;
                 ServoExtensionCommand::SetPrefs(parameters)
             }
             ServoExtensionRoute::ResetPrefs => {
-                let parameters: GetPrefsParameters = try!(Parameters::from_json(&body_data));
+                let parameters: GetPrefsParameters = Parameters::from_json(&body_data)?;
                 ServoExtensionCommand::ResetPrefs(parameters)
             }
         };
         Ok(WebDriverCommand::Extension(command))
     }
 }
 
 #[derive(Clone, PartialEq)]
@@ -190,29 +190,29 @@ impl WebDriverExtensionCommand for Servo
 
 #[derive(Clone, PartialEq)]
 struct GetPrefsParameters {
     prefs: Vec<String>
 }
 
 impl Parameters for GetPrefsParameters {
     fn from_json(body: &Json) -> WebDriverResult<GetPrefsParameters> {
-        let data = try!(body.as_object().ok_or(
+        let data = body.as_object().ok_or(
             WebDriverError::new(ErrorStatus::InvalidArgument,
-                                "Message body was not an object")));
-        let prefs_value = try!(data.get("prefs").ok_or(
+                                "Message body was not an object"))?;
+        let prefs_value = data.get("prefs").ok_or(
             WebDriverError::new(ErrorStatus::InvalidArgument,
-                                "Missing prefs key")));
-        let items = try!(prefs_value.as_array().ok_or(
+                                "Missing prefs key"))?;
+        let items = prefs_value.as_array().ok_or(
             WebDriverError::new(
                 ErrorStatus::InvalidArgument,
-                "prefs was not an array")));
-        let params = try!(items.iter().map(|x| x.as_string().map(|y| y.to_owned()).ok_or(
+                "prefs was not an array"))?;
+        let params = items.iter().map(|x| x.as_string().map(|y| y.to_owned()).ok_or(
             WebDriverError::new(ErrorStatus::InvalidArgument,
-                                "Pref is not a string"))).collect::<Result<Vec<_>, _>>());
+                                "Pref is not a string"))).collect::<Result<Vec<_>, _>>()?;
         Ok(GetPrefsParameters {
             prefs: params
         })
     }
 }
 
 impl ToJson for GetPrefsParameters {
     fn to_json(&self) -> Json {
@@ -224,30 +224,30 @@ impl ToJson for GetPrefsParameters {
 
 #[derive(Clone, PartialEq)]
 struct SetPrefsParameters {
     prefs: Vec<(String, PrefValue)>
 }
 
 impl Parameters for SetPrefsParameters {
     fn from_json(body: &Json) -> WebDriverResult<SetPrefsParameters> {
-        let data = try!(body.as_object().ok_or(
+        let data = body.as_object().ok_or(
             WebDriverError::new(ErrorStatus::InvalidArgument,
-                                "Message body was not an object")));
-        let items = try!(try!(data.get("prefs").ok_or(
+                                "Message body was not an object"))?;
+        let items = data.get("prefs").ok_or(
             WebDriverError::new(ErrorStatus::InvalidArgument,
-                                "Missing prefs key"))).as_object().ok_or(
+                                "Missing prefs key"))?.as_object().ok_or(
             WebDriverError::new(
                 ErrorStatus::InvalidArgument,
-                "prefs was not an array")));
+                "prefs was not an array"))?;
         let mut params = Vec::with_capacity(items.len());
         for (name, val) in items.iter() {
-            let value = try!(PrefValue::from_json(val.clone()).or(
+            let value = PrefValue::from_json(val.clone()).or(
                 Err(WebDriverError::new(ErrorStatus::InvalidArgument,
-                                        "Pref is not a boolean or string"))));
+                                        "Pref is not a boolean or string")))?;
             let key = name.to_owned();
             params.push((key, value));
         }
         Ok(SetPrefsParameters {
             prefs: params
         })
     }
 }
@@ -697,19 +697,19 @@ impl Handler {
                                                                                    "Unable to set cookie"))
             }
         }
     }
 
     fn handle_set_timeouts(&mut self,
                            parameters: &TimeoutsParameters)
                            -> WebDriverResult<WebDriverResponse> {
-        let mut session = try!(self.session
+        let mut session = self.session
             .as_mut()
-            .ok_or(WebDriverError::new(ErrorStatus::SessionNotCreated, "")));
+            .ok_or(WebDriverError::new(ErrorStatus::SessionNotCreated, ""))?;
 
         session.script_timeout = parameters.script;
         session.load_timeout = parameters.page_load;
         session.implicit_wait_timeout = parameters.implicit;
 
         Ok(WebDriverResponse::Void)
     }
 
@@ -771,21 +771,21 @@ impl Handler {
 
         let (sender, receiver) = ipc::channel().unwrap();
 
         let cmd = WebDriverScriptCommand::FocusElement(element.id.clone(), sender);
         let cmd_msg = WebDriverCommandMsg::ScriptCommand(browsing_context_id, cmd);
         self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
 
         // TODO: distinguish the not found and not focusable cases
-        try!(receiver.recv().unwrap().or_else(|_| Err(WebDriverError::new(
-            ErrorStatus::StaleElementReference, "Element not found or not focusable"))));
+        receiver.recv().unwrap().or_else(|_| Err(WebDriverError::new(
+            ErrorStatus::StaleElementReference, "Element not found or not focusable")))?;
 
-        let keys = try!(keycodes_to_keys(&keys.value).or_else(|_|
-            Err(WebDriverError::new(ErrorStatus::UnsupportedOperation, "Failed to convert keycodes"))));
+        let keys = keycodes_to_keys(&keys.value).or_else(|_|
+            Err(WebDriverError::new(ErrorStatus::UnsupportedOperation, "Failed to convert keycodes")))?;
 
         // TODO: there's a race condition caused by the focus command and the
         // send keys command being two separate messages,
         // so the constellation may have changed state between them.
         let cmd_msg = WebDriverCommandMsg::SendKeys(browsing_context_id, keys);
         self.constellation_chan.send(ConstellationMsg::WebDriverCommand(cmd_msg)).unwrap();
 
         Ok(WebDriverResponse::Void)
@@ -865,17 +865,17 @@ impl WebDriverHandler<ServoExtensionRout
     fn handle_command(&mut self,
                       _session: &Option<Session>,
                       msg: WebDriverMessage<ServoExtensionRoute>) -> WebDriverResult<WebDriverResponse> {
         // Unless we are trying to create a new session, we need to ensure that a
         // session has previously been created
         match msg.command {
             WebDriverCommand::NewSession(_) => {},
             _ => {
-                try!(self.session());
+                self.session()?;
             }
         }
 
         match msg.command {
             WebDriverCommand::NewSession(_) => self.handle_new_session(),
             WebDriverCommand::DeleteSession => self.handle_delete_session(),
             WebDriverCommand::AddCookie(ref parameters) => self.handle_add_cookie(parameters),
             WebDriverCommand::Get(ref parameters) => self.handle_get(parameters),
--- a/servo/tests/unit/net/mime_classifier.rs
+++ b/servo/tests/unit/net/mime_classifier.rs
@@ -6,20 +6,20 @@ use net::mime_classifier::{ApacheBugFlag
 use net::mime_classifier::as_string_option;
 use net_traits::LoadContext;
 use std::env;
 use std::fs::File;
 use std::io::{self, Read};
 use std::path::{self, PathBuf};
 
 fn read_file(path: &path::Path) -> io::Result<Vec<u8>> {
-    let mut file = try!(File::open(path));
+    let mut file = File::open(path)?;
     let mut buffer = Vec::new();
 
-    try!(file.read_to_end(&mut buffer));
+    file.read_to_end(&mut buffer)?;
 
     Ok(buffer)
 }
 
 #[test]
 fn test_sniff_mp4_matcher() {
     let matcher = Mp4Matcher;