Skip to content

Commit

Permalink
Trivial fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
p-avital committed Jun 23, 2024
1 parent 3569122 commit b4716a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions stabby-macros/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ pub fn stabby(
report.tyty = quote!(#st::report::TyTy::Enum(#st::str::Str::new(#reprstr)));
let report_bounds = report.bounds();
let size_bug = format!(
"{ident}'s size was mis-evaluated by stabby, this is a definitely a bug and may cause UB, please file an issue"
"{ident}'s size was mis-evaluated by stabby, this is definitely a bug and may cause UB, please file an issue"
);
let align_bug = format!(
"{ident}'s align was mis-evaluated by stabby, this is a definitely a bug and may cause UB, please file an issue"
"{ident}'s align was mis-evaluated by stabby, this is definitely a bug and may cause UB, please file an issue"
);
quote! {
#(#new_attrs)*
Expand Down Expand Up @@ -335,7 +335,7 @@ impl Variants {
}
}

pub fn repr_stabby(
pub(crate) fn repr_stabby(
attrs: &Vec<Attribute>,
vis: &Visibility,
ident: &Ident,
Expand Down Expand Up @@ -487,10 +487,10 @@ pub fn repr_stabby(
})
});
let size_bug = format!(
"{ident}'s size was mis-evaluated by stabby, this is a definitely a bug and may cause UB, please fill an issue"
"{ident}'s size was mis-evaluated by stabby, this is definitely a bug and may cause UB, please fill an issue"
);
let align_bug = format!(
"{ident}'s align was mis-evaluated by stabby, this is a definitely a bug and may cause UB, please fill an issue"
"{ident}'s align was mis-evaluated by stabby, this is definitely a bug and may cause UB, please fill an issue"
);
quote! {
const _: () = {
Expand Down
4 changes: 2 additions & 2 deletions stabby-macros/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ pub fn stabby(
let layout = layout.map_or_else(|| quote!(()), |layout| quote!(#st::Struct<#layout>));
let opt_id = quote::format_ident!("OptimizedLayoutFor{ident}");
let size_bug = format!(
"{ident}'s size was mis-evaluated by stabby, this is a definitely a bug and may cause UB, please file an issue"
"{ident}'s size was mis-evaluated by stabby, this is definitely a bug and may cause UB, please file an issue"
);
let align_bug = format!(
"{ident}'s align was mis-evaluated by stabby, this is a definitely a bug and may cause UB, please file an issue"
"{ident}'s align was mis-evaluated by stabby, this is definitely a bug and may cause UB, please file an issue"
);
let assertion = opt.then(|| {
let sub_optimal_message = format!(
Expand Down

0 comments on commit b4716a7

Please sign in to comment.