Skip to content

Commit 44de568

Browse files
committed
fix tests
1 parent e9c264d commit 44de568

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

clippy_lints/src/rc_clone_in_vec_init.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fn emit_lint(cx: &LateContext<'_>, symbol: Symbol, macro_call: &MacroCall) {
6767
diag.help(format!(
6868
"if this is intentional, consider extracting the `{symbol_name}` initialization to a variable"
6969
));
70-
diag.help("or if not, initilaize each element individually");
70+
diag.help("or if not, initialize each element individually");
7171
},
7272
);
7373
}

tests/ui/rc_clone_in_vec_init/arc.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ LL | let v = vec![Arc::new("x".to_string()); 2];
77
= note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings`
88
= note: each element will point to the same `Arc` instance
99
= help: if this is intentional, consider extracting the `Arc` initialization to a variable
10-
= help: or if not, initilaize each element individually
10+
= help: or if not, initialize each element individually
1111

1212
error: calling `Arc::new` in `vec![elem; len]`
1313
--> $DIR/arc.rs:11:13
@@ -24,7 +24,7 @@ LL | | ];
2424
|
2525
= note: each element will point to the same `Arc` instance
2626
= help: if this is intentional, consider extracting the `Arc` initialization to a variable
27-
= help: or if not, initilaize each element individually
27+
= help: or if not, initialize each element individually
2828

2929
error: aborting due to 2 previous errors
3030

tests/ui/rc_clone_in_vec_init/rc.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
error: calling `Rc::new` in `vec![elem; len]`
2-
--> $DIR/rc.rs:9:13
2+
--> $DIR/rc.rs:8:13
33
|
44
LL | let v = vec![Rc::new("x".to_string()); 2];
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings`
88
= note: each element will point to the same `Rc` instance
99
= help: if this is intentional, consider extracting the `Rc` initialization to a variable
10-
= help: or if not, initilaize each element individually
10+
= help: or if not, initialize each element individually
1111

1212
error: calling `Rc::new` in `vec![elem; len]`
13-
--> $DIR/rc.rs:13:13
13+
--> $DIR/rc.rs:12:13
1414
|
1515
LL | let v = vec![
1616
| _____________^
@@ -24,7 +24,7 @@ LL | | ];
2424
|
2525
= note: each element will point to the same `Rc` instance
2626
= help: if this is intentional, consider extracting the `Rc` initialization to a variable
27-
= help: or if not, initilaize each element individually
27+
= help: or if not, initialize each element individually
2828

2929
error: aborting due to 2 previous errors
3030

0 commit comments

Comments
 (0)