Do not suggest [T; n] instead of vec![T; n] if T is not Copy
This commit is contained in:
parent
29bdc8b2bc
commit
4cea5a8f33
3 changed files with 20 additions and 11 deletions
|
|
@ -210,3 +210,10 @@ fn issue11861() {
|
|||
// should not lint
|
||||
m!(vec![1]);
|
||||
}
|
||||
|
||||
fn issue_11958() {
|
||||
fn f(_s: &[String]) {}
|
||||
|
||||
// should not lint, `String` is not `Copy`
|
||||
f(&vec!["test".to_owned(); 2]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,3 +210,10 @@ fn issue11861() {
|
|||
// should not lint
|
||||
m!(vec![1]);
|
||||
}
|
||||
|
||||
fn issue_11958() {
|
||||
fn f(_s: &[String]) {}
|
||||
|
||||
// should not lint, `String` is not `Copy`
|
||||
f(&vec!["test".to_owned(); 2]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue