Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/path.rs')
| -rw-r--r-- | crates/hir_def/src/path.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/hir_def/src/path.rs b/crates/hir_def/src/path.rs index fc81b88db3..a6141174c8 100644 --- a/crates/hir_def/src/path.rs +++ b/crates/hir_def/src/path.rs @@ -92,7 +92,9 @@ impl 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 { |