Fix autocompletion in html macro for rust-analyzer (#3829)

This commit is contained in:
Moritz Hedtke 2025-03-25 19:57:28 +01:00 committed by GitHub
parent cd32e17b1f
commit e5b2cf3611
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ use quote::{quote, quote_spanned, ToTokens};
use syn::buffer::Cursor; use syn::buffer::Cursor;
use syn::parse::{Parse, ParseStream, Result}; use syn::parse::{Parse, ParseStream, Result};
use syn::spanned::Spanned; use syn::spanned::Spanned;
use syn::{Expr, Lit}; use syn::Lit;
use super::ToNodeIterator; use super::ToNodeIterator;
use crate::stringify::Stringify; use crate::stringify::Stringify;
@ -11,7 +11,7 @@ use crate::PeekValue;
pub enum HtmlNode { pub enum HtmlNode {
Literal(Box<Lit>), Literal(Box<Lit>),
Expression(Box<Expr>), Expression(Box<TokenStream>),
} }
impl Parse for HtmlNode { impl Parse for HtmlNode {

View File

@ -247,7 +247,7 @@ impl HtmlChildrenTree {
.iter() .iter()
.map(|child| quote_spanned! {child.span()=> ::std::convert::Into::into(#child) }); .map(|child| quote_spanned! {child.span()=> ::std::convert::Into::into(#child) });
return quote! { return quote! {
::std::vec![#(#children_into),*] [#(#children_into),*].to_vec()
}; };
} }