Skip to content

Commit

Permalink
Span::call_site() -> Span::mixed_site()
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Apr 6, 2022
1 parent adadc07 commit 6e76bf6
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/yew-macro/src/derive_props/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl ToTokens for PropsBuilder<'_> {

// Each builder step implements the `BuilderStep` trait and `step_generics` is used to
// enforce that.
let step_generic_param = Ident::new("YEW_PROPS_BUILDER_STEP", Span::call_site());
let step_generic_param = Ident::new("YEW_PROPS_BUILDER_STEP", Span::mixed_site());
let step_generics =
with_param_bounds(generics, step_generic_param.clone(), (*step_trait).clone());

Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/derive_props/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl PropField {
Ok(PropAttr::Option)
} else {
let ident = named_field.ident.as_ref().unwrap();
let wrapped_name = format_ident!("{}_wrapper", ident, span = Span::call_site());
let wrapped_name = format_ident!("{}_wrapper", ident, span = Span::mixed_site());
Ok(PropAttr::Required { wrapped_name })
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/derive_props/generics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn new_param_bounds(param_ident: Ident, param_bounds: Ident) -> GenericParam {
GenericParam::Type(TypeParam {
attrs: Vec::new(),
ident: param_ident,
colon_token: Some(Token![:](Span::call_site())),
colon_token: Some(Token![:](Span::mixed_site())),
bounds: param_bounds,
eq_token: None,
default: None,
Expand Down
6 changes: 3 additions & 3 deletions packages/yew-macro/src/derive_props/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl ToTokens for DerivePropsInput {
} = self;

// The wrapper is a new struct which wraps required props in `Option`
let wrapper_name = format_ident!("{}Wrapper", props_name, span = Span::call_site());
let wrapper_name = format_ident!("{}Wrapper", props_name, span = Span::mixed_site());
let wrapper = PropsWrapper::new(
&wrapper_name,
generics,
Expand All @@ -90,8 +90,8 @@ impl ToTokens for DerivePropsInput {
tokens.extend(wrapper.into_token_stream());

// The builder will only build if all required props have been set
let builder_name = format_ident!("{}Builder", props_name, span = Span::call_site());
let builder_step = format_ident!("{}BuilderStep", props_name, span = Span::call_site());
let builder_name = format_ident!("{}Builder", props_name, span = Span::mixed_site());
let builder_step = format_ident!("{}BuilderStep", props_name, span = Span::mixed_site());
let builder = PropsBuilder::new(
&builder_name,
&builder_step,
Expand Down
8 changes: 4 additions & 4 deletions packages/yew-macro/src/html_tree/html_component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,17 @@ impl HtmlComponent {
if punct.as_char() == '>' {
break;
} else if punct.as_char() == ',' {
args.push_punct(Token![,](Span::call_site()))
args.push_punct(Token![,](Span::mixed_site()))
}
}
}

Some((
PathArguments::AngleBracketed(AngleBracketedGenericArguments {
colon2_token: None,
lt_token: Token![<](Span::call_site()),
lt_token: Token![<](Span::mixed_site()),
args,
gt_token: Token![>](Span::call_site()),
gt_token: Token![>](Span::mixed_site()),
}),
cursor,
))
Expand All @@ -191,7 +191,7 @@ impl HtmlComponent {
let mut post_colons_cursor = cursor;
if let Some(c) = Self::double_colon(post_colons_cursor) {
if colons_optional {
leading_colon = Some(Token![::](Span::call_site()));
leading_colon = Some(Token![::](Span::mixed_site()));
}
post_colons_cursor = c;
} else if !colons_optional {
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/html_tree/html_dashed_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl Peek<'_, Self> for HtmlDashedName {
if punct.as_char() == '-' {
let (ident, i_cursor) = p_cursor.ident()?;
cursor = i_cursor;
extended.push((Token![-](Span::call_site()), ident));
extended.push((Token![-](Span::mixed_site()), ident));
continue;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/html_tree/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ impl HtmlChildrenTree {
};
}

let vec_ident = Ident::new("__yew_v", Span::call_site());
let vec_ident = Ident::new("__yew_v", Span::mixed_site());
let add_children_streams = children.iter().map(|child| {
if let Some(node_iterator_stream) = child.to_node_iterator_stream() {
quote! {
Expand Down

0 comments on commit 6e76bf6

Please sign in to comment.