summaryrefslogtreecommitdiff
path: root/src/syntax/expr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/expr.rs')
-rw-r--r--src/syntax/expr.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/syntax/expr.rs b/src/syntax/expr.rs
index a27bdb62..a1b3fd62 100644
--- a/src/syntax/expr.rs
+++ b/src/syntax/expr.rs
@@ -93,9 +93,6 @@ impl Debug for Expr {
/// A unicode identifier.
///
-/// The identifier must be valid! This is checked in [`Ident::new`] or
-/// [`is_identifier`].
-///
/// # Example
/// ```typst
/// [func: "hi", ident]
@@ -105,7 +102,8 @@ impl Debug for Expr {
pub struct Ident(pub String);
impl Ident {
- /// Create a new identifier from a string checking that it is valid.
+ /// Create a new identifier from a string checking that it is a valid
+ /// unicode identifier.
pub fn new<S>(ident: S) -> Option<Ident> where S: AsRef<str> + Into<String> {
if is_identifier(ident.as_ref()) {
Some(Ident(ident.into()))