Skip to content

Commit

Permalink
Merge pull request #3327 from metajack/cargo-profiles
Browse files Browse the repository at this point in the history
Reinstate errors for unused variables and imports.
  • Loading branch information
jdm committed Sep 14, 2014
2 parents 22df994 + e10206e commit 6c17912
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 8 deletions.
2 changes: 2 additions & 0 deletions components/canvas/lib.rs
Expand Up @@ -2,6 +2,8 @@
* 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/. */

#![deny(unused_imports, unused_variable)]

extern crate azure;
extern crate geom;

Expand Down
2 changes: 2 additions & 0 deletions components/compositing/lib.rs
Expand Up @@ -7,6 +7,8 @@

#![feature(globs, phase, macro_rules)]

#![deny(unused_imports, unused_variable)]

#[phase(plugin, link)]
extern crate log;

Expand Down
2 changes: 1 addition & 1 deletion components/gfx/font_cache_task.rs
Expand Up @@ -127,7 +127,7 @@ impl FontCache {
let family = self.web_families.get_mut(&family_name);
family.add_template(format!("{}", url).as_slice(), Some(bytes));
},
Err(msg) => {
Err(_) => {
debug!("Failed to load web font: family={} url={}", family_name, url);
}
}
Expand Down
2 changes: 2 additions & 0 deletions components/gfx/lib.rs
Expand Up @@ -4,6 +4,8 @@

#![feature(globs, macro_rules, phase, unsafe_destructor)]

#![deny(unused_imports, unused_variable)]

#![feature(phase)]
#[phase(plugin, link)]
extern crate log;
Expand Down
2 changes: 1 addition & 1 deletion components/layout/construct.rs
Expand Up @@ -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());
inline_flow.minimum_block_size_above_baseline = ascent;
inline_flow.minimum_depth_below_baseline = descent;
Expand Down
2 changes: 1 addition & 1 deletion components/layout/fragment.rs
Expand Up @@ -10,7 +10,7 @@ use css::node_style::StyledNode;
use construct::FlowConstructor;
use context::LayoutContext;
use floats::{ClearBoth, ClearLeft, ClearRight, ClearType};
use flow::{Flow, MutableFlowUtils};
use flow::Flow;
use flow;
use flow_ref::FlowRef;
use inline::{InlineFragmentContext, InlineMetrics};
Expand Down
2 changes: 2 additions & 0 deletions components/layout/lib.rs
Expand Up @@ -7,6 +7,8 @@

#![feature(globs, macro_rules, phase, thread_local, unsafe_destructor)]

#![deny(unused_imports, unused_variable)]

#[phase(plugin, link)]
extern crate log;

Expand Down
2 changes: 2 additions & 0 deletions components/layout_traits/lib.rs
Expand Up @@ -5,6 +5,8 @@
#![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"]

#![deny(unused_imports, unused_variable)]

extern crate gfx;
extern crate script_traits;
extern crate servo_msg = "msg";
Expand Down
5 changes: 3 additions & 2 deletions components/macros/lib.rs
Expand Up @@ -4,6 +4,8 @@

#![feature(macro_rules, plugin_registrar, quote, phase)]

#![deny(unused_imports, unused_variable)]

//! Exports macros for use in other Servo crates.

extern crate syntax;
Expand All @@ -14,10 +16,9 @@ extern crate rustc;
extern crate sync;

use syntax::ast;
use syntax::parse::token;
use rustc::lint::{Context, LintPass, LintPassObject, LintArray};
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::util::ppaux::Repr;

Expand Down
2 changes: 2 additions & 0 deletions components/msg/lib.rs
Expand Up @@ -2,6 +2,8 @@
* 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/. */

#![deny(unused_imports, unused_variable)]

extern crate azure;
extern crate geom;
extern crate layers;
Expand Down
2 changes: 2 additions & 0 deletions components/net/lib.rs
Expand Up @@ -4,6 +4,8 @@

#![feature(default_type_params, globs, managed_boxes, phase)]

#![deny(unused_imports, unused_variable)]

extern crate debug;
extern crate collections;
extern crate geom;
Expand Down
5 changes: 2 additions & 3 deletions components/script/lib.rs
Expand Up @@ -7,12 +7,11 @@

#![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."]

#![allow(non_snake_case_functions)]

#[phase(plugin, link)]
extern crate log;

Expand Down
2 changes: 2 additions & 0 deletions components/script_traits/lib.rs
Expand Up @@ -5,6 +5,8 @@
#![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"]

#![deny(unused_imports, unused_variable)]

extern crate geom;
extern crate servo_msg = "msg";
extern crate servo_net = "net";
Expand Down
2 changes: 2 additions & 0 deletions components/style/lib.rs
Expand Up @@ -7,6 +7,8 @@

#![feature(globs, macro_rules)]

#![deny(unused_imports, unused_variable)]

#![feature(phase)]
#[phase(plugin, link)] extern crate log;

Expand Down
2 changes: 2 additions & 0 deletions components/util/lib.rs
Expand Up @@ -4,6 +4,8 @@

#![feature(macro_rules,unsafe_destructor)]

#![deny(unused_imports, unused_variable)]

#![feature(phase)]
#[phase(plugin, link)]
extern crate log;
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Expand Up @@ -7,6 +7,8 @@

#![feature(globs, macro_rules, phase, thread_local)]

#![deny(unused_imports, unused_variable)]

#[phase(plugin, link)]
extern crate log;

Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Expand Up @@ -5,6 +5,8 @@
#![comment = "The Servo Parallel Browser Project"]
#![license = "MPL"]

#![deny(unused_imports, unused_variable)]

extern crate servo;
extern crate native;
extern crate servo_util = "util";
Expand Down
2 changes: 2 additions & 0 deletions tests/contenttest.rs
Expand Up @@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(unused_imports, unused_variable)]

extern crate std;
extern crate getopts;
extern crate regex;
Expand Down
2 changes: 2 additions & 0 deletions tests/reftest.rs
Expand Up @@ -7,6 +7,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![deny(unused_imports, unused_variable)]

extern crate png;
extern crate std;
extern crate test;
Expand Down

0 comments on commit 6c17912

Please sign in to comment.