]> git.lizzy.rs Git - rust.git/blobdiff - crates/hir_def/src/path.rs
parameters.split_last()
[rust.git] / crates / hir_def / src / path.rs
index fc81b88db3f1c58639be629248fa3be859b1f102..a6141174c8379b3c458bbde9b1205e1e87b64f74 100644 (file)
@@ -92,7 +92,9 @@ pub fn from_known_path(
         path: ModPath,
         generic_args: impl Into<Box<[Option<Interned<GenericArgs>>]>>,
     ) -> Path {
-        Path { type_anchor: None, mod_path: Interned::new(path), generic_args: generic_args.into() }
+        let generic_args = generic_args.into();
+        assert_eq!(path.len(), generic_args.len());
+        Path { type_anchor: None, mod_path: Interned::new(path), generic_args }
     }
 
     pub fn kind(&self) -> &PathKind {