Skip to content

Commit a239663

Browse files
committed
rustc: rename the lint level enum for style.
CamelCase all the way!
1 parent 4605232 commit a239663

File tree

4 files changed

+72
-72
lines changed

4 files changed

+72
-72
lines changed

src/librustc/driver/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub struct Options {
7070
pub gc: bool,
7171
pub optimize: OptLevel,
7272
pub debuginfo: DebugInfoLevel,
73-
pub lint_opts: Vec<(lint::Lint, lint::level)> ,
73+
pub lint_opts: Vec<(lint::Lint, lint::Level)> ,
7474
pub output_types: Vec<back::link::OutputType> ,
7575
// This was mutable for rustpkg, which updates search paths based on the
7676
// parsed code. It remains mutable in case its replacements wants to use
@@ -580,8 +580,8 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
580580
let no_trans = matches.opt_present("no-trans");
581581
let no_analysis = matches.opt_present("no-analysis");
582582

583-
let lint_levels = [lint::allow, lint::warn,
584-
lint::deny, lint::forbid];
583+
let lint_levels = [lint::Allow, lint::Warn,
584+
lint::Deny, lint::Forbid];
585585
let mut lint_opts = Vec::new();
586586
let lint_dict = lint::get_lint_dict();
587587
for level in lint_levels.iter() {

src/librustc/middle/dead.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// closely. The idea is that all reachable symbols are live, codes called
1313
// from live codes are live, and everything else is dead.
1414

15-
use middle::lint::{allow, contains_lint, DeadCode};
15+
use middle::lint::{Allow, contains_lint, DeadCode};
1616
use middle::privacy;
1717
use middle::ty;
1818
use middle::typeck;
@@ -195,7 +195,7 @@ impl<'a> Visitor<()> for MarkSymbolVisitor<'a> {
195195
}
196196

197197
fn has_allow_dead_code_or_lang_attr(attrs: &[ast::Attribute]) -> bool {
198-
contains_lint(attrs, allow, DEAD_CODE_LINT_STR)
198+
contains_lint(attrs, Allow, DEAD_CODE_LINT_STR)
199199
|| attr::contains_name(attrs.as_slice(), "lang")
200200
}
201201

0 commit comments

Comments
 (0)