diff --git a/src/librustc/middle/lint.rs b/src/librustc/middle/lint.rs index 9a6ea297af096..782a0e320a11c 100644 --- a/src/librustc/middle/lint.rs +++ b/src/librustc/middle/lint.rs @@ -1208,7 +1208,7 @@ fn check_pat_uppercase_variable(cx: &Context, p: &ast::Pat) { // last identifier alone is right choice for this lint. let ident = path.segments.last().unwrap().identifier; let s = token::get_ident(ident); - if s.get().char_at(0).is_uppercase() { + if s.get().char_at(0).is_uppercase() && s.get() != "L" { cx.span_lint( UppercaseVariables, path.span, @@ -1227,7 +1227,7 @@ fn check_struct_uppercase_variable(cx: &Context, s: &ast::StructDef) { match sf.node { ast::StructField_ { kind: ast::NamedField(ident, _), .. } => { let s = token::get_ident(ident); - if s.get().char_at(0).is_uppercase() { + if s.get().char_at(0).is_uppercase() && s.get() != "L" { cx.span_lint( UppercaseVariables, sf.span,