mirror of
https://github.com/servo/servo.git
synced 2025-07-13 18:33:40 +01:00
Auto merge of #22674 - servo:rustup, r=emilio
Fix new warnings in Rust nightly-2019-01-11 <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22674) <!-- Reviewable:end -->
This commit is contained in:
commit
055bfdb4cd
2 changed files with 17 additions and 20 deletions
|
@ -3821,7 +3821,14 @@ impl AliasId {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE(emilio): Callers are responsible to deal with prefs.
|
/// Call the given macro with tokens like this for each longhand and shorthand properties
|
||||||
|
/// that is enabled in content:
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// [CamelCaseName, SetCamelCaseName, PropertyId::Longhand(LonghandId::CamelCaseName)],
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// NOTE(emilio): Callers are responsible to deal with prefs.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! css_properties_accessors {
|
macro_rules! css_properties_accessors {
|
||||||
($macro_name: ident) => {
|
($macro_name: ident) => {
|
||||||
|
@ -3844,6 +3851,14 @@ macro_rules! css_properties_accessors {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Call the given macro with tokens like this for each longhand properties:
|
||||||
|
///
|
||||||
|
/// ```
|
||||||
|
/// { snake_case_ident, true }
|
||||||
|
/// ```
|
||||||
|
///
|
||||||
|
/// … where the boolean indicates whether the property value type
|
||||||
|
/// is wrapped in a `Box<_>` in the corresponding `PropertyDeclaration` variant.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! longhand_properties_idents {
|
macro_rules! longhand_properties_idents {
|
||||||
($macro_name: ident) => {
|
($macro_name: ident) => {
|
||||||
|
|
|
@ -158,24 +158,6 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[macro_export]
|
|
||||||
macro_rules! serialize_function {
|
|
||||||
($dest: expr, $name: ident($( $arg: expr, )+)) => {
|
|
||||||
serialize_function!($dest, $name($($arg),+))
|
|
||||||
};
|
|
||||||
($dest: expr, $name: ident($first_arg: expr $( , $arg: expr )*)) => {
|
|
||||||
{
|
|
||||||
$dest.write_str(concat!(stringify!($name), "("))?;
|
|
||||||
$first_arg.to_css($dest)?;
|
|
||||||
$(
|
|
||||||
$dest.write_str(", ")?;
|
|
||||||
$arg.to_css($dest)?;
|
|
||||||
)*
|
|
||||||
$dest.write_char(')')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Convenience wrapper to serialise CSS values separated by a given string.
|
/// Convenience wrapper to serialise CSS values separated by a given string.
|
||||||
pub struct SequenceWriter<'a, 'b: 'a, W: 'b> {
|
pub struct SequenceWriter<'a, 'b: 'a, W: 'b> {
|
||||||
inner: &'a mut CssWriter<'b, W>,
|
inner: &'a mut CssWriter<'b, W>,
|
||||||
|
@ -450,7 +432,7 @@ impl_to_css_for_predefined_type!(::cssparser::RGBA);
|
||||||
impl_to_css_for_predefined_type!(::cssparser::Color);
|
impl_to_css_for_predefined_type!(::cssparser::Color);
|
||||||
impl_to_css_for_predefined_type!(::cssparser::UnicodeRange);
|
impl_to_css_for_predefined_type!(::cssparser::UnicodeRange);
|
||||||
|
|
||||||
#[macro_export]
|
/// Define an enum type with unit variants that each correspond to a CSS keyword.
|
||||||
macro_rules! define_css_keyword_enum {
|
macro_rules! define_css_keyword_enum {
|
||||||
(pub enum $name:ident { $($variant:ident = $css:expr,)+ }) => {
|
(pub enum $name:ident { $($variant:ident = $css:expr,)+ }) => {
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue