Reinstate errors for unused variables and imports.

This commit is contained in:
Jack Moffitt 2014-09-13 23:38:00 -06:00
parent 97e068b1c2
commit e10206e91e
19 changed files with 36 additions and 8 deletions

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 http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![deny(unused_imports, unused_variable)]
extern crate azure; extern crate azure;
extern crate geom; extern crate geom;

View file

@ -7,6 +7,8 @@
#![feature(globs, phase, macro_rules)] #![feature(globs, phase, macro_rules)]
#![deny(unused_imports, unused_variable)]
#[phase(plugin, link)] #[phase(plugin, link)]
extern crate log; extern crate log;

View file

@ -127,7 +127,7 @@ impl FontCache {
let family = self.web_families.get_mut(&family_name); let family = self.web_families.get_mut(&family_name);
family.add_template(format!("{}", url).as_slice(), Some(bytes)); family.add_template(format!("{}", url).as_slice(), Some(bytes));
}, },
Err(msg) => { Err(_) => {
debug!("Failed to load web font: family={} url={}", family_name, url); debug!("Failed to load web font: family={} url={}", family_name, url);
} }
} }

View file

@ -4,6 +4,8 @@
#![feature(globs, macro_rules, phase, unsafe_destructor)] #![feature(globs, macro_rules, phase, unsafe_destructor)]
#![deny(unused_imports, unused_variable)]
#![feature(phase)] #![feature(phase)]
#[phase(plugin, link)] #[phase(plugin, link)]
extern crate log; extern crate log;

View file

@ -286,7 +286,7 @@ impl<'a, 'b> FlowConstructor<'a, 'b> {
} }
{ {
let mut inline_flow = inline_flow_ref.get_mut().as_inline(); let inline_flow = inline_flow_ref.get_mut().as_inline();
let (ascent, descent) = inline_flow.compute_minimum_ascent_and_descent(self.layout_context.font_context(), &**node.style()); let (ascent, descent) = inline_flow.compute_minimum_ascent_and_descent(self.layout_context.font_context(), &**node.style());
inline_flow.minimum_block_size_above_baseline = ascent; inline_flow.minimum_block_size_above_baseline = ascent;
inline_flow.minimum_depth_below_baseline = descent; inline_flow.minimum_depth_below_baseline = descent;

View file

@ -10,7 +10,7 @@ use css::node_style::StyledNode;
use construct::FlowConstructor; use construct::FlowConstructor;
use context::LayoutContext; use context::LayoutContext;
use floats::{ClearBoth, ClearLeft, ClearRight, ClearType}; use floats::{ClearBoth, ClearLeft, ClearRight, ClearType};
use flow::{Flow, MutableFlowUtils}; use flow::Flow;
use flow; use flow;
use flow_ref::FlowRef; use flow_ref::FlowRef;
use inline::{InlineFragmentContext, InlineMetrics}; use inline::{InlineFragmentContext, InlineMetrics};

View file

@ -7,6 +7,8 @@
#![feature(globs, macro_rules, phase, thread_local, unsafe_destructor)] #![feature(globs, macro_rules, phase, thread_local, unsafe_destructor)]
#![deny(unused_imports, unused_variable)]
#[phase(plugin, link)] #[phase(plugin, link)]
extern crate log; extern crate log;

View file

@ -5,6 +5,8 @@
#![comment = "The Servo Parallel Browser Project"] #![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"] #![license = "MPL"]
#![deny(unused_imports, unused_variable)]
extern crate gfx; extern crate gfx;
extern crate script_traits; extern crate script_traits;
extern crate servo_msg = "msg"; extern crate servo_msg = "msg";

View file

@ -4,6 +4,8 @@
#![feature(macro_rules, plugin_registrar, quote, phase)] #![feature(macro_rules, plugin_registrar, quote, phase)]
#![deny(unused_imports, unused_variable)]
//! Exports macros for use in other Servo crates. //! Exports macros for use in other Servo crates.
extern crate syntax; extern crate syntax;
@ -14,10 +16,9 @@ extern crate rustc;
extern crate sync; extern crate sync;
use syntax::ast; use syntax::ast;
use syntax::parse::token;
use rustc::lint::{Context, LintPass, LintPassObject, LintArray}; use rustc::lint::{Context, LintPass, LintPassObject, LintArray};
use rustc::plugin::Registry; use rustc::plugin::Registry;
use rustc::middle::ty::{expr_ty, get}; use rustc::middle::ty::expr_ty;
use rustc::middle::typeck::astconv::AstConv; use rustc::middle::typeck::astconv::AstConv;
use rustc::util::ppaux::Repr; use rustc::util::ppaux::Repr;

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 http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#![deny(unused_imports, unused_variable)]
extern crate azure; extern crate azure;
extern crate geom; extern crate geom;
extern crate layers; extern crate layers;

View file

@ -4,6 +4,8 @@
#![feature(default_type_params, globs, managed_boxes, phase)] #![feature(default_type_params, globs, managed_boxes, phase)]
#![deny(unused_imports, unused_variable)]
extern crate debug; extern crate debug;
extern crate collections; extern crate collections;
extern crate geom; extern crate geom;

View file

@ -7,12 +7,11 @@
#![feature(globs, macro_rules, struct_variant, phase, unsafe_destructor)] #![feature(globs, macro_rules, struct_variant, phase, unsafe_destructor)]
#![feature(phase)] #![deny(unused_imports, unused_variable)]
#![allow(non_snake_case_functions)]
#![doc="The script crate contains all matters DOM."] #![doc="The script crate contains all matters DOM."]
#![allow(non_snake_case_functions)]
#[phase(plugin, link)] #[phase(plugin, link)]
extern crate log; extern crate log;

View file

@ -5,6 +5,8 @@
#![comment = "The Servo Parallel Browser Project"] #![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"] #![license = "MPL"]
#![deny(unused_imports, unused_variable)]
extern crate geom; extern crate geom;
extern crate servo_msg = "msg"; extern crate servo_msg = "msg";
extern crate servo_net = "net"; extern crate servo_net = "net";

View file

@ -7,6 +7,8 @@
#![feature(globs, macro_rules)] #![feature(globs, macro_rules)]
#![deny(unused_imports, unused_variable)]
#![feature(phase)] #![feature(phase)]
#[phase(plugin, link)] extern crate log; #[phase(plugin, link)] extern crate log;

View file

@ -4,6 +4,8 @@
#![feature(macro_rules,unsafe_destructor)] #![feature(macro_rules,unsafe_destructor)]
#![deny(unused_imports, unused_variable)]
#![feature(phase)] #![feature(phase)]
#[phase(plugin, link)] #[phase(plugin, link)]
extern crate log; extern crate log;

View file

@ -7,6 +7,8 @@
#![feature(globs, macro_rules, phase, thread_local)] #![feature(globs, macro_rules, phase, thread_local)]
#![deny(unused_imports, unused_variable)]
#[phase(plugin, link)] #[phase(plugin, link)]
extern crate log; extern crate log;

View file

@ -5,6 +5,8 @@
#![comment = "The Servo Parallel Browser Project"] #![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"] #![license = "MPL"]
#![deny(unused_imports, unused_variable)]
extern crate servo; extern crate servo;
extern crate native; extern crate native;
extern crate servo_util = "util"; extern crate servo_util = "util";

View file

@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![deny(unused_imports, unused_variable)]
extern crate std; extern crate std;
extern crate getopts; extern crate getopts;
extern crate regex; extern crate regex;

View file

@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
#![deny(unused_imports, unused_variable)]
extern crate png; extern crate png;
extern crate std; extern crate std;
extern crate test; extern crate test;