1 extern crate example_name_conflict; 2 3 // This crate depends on a pair of dependencies (transitively) that have the same name. This should 4 // work OK. 5 example_conflicting_symbol() -> String6pub fn example_conflicting_symbol() -> String { 7 format!( 8 "[from main lib] -> {}", 9 example_name_conflict::example_conflicting_symbol() 10 ) 11 } 12 13 #[cfg(test)] 14 mod tests { 15 #[test] symbols_all_resolve_correctly()16 fn symbols_all_resolve_correctly() { 17 assert_eq!( 18 ::example_conflicting_symbol(), 19 "[from main lib] -> [from first_crate] -> [from second_crate]".to_owned() 20 ); 21 } 22 } 23