fixed and extended tests
This commit is contained in:
parent
5d5e50d67e
commit
a1ac3125de
|
@ -308,11 +308,18 @@ fn starts_with() {
|
||||||
fn use_extend_from_slice() {
|
fn use_extend_from_slice() {
|
||||||
let mut v : Vec<&'static str> = vec![];
|
let mut v : Vec<&'static str> = vec![];
|
||||||
v.extend(&["Hello", "World"]); //~ERROR use of `extend`
|
v.extend(&["Hello", "World"]); //~ERROR use of `extend`
|
||||||
v.extend(&vec!["Some", "more"]); //~ERROR use of `extend`
|
v.extend(&vec!["Some", "more"]);
|
||||||
|
//~^ERROR use of `extend`
|
||||||
|
//~| HELP try this
|
||||||
|
//~| SUGGESTION v.extend_from_slice(&vec!["Some", "more"]);
|
||||||
|
|
||||||
v.extend(vec!["And", "even", "more"].iter()); //~ERROR use of `extend`
|
v.extend(vec!["And", "even", "more"].iter()); //~ERROR use of `extend`
|
||||||
let o : Option<&'static str> = None;
|
let o : Option<&'static str> = None;
|
||||||
v.extend(o);
|
v.extend(o);
|
||||||
v.extend(Some("Bye"));
|
v.extend(Some("Bye"));
|
||||||
v.extend(vec!["Not", "like", "this"]);
|
v.extend(vec!["Not", "like", "this"]);
|
||||||
v.extend(["Nor", "this"].iter());
|
v.extend(["But", "this"].iter());
|
||||||
|
//~^ERROR use of `extend
|
||||||
|
//~| HELP try this
|
||||||
|
//~| SUGGESTION v.extend_from_slice(&["But", "this"]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue