Fix warnings introduced in newer Rust Nightly

This does not (yet) upgrade ./rust-toolchain

The warnings:

* dead_code "field is never read"
* redundant_semicolons "unnecessary trailing semicolon"
* non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021"
* unstable_name_collisions "a method with this name may be added to the standard library in the future"
* legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
This commit is contained in:
Simon Sapin 2021-02-25 10:39:53 +01:00
parent 4353d534d4
commit a0d9f97c8e
35 changed files with 75 additions and 116 deletions

View file

@ -91,7 +91,6 @@ impl Default for ShapeBox {
/// A value for the `clip-path` property.
#[allow(missing_docs)]
#[animation(no_bound(U))]
#[derive(
Animate,
Clone,
@ -106,6 +105,7 @@ impl Default for ShapeBox {
ToResolvedValue,
ToShmem,
)]
#[animation(no_bound(U))]
#[repr(u8)]
pub enum GenericClipPath<BasicShape, U> {
#[animation(error)]
@ -126,7 +126,6 @@ pub use self::GenericClipPath as ClipPath;
/// A value for the `shape-outside` property.
#[allow(missing_docs)]
#[animation(no_bound(I))]
#[derive(
Animate,
Clone,
@ -141,6 +140,7 @@ pub use self::GenericClipPath as ClipPath;
ToResolvedValue,
ToShmem,
)]
#[animation(no_bound(I))]
#[repr(u8)]
pub enum GenericShapeOutside<BasicShape, I> {
#[animation(error)]
@ -193,7 +193,6 @@ pub use self::GenericBasicShape as BasicShape;
/// <https://drafts.csswg.org/css-shapes/#funcdef-inset>
#[allow(missing_docs)]
#[css(function = "inset")]
#[derive(
Animate,
Clone,
@ -207,6 +206,7 @@ pub use self::GenericBasicShape as BasicShape;
ToResolvedValue,
ToShmem,
)]
#[css(function = "inset")]
#[repr(C)]
pub struct InsetRect<LengthPercentage, NonNegativeLengthPercentage> {
pub rect: Rect<LengthPercentage>,
@ -216,7 +216,6 @@ pub struct InsetRect<LengthPercentage, NonNegativeLengthPercentage> {
/// <https://drafts.csswg.org/css-shapes/#funcdef-circle>
#[allow(missing_docs)]
#[css(function)]
#[derive(
Animate,
Clone,
@ -231,6 +230,7 @@ pub struct InsetRect<LengthPercentage, NonNegativeLengthPercentage> {
ToResolvedValue,
ToShmem,
)]
#[css(function)]
#[repr(C)]
pub struct Circle<H, V, NonNegativeLengthPercentage> {
pub position: GenericPosition<H, V>,
@ -239,7 +239,6 @@ pub struct Circle<H, V, NonNegativeLengthPercentage> {
/// <https://drafts.csswg.org/css-shapes/#funcdef-ellipse>
#[allow(missing_docs)]
#[css(function)]
#[derive(
Animate,
Clone,
@ -254,6 +253,7 @@ pub struct Circle<H, V, NonNegativeLengthPercentage> {
ToResolvedValue,
ToShmem,
)]
#[css(function)]
#[repr(C)]
pub struct Ellipse<H, V, NonNegativeLengthPercentage> {
pub position: GenericPosition<H, V>,
@ -293,7 +293,6 @@ pub use self::GenericShapeRadius as ShapeRadius;
/// A generic type for representing the `polygon()` function
///
/// <https://drafts.csswg.org/css-shapes/#funcdef-polygon>
#[css(comma, function = "polygon")]
#[derive(
Clone,
Debug,
@ -306,6 +305,7 @@ pub use self::GenericShapeRadius as ShapeRadius;
ToResolvedValue,
ToShmem,
)]
#[css(comma, function = "polygon")]
#[repr(C)]
pub struct GenericPolygon<LengthPercentage> {
/// The filling rule for a polygon.
@ -364,7 +364,6 @@ pub enum FillRule {
/// The path function defined in css-shape-2.
///
/// https://drafts.csswg.org/css-shapes-2/#funcdef-path
#[css(comma)]
#[derive(
Animate,
Clone,
@ -379,6 +378,7 @@ pub enum FillRule {
ToResolvedValue,
ToShmem,
)]
#[css(comma)]
#[repr(C)]
pub struct Path {
/// The filling rule for the svg path.

View file

@ -35,7 +35,6 @@ pub use self::GenericBoxShadow as BoxShadow;
/// A generic value for a single `filter`.
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[animation(no_bound(U))]
#[derive(
Clone,
ComputeSquaredDistance,
@ -49,6 +48,7 @@ pub use self::GenericBoxShadow as BoxShadow;
ToResolvedValue,
ToShmem,
)]
#[animation(no_bound(U))]
#[repr(C, u8)]
pub enum GenericFilter<Angle, NonNegativeFactor, ZeroToOneFactor, Length, Shadow, U> {
/// `blur(<length>)`

View file

@ -77,7 +77,6 @@ pub struct VariationValue<Number> {
}
/// A value both for font-variation-settings and font-feature-settings.
#[css(comma)]
#[derive(
Clone,
Debug,
@ -90,6 +89,7 @@ pub struct VariationValue<Number> {
ToResolvedValue,
ToShmem,
)]
#[css(comma)]
pub struct FontSettings<T>(#[css(if_empty = "normal", iterable)] pub Box<[T]>);
impl<T> FontSettings<T> {

View file

@ -264,7 +264,6 @@ impl ToCss for PaintWorklet {
///
/// `-moz-image-rect(<uri>, top, right, bottom, left);`
#[allow(missing_docs)]
#[css(comma, function = "-moz-image-rect")]
#[derive(
Clone,
Debug,
@ -276,6 +275,7 @@ impl ToCss for PaintWorklet {
ToResolvedValue,
ToShmem,
)]
#[css(comma, function = "-moz-image-rect")]
#[repr(C)]
pub struct GenericMozImageRect<NumberOrPercentage, MozImageRectUrl> {
pub url: MozImageRectUrl,

View file

@ -42,7 +42,6 @@ pub use self::GenericSVGPaintFallback as SVGPaintFallback;
/// An SVG paint value
///
/// <https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint>
#[animation(no_bound(Url))]
#[derive(
Animate,
Clone,
@ -58,6 +57,7 @@ pub use self::GenericSVGPaintFallback as SVGPaintFallback;
ToResolvedValue,
ToShmem,
)]
#[animation(no_bound(Url))]
#[repr(C)]
pub struct GenericSVGPaint<Color, Url> {
/// The paint source.
@ -81,7 +81,6 @@ impl<C, U> Default for SVGPaint<C, U> {
///
/// Whereas the spec only allows PaintServer to have a fallback, Gecko lets the
/// context properties have a fallback as well.
#[animation(no_bound(U))]
#[derive(
Animate,
Clone,
@ -98,6 +97,7 @@ impl<C, U> Default for SVGPaint<C, U> {
ToResolvedValue,
ToShmem,
)]
#[animation(no_bound(U))]
#[repr(C, u8)]
pub enum GenericSVGPaintKind<C, U> {
/// `none`

View file

@ -47,7 +47,6 @@ pub use self::GenericMatrix as Matrix;
#[allow(missing_docs)]
#[cfg_attr(rustfmt, rustfmt_skip)]
#[css(comma, function = "matrix3d")]
#[derive(
Clone,
Copy,
@ -62,6 +61,7 @@ pub use self::GenericMatrix as Matrix;
ToResolvedValue,
ToShmem,
)]
#[css(comma, function = "matrix3d")]
#[repr(C)]
pub struct GenericMatrix3D<T> {
pub m11: T, pub m12: T, pub m13: T, pub m14: T,