Fix compiler warnings

This commit is contained in:
Bryce Wilson 2021-08-14 21:35:15 -07:00
parent 8b3a49349d
commit f305c82494
No known key found for this signature in database
GPG key ID: F4AEE17C36AB5D15
5 changed files with 6 additions and 5 deletions

View file

@ -627,7 +627,7 @@ bitflags! {
#[doc = "virtual call is too expensive."] #[doc = "virtual call is too expensive."]
const FLOATS_RIGHT = 0b0000_0000_0000_0100_0000_0000; const FLOATS_RIGHT = 0b0000_0000_0000_0100_0000_0000;
#[doc = "Text alignment. \ #[doc = "Text alignment. \
\
NB: If you update this, update `TEXT_ALIGN_SHIFT` below."] NB: If you update this, update `TEXT_ALIGN_SHIFT` below."]
const TEXT_ALIGN = 0b0000_0000_0111_1000_0000_0000; const TEXT_ALIGN = 0b0000_0000_0111_1000_0000_0000;
#[doc = "Whether this flow has a fragment with `counter-reset` or `counter-increment` \ #[doc = "Whether this flow has a fragment with `counter-reset` or `counter-increment` \

View file

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#![allow(unsafe_code)]
use crate::dom::bindings::cell::DomRefCell; use crate::dom::bindings::cell::DomRefCell;
use crate::dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods; use crate::dom::bindings::codegen::Bindings::CSSRuleListBinding::CSSRuleListMethods;
use crate::dom::bindings::error::{Error, ErrorResult, Fallible}; use crate::dom::bindings::error::{Error, ErrorResult, Fallible};
@ -21,7 +23,6 @@ use style::stylesheets::{
AllowImportRules, CssRules, CssRulesHelpers, KeyframesRule, RulesMutateError, AllowImportRules, CssRules, CssRulesHelpers, KeyframesRule, RulesMutateError,
}; };
#[allow(unsafe_code)]
unsafe_no_jsmanaged_fields!(RulesSource); unsafe_no_jsmanaged_fields!(RulesSource);
unsafe_no_jsmanaged_fields!(CssRules); unsafe_no_jsmanaged_fields!(CssRules);

View file

@ -636,7 +636,7 @@ macro_rules! handle_potential_webgl_error {
} }
}; };
($context:expr, $call:expr) => { ($context:expr, $call:expr) => {
handle_potential_webgl_error!($context, $call, ()); handle_potential_webgl_error!($context, $call, ())
}; };
} }

View file

@ -753,7 +753,7 @@ impl MaybeNew for ViewportConstraints {
}) })
} else { } else {
None None
}; }
}; };
} }

View file

@ -136,7 +136,7 @@ impl SpecifiedValueInfo for CounterStyle {
// approach here. // approach here.
macro_rules! predefined { macro_rules! predefined {
($($name:expr,)+) => { ($($name:expr,)+) => {
f(&["symbols", $($name,)+]); f(&["symbols", $($name,)+])
} }
} }
include!("../../counter_style/predefined.rs"); include!("../../counter_style/predefined.rs");