rust/tests/ui/issues/issue-3389.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
574 B
Rust
Raw Normal View History

// run-pass
#![allow(dead_code)]
#![allow(non_camel_case_types)]
2012-12-07 02:32:13 +00:00
struct trie_node {
content: Vec<String> ,
children: Vec<trie_node> ,
2012-12-07 02:32:13 +00:00
}
fn print_str_vector(vector: Vec<String> ) {
2015-01-31 17:20:46 +00:00
for string in &vector {
println!("{}", *string);
2012-12-07 02:32:13 +00:00
}
}
pub fn main() {
let mut node: trie_node = trie_node {
content: Vec::new(),
children: Vec::new()
2012-12-07 02:32:13 +00:00
};
let v = vec!["123".to_string(), "abc".to_string()];
node.content = vec!["123".to_string(), "abc".to_string()];
2012-12-07 02:32:13 +00:00
print_str_vector(v);
2013-03-15 22:27:15 +00:00
print_str_vector(node.content.clone());
2012-12-07 02:32:13 +00:00
}