Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10)

This commit is contained in:
Simon Sapin 2017-08-11 16:24:21 +02:00
parent 41fb10c589
commit b5a4b8d6a0
40 changed files with 73 additions and 79 deletions

View file

@ -39,7 +39,7 @@ pub fn update_animation_state(constellation_chan: &IpcSender<ConstellationMsg>,
// run.
if let Some(ref mut animations) = running_animations.get_mut(node) {
// TODO: This being linear is probably not optimal.
for mut anim in animations.iter_mut() {
for anim in animations.iter_mut() {
if let Animation::Keyframes(_, ref anim_name, ref mut anim_state) = *anim {
if *name == *anim_name {
debug!("update_animation_state: Found other animation {}", name);

View file

@ -1921,7 +1921,7 @@ impl Legalizer {
/// true for anonymous block children of flex flows.
fn try_to_add_child(&mut self, context: &SharedStyleContext, parent: &mut FlowRef, child: &mut FlowRef)
-> bool {
let mut parent = self.stack.last_mut().unwrap_or(parent);
let parent = self.stack.last_mut().unwrap_or(parent);
let (parent_class, child_class) = (parent.class(), child.class());
match (parent_class, child_class) {
(FlowClass::TableWrapper, FlowClass::Table) |
@ -1962,7 +1962,7 @@ impl Legalizer {
} else {
IS_BLOCK_FLEX_ITEM
};
let mut block = FlowRef::deref_mut(&mut block_wrapper).as_mut_block();
let block = FlowRef::deref_mut(&mut block_wrapper).as_mut_block();
block.base.flags.insert(MARGINS_CANNOT_COLLAPSE);
block.fragment.flags.insert(flag);
}
@ -1979,7 +1979,7 @@ impl Legalizer {
} else {
IS_BLOCK_FLEX_ITEM
};
let mut block = FlowRef::deref_mut(child).as_mut_block();
let block = FlowRef::deref_mut(child).as_mut_block();
block.base.flags.insert(MARGINS_CANNOT_COLLAPSE);
block.fragment.flags.insert(flag);
}

View file

@ -2731,7 +2731,7 @@ impl InlineFlowDisplayListBuilding for InlineFlow {
self.base.clip_and_scroll_info = Some(state.current_clip_and_scroll_info);
self.base.clip = state.clip_stack.last().cloned().unwrap_or_else(max_rect);
for mut fragment in self.fragments.fragments.iter_mut() {
for fragment in self.fragments.fragments.iter_mut() {
let previous_cb_clip_scroll_info = state.containing_block_clip_and_scroll_info;
if establishes_containing_block_for_absolute(fragment.style.get_box().position) {
state.containing_block_clip_and_scroll_info = state.current_clip_and_scroll_info;

View file

@ -415,7 +415,7 @@ impl FlexFlow {
let items = &mut self.items[start..];
let mut children = self.block_flow.base.children.random_access_mut();
for mut item in items {
for item in items {
let kid = children.get(item.index);
item.init_sizes(kid, container_size, self.main_mode);
let outer_main_size = item.outer_main_size(kid, self.main_mode);
@ -607,7 +607,7 @@ impl FlexFlow {
let mut children = self.block_flow.base.children.random_access_mut();
for item in items.iter_mut() {
let mut block = children.get(item.index).as_mut_block();
let block = children.get(item.index).as_mut_block();
block.base.block_container_writing_mode = container_mode;
block.base.block_container_inline_size = inline_size;
@ -659,7 +659,7 @@ impl FlexFlow {
let mut children = self.block_flow.base.children.random_access_mut();
for item in &mut self.items {
let mut base = flow::mut_base(children.get(item.index));
let base = flow::mut_base(children.get(item.index));
if !self.main_reverse {
base.position.start.b = cur_b;
cur_b = cur_b + base.position.size.block;

View file

@ -435,7 +435,7 @@ impl LineBreaker {
return
}
let last_fragment_index = self.pending_line.range.end() - FragmentIndex(1);
let mut fragment = &mut self.new_fragments[last_fragment_index.get() as usize];
let fragment = &mut self.new_fragments[last_fragment_index.get() as usize];
let old_fragment_inline_size = fragment.border_box.size.inline;
@ -1047,7 +1047,7 @@ impl InlineFlow {
let space_per_expansion_opportunity = slack_inline_size / expansion_opportunities as i32;
for fragment_index in line.range.each_index() {
let fragment = fragments.get_mut(fragment_index.to_usize());
let mut scanned_text_fragment_info = match fragment.specific {
let scanned_text_fragment_info = match fragment.specific {
SpecificFragmentInfo::ScannedText(ref mut info) if !info.range.is_empty() => info,
_ => continue
};

View file

@ -117,7 +117,7 @@ pub fn store_overflow(layout_context: &LayoutContext, flow: &mut Flow) {
return;
}
for mut kid in flow::mut_base(flow).child_iter_mut() {
for kid in flow::mut_base(flow).child_iter_mut() {
store_overflow(layout_context, kid);
}

View file

@ -136,7 +136,7 @@ impl TableCellFlow {
}
for kid in flow::mut_base(self).children.iter_mut() {
let mut kid_base = flow::mut_base(kid);
let kid_base = flow::mut_base(kid);
if !kid_base.flags.contains(IS_ABSOLUTELY_POSITIONED) {
kid_base.position.start.b += offset
}

View file

@ -460,7 +460,7 @@ fn split_first_fragment_at_newline_if_necessary(fragments: &mut LinkedList<Fragm
}
let new_fragment = {
let mut first_fragment = fragments.front_mut().unwrap();
let first_fragment = fragments.front_mut().unwrap();
let string_before;
let selection_before;
{