Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Adjust tests for Clippy warnings
Browse files Browse the repository at this point in the history
Identifiers such as Bar are warned against as per blacklisted_names
lint. With scoped lints it'd be good to do
`#[allow(clippy::blacklisted_names)] but this is currently unstable so
as a quick fix we use another placeholder name.
  • Loading branch information
Xanewok committed Sep 3, 2018
1 parent 397561f commit 311fbca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ fn test_find_all_refs() {
42,
ReferenceParams {
text_document: TextDocumentIdentifier::new(url),
position: env.cache.mk_ls_position(src(&source_file_path, 10, "Bar")),
position: env.cache.mk_ls_position(src(&source_file_path, 10, "Xyz")),
context: ReferenceContext {
include_declaration: true,
},
Expand Down
10 changes: 5 additions & 5 deletions test_data/common/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
struct Bar {
struct Xyz {
x: u64,
}

#[test]
pub fn test_fn() {
let bar = Bar { x: 4 };
println!("bar: {}", bar.x);
let xyz = Xyz { x: 4 };
println!("bar: {}", xyz.x);
}

pub fn main() {
let world = "world";
println!("Hello, {}!", world);

let bar2 = Bar { x: 5 };
println!("bar2: {}", bar2.x);
let xyz2 = Xyz { x: 5 };
println!("xyz2: {}", xyz2.x);
}

0 comments on commit 311fbca

Please sign in to comment.