docs(ast): simplify JSXAttribute value description (#26974)

This commit is contained in:
camc314 committed 2026-09-23 15:50:52 +00:00
1 parent fda7fbbb43
commit 8cb05e3ecc
2 files changed
+5 -6

No files matched your search

+2 -3
View File
@@ -371,9 +371,8 @@ pub struct JSXAttribute<'a> {
pub span: Span,
/// The name of the attribute. This is a prop in React-like applications.
pub name: JSXAttributeName<'a>,
/// The value of the attribute. This can be a string literal, an expression,
/// or an element. Will be [`None`] for boolean-like attributes (e.g.
/// `<button disabled />`).
/// The value of the attribute.
/// [`None`] for boolean-like attributes (e.g. `<button disabled />`).
pub value: Option<JSXAttributeValue<'a>>,
}
+3 -3
View File
@@ -20307,7 +20307,7 @@ impl<'a> JSXAttributeItem<'a> {
/// ## Parameters
/// * `span`: Node location in source code.
/// * `name`: The name of the attribute. This is a prop in React-like applications.
/// * `value`: The value of the attribute. This can be a string literal, an expression,
/// * `value`: The value of the attribute.
#[inline]
pub fn new_attribute(
span: Span,
@@ -20344,7 +20344,7 @@ impl<'a> JSXAttribute<'a> {
/// ## Parameters
/// * `span`: Node location in source code.
/// * `name`: The name of the attribute. This is a prop in React-like applications.
/// * `value`: The value of the attribute. This can be a string literal, an expression,
/// * `value`: The value of the attribute.
#[inline]
pub fn new(
span: Span,
@@ -20364,7 +20364,7 @@ impl<'a> JSXAttribute<'a> {
/// ## Parameters
/// * `span`: Node location in source code.
/// * `name`: The name of the attribute. This is a prop in React-like applications.
/// * `value`: The value of the attribute. This can be a string literal, an expression,
/// * `value`: The value of the attribute.
#[inline]
pub fn boxed(
span: Span,