Blaming Rust version without checking dependency name
5. You want to use two different versions of the same crate log in your project: version 0.4 for your code and version 0.3 for a dependency. How can Cargo handle this situation?
hard
A. Cargo will fail to build due to version conflict
B. Cargo allows multiple versions of the same crate to coexist in the dependency tree
C. You must manually merge the versions into one in Cargo.toml
D. Cargo ignores the older version and uses only the newest
Solution
Step 1: Understand Cargo's version handling
Cargo supports multiple versions of the same crate in the dependency tree to avoid conflicts.
Step 2: Apply to example
Your code can use log 0.4 while a dependency uses log 0.3; Cargo compiles both separately.
Final Answer:
Cargo allows multiple versions of the same crate to coexist in the dependency tree -> Option B