Skip to content

Unused type parameter error regression with nightly-2016-08-28 #36075

Closed
@nox

Description

@nox

The following code now fails to typecheck in latest nightly:

/// Provides an iterator for declaration list parsing.
pub struct DeclarationListParser<'i: 't, 't: 'a, 'a, I, P>
where P: DeclarationParser<Declaration = I> + AtRuleParser<AtRule = I> {
    /// The input given to `DeclarationListParser::new`
    pub input: &'a mut Parser<'i, 't>,

    /// The parser given to `DeclarationListParser::new`
    pub parser: P,
}

/// Provides an iterator for rule list parsing.
pub struct RuleListParser<'i: 't, 't: 'a, 'a, R, P>
where P: QualifiedRuleParser<QualifiedRule = R> + AtRuleParser<AtRule = R> {
    /// The input given to `RuleListParser::new`
    pub input: &'a mut Parser<'i, 't>,

    /// The parser given to `RuleListParser::new`
    pub parser: P,

    is_stylesheet: bool,
    any_rule_so_far: bool,
}
error[E0392]: parameter `I` is never used
   --> /Users/nox/src/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/cssparser-0.5.7/src/rules_and_declarations.rs:188:54
    |
188 | pub struct DeclarationListParser<'i: 't, 't: 'a, 'a, I, P>
    |                                                      ^ unused type parameter
    |
    = help: consider removing `I` or using a marker such as `std::marker::PhantomData`

error[E0392]: parameter `R` is never used
   --> /Users/nox/src/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/cssparser-0.5.7/src/rules_and_declarations.rs:258:47
    |
258 | pub struct RuleListParser<'i: 't, 't: 'a, 'a, R, P>
    |                                               ^ unused type parameter
    |
    = help: consider removing `R` or using a marker such as `std::marker::PhantomData`

error: aborting due to 2 previous errors

source

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions