Don't shadow lifetimes in layout.

This commit is contained in:
Ms2ger 2015-01-28 14:44:32 +01:00
parent cc2523eed5
commit 1b3e368bcd
3 changed files with 6 additions and 6 deletions

View file

@ -222,8 +222,8 @@ pub struct FlowConstructor<'a> {
impl<'a> FlowConstructor<'a> { impl<'a> FlowConstructor<'a> {
/// Creates a new flow constructor. /// Creates a new flow constructor.
pub fn new<'a>(layout_context: &'a LayoutContext<'a>) pub fn new<'b>(layout_context: &'b LayoutContext<'b>)
-> FlowConstructor<'a> { -> FlowConstructor<'b> {
FlowConstructor { FlowConstructor {
layout_context: layout_context, layout_context: layout_context,
} }

View file

@ -100,7 +100,7 @@ impl<'a> LayoutContext<'a> {
} }
#[inline(always)] #[inline(always)]
pub fn font_context<'a>(&'a self) -> &'a mut FontContext { pub fn font_context<'b>(&'b self) -> &'b mut FontContext {
unsafe { unsafe {
let cached_context = &mut *self.cached_local_layout_context; let cached_context = &mut *self.cached_local_layout_context;
&mut cached_context.font_context &mut cached_context.font_context
@ -108,7 +108,7 @@ impl<'a> LayoutContext<'a> {
} }
#[inline(always)] #[inline(always)]
pub fn applicable_declarations_cache<'a>(&'a self) -> &'a mut ApplicableDeclarationsCache { pub fn applicable_declarations_cache<'b>(&'b self) -> &'b mut ApplicableDeclarationsCache {
unsafe { unsafe {
let cached_context = &mut *self.cached_local_layout_context; let cached_context = &mut *self.cached_local_layout_context;
&mut cached_context.applicable_declarations_cache &mut cached_context.applicable_declarations_cache
@ -116,7 +116,7 @@ impl<'a> LayoutContext<'a> {
} }
#[inline(always)] #[inline(always)]
pub fn style_sharing_candidate_cache<'a>(&'a self) -> &'a mut StyleSharingCandidateCache { pub fn style_sharing_candidate_cache<'b>(&'b self) -> &'b mut StyleSharingCandidateCache {
unsafe { unsafe {
let cached_context = &mut *self.cached_local_layout_context; let cached_context = &mut *self.cached_local_layout_context;
&mut cached_context.style_sharing_candidate_cache &mut cached_context.style_sharing_candidate_cache

View file

@ -46,7 +46,7 @@ impl<'a> Deref for FlowRef {
} }
} }
impl<'a> DerefMut for FlowRef { impl DerefMut for FlowRef {
fn deref_mut<'a>(&mut self) -> &mut (Flow + 'a) { fn deref_mut<'a>(&mut self) -> &mut (Flow + 'a) {
unsafe { unsafe {
mem::transmute_copy::<raw::TraitObject, &mut (Flow + 'a)>(&self.object) mem::transmute_copy::<raw::TraitObject, &mut (Flow + 'a)>(&self.object)