Auto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichton
It's in order to make the code more homogeneous.
This commit is contained in:
commit
7ebf9bc5c2
67 changed files with 295 additions and 300 deletions
|
|
@ -37,9 +37,9 @@ impl LintPass for Pass {
|
|||
|
||||
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
|
||||
let name = token::get_ident(it.ident);
|
||||
if name.get() == "lintme" {
|
||||
if &name[] == "lintme" {
|
||||
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
|
||||
} else if name.get() == "pleaselintme" {
|
||||
} else if &name[] == "pleaselintme" {
|
||||
cx.span_lint(PLEASE_LINT, it.span, "item is named 'pleaselintme'");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ impl LintPass for Pass {
|
|||
|
||||
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
|
||||
let name = token::get_ident(it.ident);
|
||||
if name.get() == "lintme" {
|
||||
if &name[] == "lintme" {
|
||||
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// no-prefer-dynamic
|
||||
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue