Don't shadow lifetimes in script.

This commit is contained in:
Ms2ger 2015-01-28 13:48:28 +01:00
parent cc2523eed5
commit f8ac1777ff
29 changed files with 30 additions and 30 deletions

View file

@ -636,7 +636,7 @@ impl<'a, T: Reflectable> JSRef<'a, T> {
} }
impl<'a, T: Reflectable> Reflectable for JSRef<'a, T> { impl<'a, T: Reflectable> Reflectable for JSRef<'a, T> {
fn reflector<'a>(&'a self) -> &'a Reflector { fn reflector<'b>(&'b self) -> &'b Reflector {
(**self).reflector() (**self).reflector()
} }
} }

View file

@ -44,7 +44,7 @@ impl DOMTokenList {
trait PrivateDOMTokenListHelpers { trait PrivateDOMTokenListHelpers {
fn attribute(self) -> Option<Temporary<Attr>>; fn attribute(self) -> Option<Temporary<Attr>>;
fn check_token_exceptions<'a>(self, token: &'a str) -> Fallible<Atom>; fn check_token_exceptions(self, token: &str) -> Fallible<Atom>;
} }
impl<'a> PrivateDOMTokenListHelpers for JSRef<'a, DOMTokenList> { impl<'a> PrivateDOMTokenListHelpers for JSRef<'a, DOMTokenList> {
@ -53,7 +53,7 @@ impl<'a> PrivateDOMTokenListHelpers for JSRef<'a, DOMTokenList> {
element.r().get_attribute(ns!(""), &self.local_name) element.r().get_attribute(ns!(""), &self.local_name)
} }
fn check_token_exceptions<'a>(self, token: &'a str) -> Fallible<Atom> { fn check_token_exceptions(self, token: &str) -> Fallible<Atom> {
match token { match token {
"" => Err(Syntax), "" => Err(Syntax),
slice if slice.find(HTML_SPACE_CHARACTERS).is_some() => Err(InvalidCharacter), slice if slice.find(HTML_SPACE_CHARACTERS).is_some() => Err(InvalidCharacter),

View file

@ -1155,7 +1155,7 @@ pub fn get_attribute_parts<'a>(name: &'a str) -> (Option<&'a str>, &'a str) {
} }
impl<'a> VirtualMethods for JSRef<'a, Element> { impl<'a> VirtualMethods for JSRef<'a, Element> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let node: &JSRef<Node> = NodeCast::from_borrowed_ref(self); let node: &JSRef<Node> = NodeCast::from_borrowed_ref(self);
Some(node as &VirtualMethods) Some(node as &VirtualMethods)
} }

View file

@ -308,7 +308,7 @@ impl<'a> EventTargetMethods for JSRef<'a, EventTarget> {
} }
impl<'a> VirtualMethods for JSRef<'a, EventTarget> { impl<'a> VirtualMethods for JSRef<'a, EventTarget> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
None None
} }
} }

View file

@ -75,7 +75,7 @@ impl<'a> PrivateHTMLAnchorElementHelpers for JSRef<'a, HTMLAnchorElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLAnchorElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLAnchorElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -51,7 +51,7 @@ impl HTMLAreaElement {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLAreaElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLAreaElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -78,7 +78,7 @@ impl HTMLBodyElementHelpers for HTMLBodyElement {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLBodyElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let element: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let element: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(element as &VirtualMethods) Some(element as &VirtualMethods)
} }

View file

@ -76,7 +76,7 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLButtonElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLButtonElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -116,7 +116,7 @@ impl<'a> HTMLCanvasElementMethods for JSRef<'a, HTMLCanvasElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let element: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let element: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(element as &VirtualMethods) Some(element as &VirtualMethods)
} }

View file

@ -181,7 +181,7 @@ impl<'a> HTMLElementCustomAttributeHelpers for JSRef<'a, HTMLElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let element: &JSRef<Element> = ElementCast::from_borrowed_ref(self); let element: &JSRef<Element> = ElementCast::from_borrowed_ref(self);
Some(element as &VirtualMethods) Some(element as &VirtualMethods)
} }

View file

@ -78,7 +78,7 @@ impl<'a> HTMLFieldSetElementMethods for JSRef<'a, HTMLFieldSetElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLFieldSetElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLFieldSetElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -198,7 +198,7 @@ impl<'a> HTMLIFrameElementMethods for JSRef<'a, HTMLIFrameElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLIFrameElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLIFrameElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -176,7 +176,7 @@ impl<'a> HTMLImageElementMethods for JSRef<'a, HTMLImageElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLImageElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLImageElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -395,7 +395,7 @@ impl<'a> HTMLInputElementHelpers for JSRef<'a, HTMLInputElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLInputElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLInputElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -69,7 +69,7 @@ fn is_stylesheet(value: &Option<String>) -> bool {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -96,7 +96,7 @@ impl<'a> HTMLObjectElementMethods for JSRef<'a, HTMLObjectElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLObjectElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLObjectElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -54,7 +54,7 @@ impl<'a> HTMLOptGroupElementMethods for JSRef<'a, HTMLOptGroupElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLOptGroupElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLOptGroupElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -123,7 +123,7 @@ impl<'a> HTMLOptionElementMethods for JSRef<'a, HTMLOptionElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLOptionElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLOptionElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -288,7 +288,7 @@ impl<'a> HTMLScriptElementHelpers for JSRef<'a, HTMLScriptElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLScriptElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLScriptElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -78,7 +78,7 @@ impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLSelectElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLSelectElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -63,7 +63,7 @@ impl<'a> StyleElementHelpers for JSRef<'a, HTMLStyleElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLStyleElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLStyleElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -81,7 +81,7 @@ impl HTMLTableCellElementHelpers for HTMLTableCellElement {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLTableCellElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLTableCellElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -112,7 +112,7 @@ impl HTMLTableElementHelpers for HTMLTableElement {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLTableElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLTableElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -62,7 +62,7 @@ impl HTMLTableRowElementHelpers for HTMLTableRowElement {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLTableRowElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLTableRowElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -60,7 +60,7 @@ impl HTMLTableSectionElementHelpers for HTMLTableSectionElement {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLTableSectionElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLTableSectionElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -200,7 +200,7 @@ impl<'a> PrivateHTMLTextAreaElementHelpers for JSRef<'a, HTMLTextAreaElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLTextAreaElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLTextAreaElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -65,7 +65,7 @@ impl<'a> HTMLTitleElementMethods for JSRef<'a, HTMLTitleElement> {
} }
impl<'a> VirtualMethods for JSRef<'a, HTMLTitleElement> { impl<'a> VirtualMethods for JSRef<'a, HTMLTitleElement> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self); let htmlelement: &JSRef<HTMLElement> = HTMLElementCast::from_borrowed_ref(self);
Some(htmlelement as &VirtualMethods) Some(htmlelement as &VirtualMethods)
} }

View file

@ -2223,7 +2223,7 @@ pub fn window_from_node<T: NodeBase+Reflectable>(derived: JSRef<T>) -> Temporary
} }
impl<'a> VirtualMethods for JSRef<'a, Node> { impl<'a> VirtualMethods for JSRef<'a, Node> {
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods> { fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let eventtarget: &JSRef<EventTarget> = EventTargetCast::from_borrowed_ref(self); let eventtarget: &JSRef<EventTarget> = EventTargetCast::from_borrowed_ref(self);
Some(eventtarget as &VirtualMethods) Some(eventtarget as &VirtualMethods)
} }

View file

@ -66,7 +66,7 @@ use string_cache::Atom;
pub trait VirtualMethods { pub trait VirtualMethods {
/// Returns self as the superclass of the implementation for this trait, /// Returns self as the superclass of the implementation for this trait,
/// if any. /// if any.
fn super_type<'a>(&'a self) -> Option<&'a VirtualMethods>; fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods>;
/// Called when changing or adding attributes, after the attribute's value /// Called when changing or adding attributes, after the attribute's value
/// has been updated. /// has been updated.