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.