Skip to content

Commit 104d1c8

Browse files
committed
Add docs to into_implicit_named_generic
1 parent df4487f commit 104d1c8

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

  • compiler/noirc_frontend/src/hir_def

compiler/noirc_frontend/src/hir_def/types.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pub struct NamedGeneric {
168168
impl NamedGeneric {
169169
/// Create a [NamedGeneric].
170170
///
171-
/// If an object and trait pair are given in `as_trait`, this is assumed
171+
/// If an object and trait name pair is given in `as_trait`, this is assumed
172172
/// to be an associated type, and its name will be formatted as `"<{object} as {trait}>::{name}"`
173173
/// to disambiguate from other generics in scope.
174174
pub fn new(
@@ -1067,6 +1067,11 @@ impl TypeVariable {
10671067
}
10681068
}
10691069

1070+
/// Create a [Type::NamedGeneric].
1071+
///
1072+
/// If an object and trait name pair is given in `as_trait`, this is assumed
1073+
/// to be an associated type, and its name will be formatted as `"<{object} as {trait}>::{name}"`
1074+
/// to disambiguate from other generics in scope.
10701075
pub(crate) fn into_named_generic(
10711076
self,
10721077
name: &Rc<String>,
@@ -1075,6 +1080,11 @@ impl TypeVariable {
10751080
Type::NamedGeneric(NamedGeneric::new(self, false, name, as_trait))
10761081
}
10771082

1083+
/// Create a implicit [Type::NamedGeneric].
1084+
///
1085+
/// If an object and trait name pair is given in `as_trait`, this is assumed
1086+
/// to be an associated type, and its name will be formatted as `"<{object} as {trait}>::{name}"`
1087+
/// to disambiguate from other generics in scope.
10781088
pub(crate) fn into_implicit_named_generic(
10791089
self,
10801090
name: &Rc<String>,

0 commit comments

Comments
 (0)