Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into fix-rust-analyzer-auto-imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Jul 4, 2024
2 parents 6d4f192 + 55b9bb1 commit 9982ae2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
([#300](https://github.com/JelteF/derive_more/pull/300))
- `#[inline]` attributes to `IsVariant` and `Debug` implementations.
([#334](https://github.com/JelteF/derive_more/pull/334)
- Add `#[track_caller]` to `Add`, `Mul`, `AddAssign` and `MulAssign` derives
([#378](https://github.com/JelteF/derive_more/pull/378)


### Changed

Expand Down
1 change: 1 addition & 0 deletions impl/src/add_assign_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub fn expand(input: &DeriveInput, trait_name: &str) -> TokenStream {
#[automatically_derived]
impl #impl_generics derive_more::#trait_ident for #input_type #ty_generics #where_clause {
#[inline]
#[track_caller]
fn #method_ident(&mut self, rhs: #input_type #ty_generics) {
#( #exprs; )*
}
Expand Down
1 change: 1 addition & 0 deletions impl/src/add_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pub fn expand(input: &DeriveInput, trait_name: &str) -> TokenStream {
type Output = #output_type;

#[inline]
#[track_caller]
fn #method_ident(self, rhs: #input_type #ty_generics) -> #output_type {
#block
}
Expand Down
1 change: 1 addition & 0 deletions impl/src/mul_assign_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
#[automatically_derived]
impl #impl_generics #trait_path<#scalar_ident> for #input_type #ty_generics #where_clause {
#[inline]
#[track_caller]
fn #method_ident(&mut self, rhs: #scalar_ident) {
#( #exprs; )*
}
Expand Down
1 change: 1 addition & 0 deletions impl/src/mul_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
type Output = #input_type #ty_generics;

#[inline]
#[track_caller]
fn #method_ident(self, rhs: #scalar_ident) -> #input_type #ty_generics {
#body
}
Expand Down

0 comments on commit 9982ae2

Please sign in to comment.