Skip to content

Commit 55f81bc

Browse files
committed
rustc: Fix style of Lint enum
1 parent 520c82e commit 55f81bc

File tree

7 files changed

+124
-124
lines changed

7 files changed

+124
-124
lines changed

src/librustc/driver/session.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ pub struct options {
145145
llvm_args: ~[~str],
146146
debuginfo: bool,
147147
extra_debuginfo: bool,
148-
lint_opts: ~[(lint::lint, lint::level)],
148+
lint_opts: ~[(lint::Lint, lint::level)],
149149
save_temps: bool,
150150
output_type: back::link::OutputType,
151151
// This is mutable for rustpkg, which updates search paths based on the
@@ -214,7 +214,7 @@ pub struct Session_ {
214214
building_library: Cell<bool>,
215215
working_dir: Path,
216216
lints: RefCell<HashMap<ast::NodeId,
217-
~[(lint::lint, codemap::Span, ~str)]>>,
217+
~[(lint::Lint, codemap::Span, ~str)]>>,
218218
node_id: Cell<ast::NodeId>,
219219
outputs: @RefCell<~[OutputStyle]>,
220220
}
@@ -268,7 +268,7 @@ impl Session_ {
268268
self.span_diagnostic.handler().unimpl(msg)
269269
}
270270
pub fn add_lint(&self,
271-
lint: lint::lint,
271+
lint: lint::Lint,
272272
id: ast::NodeId,
273273
sp: Span,
274274
msg: ~str) {
@@ -443,12 +443,12 @@ pub fn collect_outputs(session: &Session,
443443
Some(n) if "staticlib" == n => Some(OutputStaticlib),
444444
Some(n) if "bin" == n => Some(OutputExecutable),
445445
Some(_) => {
446-
session.add_lint(lint::unknown_crate_type, ast::CRATE_NODE_ID,
446+
session.add_lint(lint::UnknownCrateType, ast::CRATE_NODE_ID,
447447
a.span, ~"invalid `crate_type` value");
448448
None
449449
}
450450
_ => {
451-
session.add_lint(lint::unknown_crate_type, ast::CRATE_NODE_ID,
451+
session.add_lint(lint::UnknownCrateType, ast::CRATE_NODE_ID,
452452
a.span, ~"`crate_type` requires a value");
453453
None
454454
}

src/librustc/front/feature_gate.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ pub fn check_crate(sess: Session, crate: &ast::Crate) {
233233
directive not necessary");
234234
}
235235
None => {
236-
sess.add_lint(lint::unknown_features,
236+
sess.add_lint(lint::UnknownFeatures,
237237
ast::CRATE_NODE_ID,
238238
mi.span,
239239
~"unknown feature");

src/librustc/middle/dead.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use middle::ty;
1616
use middle::typeck;
1717
use middle::privacy;
18-
use middle::lint::dead_code;
18+
use middle::lint::DeadCode;
1919

2020
use std::hashmap::HashSet;
2121
use syntax::ast;
@@ -328,7 +328,7 @@ impl DeadVisitor {
328328

329329
fn warn_dead_code(&mut self, id: ast::NodeId,
330330
span: codemap::Span, ident: &ast::Ident) {
331-
self.tcx.sess.add_lint(dead_code, id, span,
331+
self.tcx.sess.add_lint(DeadCode, id, span,
332332
format!("code is never used: `{}`",
333333
token::ident_to_str(ident)));
334334
}

0 commit comments

Comments
 (0)