We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5248b20 commit 2fa3598Copy full SHA for 2fa3598
compiler/rustc_incremental/src/assert_module_sources.rs
@@ -111,10 +111,12 @@ impl AssertModuleSource<'tcx> {
111
(&user_path[..], None)
112
};
113
114
- let mut cgu_path_components = user_path.split('-').collect::<Vec<_>>();
+ let mut iter = user_path.split('-');
115
116
// Remove the crate name
117
- assert_eq!(cgu_path_components.remove(0), crate_name);
+ assert_eq!(iter.next().unwrap(), crate_name);
118
+
119
+ let cgu_path_components = iter.collect::<Vec<_>>();
120
121
let cgu_name_builder = &mut CodegenUnitNameBuilder::new(self.tcx);
122
let cgu_name =
0 commit comments