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-06 20:32:13 -06:00
struct trie_node {
content: Vec<String> ,
children: Vec<trie_node> ,
2012-12-06 20:32:13 -06:00
}
fn print_str_vector(vector: Vec<String> ) {
2015-01-31 11:20:46 -06:00
for string in &vector {
println!("{}", *string);
2012-12-06 20:32:13 -06:00
}
}
pub fn main() {
let mut node: trie_node = trie_node {
content: Vec::new(),
children: Vec::new()
2012-12-06 20:32:13 -06:00
};
let v = vec!["123".to_string(), "abc".to_string()];
node.content = vec!["123".to_string(), "abc".to_string()];
2012-12-06 20:32:13 -06:00
print_str_vector(v);
2013-03-15 17:27:15 -05:00
print_str_vector(node.content.clone());
2012-12-06 20:32:13 -06:00
}