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

Commit 311fbca

Browse files
committed
Adjust tests for Clippy warnings
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.
1 parent 397561f commit 311fbca

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/test/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ fn test_find_all_refs() {
456456
42,
457457
ReferenceParams {
458458
text_document: TextDocumentIdentifier::new(url),
459-
position: env.cache.mk_ls_position(src(&source_file_path, 10, "Bar")),
459+
position: env.cache.mk_ls_position(src(&source_file_path, 10, "Xyz")),
460460
context: ReferenceContext {
461461
include_declaration: true,
462462
},

test_data/common/src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
struct Bar {
10+
struct Xyz {
1111
x: u64,
1212
}
1313

1414
#[test]
1515
pub fn test_fn() {
16-
let bar = Bar { x: 4 };
17-
println!("bar: {}", bar.x);
16+
let xyz = Xyz { x: 4 };
17+
println!("bar: {}", xyz.x);
1818
}
1919

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

24-
let bar2 = Bar { x: 5 };
25-
println!("bar2: {}", bar2.x);
24+
let xyz2 = Xyz { x: 5 };
25+
println!("xyz2: {}", xyz2.x);
2626
}

0 commit comments

Comments
 (0)