Stable still requires lifetimes here

This commit is contained in:
David Tolnay 2018-11-18 02:41:52 -08:00
parent 0ec3be89cc
commit 0e4123f927
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
3 changed files with 60 additions and 18 deletions

View File

@ -41,13 +41,13 @@ pub type DOMTree<T> = Box<Node<T>>;
/// ```
///
/// [Node]: trait.Node.html
pub enum VNode<'a, T: OutputType> {
pub enum VNode<'a, T: OutputType + 'a> {
Text(&'a str),
Element(VElement<'a, T>),
}
/// An untyped representation of an HTML element.
pub struct VElement<'a, T: OutputType> {
pub struct VElement<'a, T: OutputType + 'a> {
pub name: &'static str,
pub attributes: Vec<(&'static str, String)>,
pub events: &'a mut Events<T>,

View File

@ -85,7 +85,7 @@ impl<A: Debug> Debug for SpacedList<A> {
}
}
impl<A: FromStr> From<(&str, &str)> for SpacedList<A>
impl<'a, 'b, A: FromStr> From<(&'a str, &'b str)> for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{
@ -97,7 +97,7 @@ where
}
}
impl<A: FromStr> From<(&str, &str, &str)> for SpacedList<A>
impl<'a, 'b, 'c, A: FromStr> From<(&'a str, &'b str, &'c str)> for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{
@ -110,7 +110,7 @@ where
}
}
impl<A: FromStr> From<(&str, &str, &str, &str)> for SpacedList<A>
impl<'a, 'b, 'c, 'd, A: FromStr> From<(&'a str, &'b str, &'c str, &'d str)> for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{
@ -124,7 +124,8 @@ where
}
}
impl<A: FromStr> From<(&str, &str, &str, &str, &str)> for SpacedList<A>
impl<'a, 'b, 'c, 'd, 'e, A: FromStr> From<(&'a str, &'b str, &'c str, &'d str, &'e str)>
for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{
@ -139,7 +140,8 @@ where
}
}
impl<A: FromStr> From<(&str, &str, &str, &str, &str, &str)> for SpacedList<A>
impl<'a, 'b, 'c, 'd, 'e, 'f, A: FromStr>
From<(&'a str, &'b str, &'c str, &'d str, &'e str, &'f str)> for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{
@ -155,7 +157,16 @@ where
}
}
impl<A: FromStr> From<(&str, &str, &str, &str, &str, &str, &str)> for SpacedList<A>
impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, A: FromStr>
From<(
&'a str,
&'b str,
&'c str,
&'d str,
&'e str,
&'f str,
&'g str,
)> for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{
@ -172,7 +183,17 @@ where
}
}
impl<A: FromStr> From<(&str, &str, &str, &str, &str, &str, &str, &str)> for SpacedList<A>
impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, A: FromStr>
From<(
&'a str,
&'b str,
&'c str,
&'d str,
&'e str,
&'f str,
&'g str,
&'h str,
)> for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{
@ -192,7 +213,7 @@ where
macro_rules! spacedlist_from_array {
($num:tt) => {
impl<A: FromStr> From<[&str; $num]> for SpacedList<A>
impl<'a, A: FromStr> From<[&'a str; $num]> for SpacedList<A>
where
<A as FromStr>::Err: Debug,
{

View File

@ -113,7 +113,7 @@ impl<A: Ord + Debug> Debug for SpacedSet<A> {
}
}
impl<A: Ord + FromStr> From<(&str, &str)> for SpacedSet<A>
impl<'a, 'b, A: Ord + FromStr> From<(&'a str, &'b str)> for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{
@ -125,7 +125,7 @@ where
}
}
impl<A: Ord + FromStr> From<(&str, &str, &str)> for SpacedSet<A>
impl<'a, 'b, 'c, A: Ord + FromStr> From<(&'a str, &'b str, &'c str)> for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{
@ -138,7 +138,7 @@ where
}
}
impl<A: Ord + FromStr> From<(&str, &str, &str, &str)> for SpacedSet<A>
impl<'a, 'b, 'c, 'd, A: Ord + FromStr> From<(&'a str, &'b str, &'c str, &'d str)> for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{
@ -152,7 +152,8 @@ where
}
}
impl<A: Ord + FromStr> From<(&str, &str, &str, &str, &str)> for SpacedSet<A>
impl<'a, 'b, 'c, 'd, 'e, A: Ord + FromStr> From<(&'a str, &'b str, &'c str, &'d str, &'e str)>
for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{
@ -167,7 +168,8 @@ where
}
}
impl<A: Ord + FromStr> From<(&str, &str, &str, &str, &str, &str)> for SpacedSet<A>
impl<'a, 'b, 'c, 'd, 'e, 'f, A: Ord + FromStr>
From<(&'a str, &'b str, &'c str, &'d str, &'e str, &'f str)> for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{
@ -183,7 +185,16 @@ where
}
}
impl<A: Ord + FromStr> From<(&str, &str, &str, &str, &str, &str, &str)> for SpacedSet<A>
impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, A: Ord + FromStr>
From<(
&'a str,
&'b str,
&'c str,
&'d str,
&'e str,
&'f str,
&'g str,
)> for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{
@ -200,7 +211,17 @@ where
}
}
impl<A: Ord + FromStr> From<(&str, &str, &str, &str, &str, &str, &str, &str)> for SpacedSet<A>
impl<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, A: Ord + FromStr>
From<(
&'a str,
&'b str,
&'c str,
&'d str,
&'e str,
&'f str,
&'g str,
&'h str,
)> for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{
@ -220,7 +241,7 @@ where
macro_rules! spacedlist_from_array {
($num:tt) => {
impl<A: Ord + FromStr> From<[&str; $num]> for SpacedSet<A>
impl<'a, A: Ord + FromStr> From<[&'a str; $num]> for SpacedSet<A>
where
<A as FromStr>::Err: Debug,
{