diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/style/errors.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/style/errors.rs b/src/components/style/errors.rs index f62520065a0..d07b7e84e5f 100644 --- a/src/components/style/errors.rs +++ b/src/components/style/errors.rs @@ -22,7 +22,10 @@ impl<T, I: Iterator<Result<T, SyntaxError>>> Iterator<T> for ErrorLoggerIterator } -local_data_key!(silence_errors: ()) +// FIXME: go back to `()` instead of `bool` after upgrading Rust +// past 898669c4e203ae91e2048fb6c0f8591c867bccc6 +// Using bool is a work-around for https://github.com/mozilla/rust/issues/13322 +local_data_key!(silence_errors: bool) pub fn log_css_error(location: SourceLocation, message: &str) { // TODO eventually this will got into a "web console" or something. @@ -33,7 +36,7 @@ pub fn log_css_error(location: SourceLocation, message: &str) { pub fn with_errors_silenced<T>(f: || -> T) -> T { - local_data::set(silence_errors, ()); + local_data::set(silence_errors, true); let result = f(); local_data::pop(silence_errors); result |