aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/constellation/network_listener.rs2
-rw-r--r--components/layout/display_list/builder.rs2
-rw-r--r--components/layout/floats.rs4
-rw-r--r--components/layout/query.rs2
-rw-r--r--components/layout_2020/query.rs2
-rw-r--r--components/net/fetch/methods.rs2
-rw-r--r--components/script/dom/htmlanchorelement.rs2
-rwxr-xr-xcomponents/script/dom/htmlinputelement.rs6
-rw-r--r--components/script/dom/htmlmediaelement.rs2
-rw-r--r--components/script/dom/node.rs4
-rw-r--r--components/script/dom/treewalker.rs6
-rw-r--r--components/script/dom/url.rs2
-rw-r--r--components/script/dom/webgl_validations/tex_image_2d.rs2
-rw-r--r--components/script/dom/xmlhttprequest.rs2
-rw-r--r--components/script_plugins/lib.rs9
-rw-r--r--components/style/counter_style/mod.rs4
-rw-r--r--components/style/custom_properties.rs2
-rw-r--r--components/style/values/specified/length.rs2
-rw-r--r--ports/libmlservo/src/lib.rs2
-rw-r--r--rust-toolchain2
20 files changed, 33 insertions, 28 deletions
diff --git a/components/constellation/network_listener.rs b/components/constellation/network_listener.rs
index ec962b42f17..cae32c51f0b 100644
--- a/components/constellation/network_listener.rs
+++ b/components/constellation/network_listener.rs
@@ -143,7 +143,7 @@ impl NetworkListener {
//
// Ideally the Fetch code would handle manual redirects on its own
self.initiate_fetch(None);
- }
+ },
_ => {
// Response should be processed by script thread.
self.should_send = true;
diff --git a/components/layout/display_list/builder.rs b/components/layout/display_list/builder.rs
index 8f087e1c6c2..5fb9f89a77d 100644
--- a/components/layout/display_list/builder.rs
+++ b/components/layout/display_list/builder.rs
@@ -1787,7 +1787,7 @@ impl Fragment {
clip,
);
}
- }
+ },
SpecificFragmentInfo::ScannedText(ref text_fragment) => {
// Create the main text display item.
self.build_display_list_for_text_fragment(
diff --git a/components/layout/floats.rs b/components/layout/floats.rs
index 42df4e07dfd..b629e2bb83c 100644
--- a/components/layout/floats.rs
+++ b/components/layout/floats.rs
@@ -217,7 +217,7 @@ impl Floats {
max_inline_start is {:?}",
max_inline_start
);
- }
+ },
FloatKind::Right
if float_pos.i < min_inline_end &&
float_pos.b + float_size.block > block_start &&
@@ -232,7 +232,7 @@ impl Floats {
is {:?}",
min_inline_end
);
- }
+ },
FloatKind::Left | FloatKind::Right => {},
}
}
diff --git a/components/layout/query.rs b/components/layout/query.rs
index a02a5c935c2..10d652f3b12 100644
--- a/components/layout/query.rs
+++ b/components/layout/query.rs
@@ -1037,7 +1037,7 @@ fn process_resolved_style_request_internal<'dom>(
.result
.map(|r| r.to_css_string())
.unwrap_or(String::new())
- }
+ },
LonghandId::Bottom | LonghandId::Top | LonghandId::Right | LonghandId::Left
if applies && positioned && style.get_box().display != Display::None =>
diff --git a/components/layout_2020/query.rs b/components/layout_2020/query.rs
index efca2e080c1..ef322e6623c 100644
--- a/components/layout_2020/query.rs
+++ b/components/layout_2020/query.rs
@@ -547,7 +547,7 @@ fn process_offset_parent_query_inner(
Au::from_f32_px(padding_box_corner.y.px()),
);
Some(padding_box_corner)
- }
+ },
Fragment::AbsoluteOrFixedPositioned(_) |
Fragment::Box(_) |
Fragment::Text(_) |
diff --git a/components/net/fetch/methods.rs b/components/net/fetch/methods.rs
index 29c6d14a7ea..20c5cd87cc1 100644
--- a/components/net/fetch/methods.rs
+++ b/components/net/fetch/methods.rs
@@ -347,7 +347,7 @@ pub fn main_fetch(
.iter()
.map(|(name, _)| name.as_str().to_owned())
.collect();
- }
+ },
// Subsubstep 3.
Some(list) => {
response.cors_exposed_header_name_list =
diff --git a/components/script/dom/htmlanchorelement.rs b/components/script/dom/htmlanchorelement.rs
index e6583329880..bd9a526cd16 100644
--- a/components/script/dom/htmlanchorelement.rs
+++ b/components/script/dom/htmlanchorelement.rs
@@ -427,7 +427,7 @@ impl HTMLAnchorElementMethods for HTMLAnchorElement {
if url.host().is_none() || url.cannot_be_a_base() || url.scheme() == "file" =>
{
return;
- }
+ },
None => return,
// Step 4.
Some(url) => {
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs
index aefbea6f30e..c5ce47e2249 100755
--- a/components/script/dom/htmlinputelement.rs
+++ b/components/script/dom/htmlinputelement.rs
@@ -695,13 +695,13 @@ impl HTMLInputElement {
{
let intervals_from_base = ((value - step_base) / allowed_value_step).floor();
intervals_from_base * allowed_value_step + step_base
- }
+ },
StepDirection::Up =>
// step up a fractional step to be on a step multiple
{
let intervals_from_base = ((value - step_base) / allowed_value_step).ceil();
intervals_from_base * allowed_value_step + step_base
- }
+ },
};
} else {
value = value +
@@ -2371,7 +2371,7 @@ impl VirtualMethods for HTMLInputElement {
{
self.SetValue(DOMString::from(""))
.expect("Failed to set input value on type change to ValueMode::Filename.");
- }
+ },
_ => {},
}
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 27af41c2b0e..fcb38aa1427 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -209,7 +209,7 @@ impl VideoFrameRenderer for MediaFrameRenderer {
if let Some(old_image_key) = self.old_frame.take() {
updates.push(ImageUpdate::DeleteImage(old_image_key));
}
- }
+ },
Some((ref mut image_key, ref mut width, ref mut height)) => {
self.old_frame = Some(*image_key);
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 62f340fb215..7f8a0b87bcc 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -2893,13 +2893,13 @@ impl NodeMethods for Node {
if !is_equal_processinginstruction(this, node) =>
{
return false;
- }
+ },
NodeTypeId::CharacterData(CharacterDataTypeId::Text(_)) |
NodeTypeId::CharacterData(CharacterDataTypeId::Comment)
if !is_equal_characterdata(this, node) =>
{
return false;
- }
+ },
// Step 4.
NodeTypeId::Element(..) if !is_equal_element_attrs(this, node) => return false,
NodeTypeId::Attr if !is_equal_attr(this, node) => return false,
diff --git a/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs
index 86aa97466a7..2cd8de9fdb3 100644
--- a/components/script/dom/treewalker.rs
+++ b/components/script/dom/treewalker.rs
@@ -187,7 +187,7 @@ impl TreeWalkerMethods for TreeWalker {
// 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
@@ -319,7 +319,7 @@ impl TreeWalker {
if self.is_root_node(&parent) || self.is_current_node(&parent) =>
{
return Ok(None);
- }
+ },
// "5. Otherwise, set node to parent."
Some(parent) => node = parent,
}
@@ -467,7 +467,7 @@ impl<'a> Iterator for &'a TreeWalker {
// which cannot produce an Err result.
{
unreachable!()
- }
+ },
}
}
}
diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs
index 056f6aa9643..ab235816f4c 100644
--- a/components/script/dom/url.rs
+++ b/components/script/dom/url.rs
@@ -92,7 +92,7 @@ impl URL {
return Err(Error::Type(format!("could not parse base: {}", error)));
},
}
- }
+ },
};
// Step 3.
let parsed_url = match ServoUrl::parse_with_base(parsed_base.as_ref(), &url.0) {
diff --git a/components/script/dom/webgl_validations/tex_image_2d.rs b/components/script/dom/webgl_validations/tex_image_2d.rs
index e162081f637..dece682d377 100644
--- a/components/script/dom/webgl_validations/tex_image_2d.rs
+++ b/components/script/dom/webgl_validations/tex_image_2d.rs
@@ -356,7 +356,7 @@ impl<'a> WebGLValidator for TexImage2DValidator<'a> {
{
context.webgl_error(InvalidOperation);
return Err(TexImageValidationError::InvalidTypeForFormat);
- }
+ },
TexDataType::UnsignedShort565 if format != TexFormat::RGB => {
context.webgl_error(InvalidOperation);
return Err(TexImageValidationError::InvalidTypeForFormat);
diff --git a/components/script/dom/xmlhttprequest.rs b/components/script/dom/xmlhttprequest.rs
index 772e00982be..b6adac383b7 100644
--- a/components/script/dom/xmlhttprequest.rs
+++ b/components/script/dom/xmlhttprequest.rs
@@ -1412,7 +1412,7 @@ impl XMLHttpRequest {
if has_no_child_nodes {
return None;
}
- }
+ },
// Step 3
_ => {
return None;
diff --git a/components/script_plugins/lib.rs b/components/script_plugins/lib.rs
index 0edab34dc84..ed4afc96f8f 100644
--- a/components/script_plugins/lib.rs
+++ b/components/script_plugins/lib.rs
@@ -92,9 +92,14 @@ fn has_lint_attr(sym: &Symbols, attrs: &[Attribute], name: Symbol) -> bool {
}
/// Checks if a type is unrooted or contains any owned unrooted types
-fn is_unrooted_ty(sym: &Symbols, cx: &LateContext, ty: &ty::TyS, in_new_function: bool) -> bool {
+fn is_unrooted_ty<'tcx>(
+ sym: &'_ Symbols,
+ cx: &LateContext<'tcx>,
+ ty: &'tcx ty::TyS<'tcx>,
+ in_new_function: bool,
+) -> bool {
let mut ret = false;
- let mut walker = ty.walk();
+ let mut walker = ty.walk(cx.tcx);
while let Some(generic_arg) = walker.next() {
let t = match generic_arg.unpack() {
rustc_middle::ty::subst::GenericArgKind::Type(t) => t,
diff --git a/components/style/counter_style/mod.rs b/components/style/counter_style/mod.rs
index c7854b1ef1e..5effa11bcdd 100644
--- a/components/style/counter_style/mod.rs
+++ b/components/style/counter_style/mod.rs
@@ -108,7 +108,7 @@ pub fn parse_counter_style_body<'i, 't>(
Some(ContextualParseError::InvalidCounterStyleWithoutSymbols(
system,
))
- }
+ },
ref system @ System::Alphabetic | ref system @ System::Numeric
if rule.symbols().unwrap().0.len() < 2 =>
{
@@ -116,7 +116,7 @@ pub fn parse_counter_style_body<'i, 't>(
Some(ContextualParseError::InvalidCounterStyleNotEnoughSymbols(
system,
))
- }
+ },
System::Additive if rule.additive_symbols.is_none() => {
Some(ContextualParseError::InvalidCounterStyleWithoutAdditiveSymbols)
},
diff --git a/components/style/custom_properties.rs b/components/style/custom_properties.rs
index 0d0a4322333..b5461e1cbae 100644
--- a/components/style/custom_properties.rs
+++ b/components/style/custom_properties.rs
@@ -1016,7 +1016,7 @@ fn substitute_block<'i>(
Ok(())
})?;
set_position_at_next_iteration = true
- }
+ },
Token::Function(_) |
Token::ParenthesisBlock |
Token::CurlyBracketBlock |
diff --git a/components/style/values/specified/length.rs b/components/style/values/specified/length.rs
index 2eafa9fbd60..f706b401b9d 100644
--- a/components/style/values/specified/length.rs
+++ b/components/style/values/specified/length.rs
@@ -1009,7 +1009,7 @@ impl LengthPercentage {
return Ok(LengthPercentage::Percentage(computed::Percentage(
unit_value,
)));
- }
+ },
Token::Number { value, .. } if num_context.is_ok(context.parsing_mode, value) => {
if value != 0. &&
!context.parsing_mode.allows_unitless_lengths() &&
diff --git a/ports/libmlservo/src/lib.rs b/ports/libmlservo/src/lib.rs
index 8cebe784837..cbf85105e64 100644
--- a/ports/libmlservo/src/lib.rs
+++ b/ports/libmlservo/src/lib.rs
@@ -249,7 +249,7 @@ pub unsafe extern "C" fn move_servo(servo: *mut ServoInstance, x: f32, y: f32) {
if (start - point).square_length() < DRAG_CUTOFF_SQUARED =>
{
return;
- }
+ },
ScrollState::TriggerDown(start) => {
servo.scroll_state = ScrollState::TriggerDragging(start, point);
let _ = call(|s| s.mouse_move(x, y));
diff --git a/rust-toolchain b/rust-toolchain
index 4b91e309322..3793eee1d19 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1 @@
-nightly-2021-08-13
+nightly-2021-10-31