commit_hash stringlengths 40 40 | author stringlengths 1 57 | date timestamp[s]date 2010-07-26 04:45:09 2026-04-14 18:21:10 | message stringlengths 8 1.39M | diff stringlengths 68 51.2k | files_changed int64 1 136 | insertions int64 0 2.35k | deletions int64 0 1.9k |
|---|---|---|---|---|---|---|---|
c165945f217c9238c61c790eed73622975394fc5 | Jelte Fennema-Nio | 2024-07-04T09:48:49 | Work around bug in rust-analyzer to make auto-imports work nicely (#376)
Resolves #351
## Synopsis
Rust-analyzer doesn't ignore `#[doc(hidden)]` exports when they use a
glob
pattern, only when they explicitely re-export.
## Solution
This adds more level of indirection and one more glob pattern so th... | diff --git a/src/lib.rs b/src/lib.rs
index 879de30..34cd86e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -137,169 +137,283 @@ macro_rules! re_export_traits((
#[cfg(all(feature = $feature, any(not(docsrs), ci)))]
#[doc(hidden)]
- pub use crate::$new_module_name::*;
+ pub use crate::all_t... | 1 | 209 | 95 |
99006d3f773d1f954e99d21b9725fdcef98e966a | Jelte Fennema-Nio | 2024-06-15T17:24:13 | Include example published package (#369)
I got a warning about this when trying to release 0.99.18
Also fix various clippy warnings. | diff --git a/Cargo.toml b/Cargo.toml
index 5d2d4f6..2eeb843 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,6 +20,7 @@ include = [
"README.md",
"CHANGELOG.md",
"tests/**/*.rs", # debian packaging wants this
+ "examples/**/*.rs"
]
[workspace]
@@ -43,6 +44,9 @@ github = { repository = "JelteF/derive... | 4 | 27 | 38 |
2a001d6d1179921b1d4d31ff66133f45668344d0 | Kai Ren | 2024-03-15T11:01:56 | Upgrade `syn` crate to 2.0.45 version (#341, #301)
Upgrade minimal version of `syn` up to 2.0.45 version to fix the extended
enum syntax, and cover the use case with tests for future regressions. | diff --git a/impl/Cargo.toml b/impl/Cargo.toml
index a52ab74..16fdb9a 100644
--- a/impl/Cargo.toml
+++ b/impl/Cargo.toml
@@ -25,7 +25,7 @@ proc-macro = true
[dependencies]
proc-macro2 = "1.0"
quote = "1.0"
-syn = "2.0"
+syn = "2.0.45"
convert_case = { version = "0.6", optional = true }
unicode-xid = { version = "0... | 2 | 19 | 1 |
7aaa55c1d4f746c019aa50efa371d7c4c930c56c | Jelte Fennema-Nio | 2024-01-18T15:24:31 | Add "rust-patterns" as crate category (#333) | diff --git a/Cargo.toml b/Cargo.toml
index dd244ec..303f735 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@ documentation = "https://docs.rs/derive_more"
readme = "README.md"
keywords = ["derive", "Add", "From", "Display", "IntoIterator"]
-categories = ["development-tools", "development-tools::procedural... | 1 | 1 | 1 |
50e678f0a0c8c0a6b8e10e99eaa692728308a556 | Kai Ren | 2024-01-15T17:36:44 | Make Clippy happy with Rust 1.75 (#332) | diff --git a/impl/src/parsing.rs b/impl/src/parsing.rs
index 9f64bae..a6ea91a 100644
--- a/impl/src/parsing.rs
+++ b/impl/src/parsing.rs
@@ -175,11 +175,7 @@ pub fn seq<const N: usize>(
pub fn alt<const N: usize>(
mut parsers: [&mut dyn FnMut(Cursor<'_>) -> ParsingResult<'_>; N],
) -> impl FnMut(Cursor<'_>) -> P... | 1 | 1 | 5 |
1536f52e49ce03fe0f894bbcdc18f5cb0cd5ee40 | Kai Ren | 2023-12-11T13:01:53 | Fix order sensitivity of `Display` attributes (#320, #319)
## Synopsis
See https://github.com/JelteF/derive_more/issues/319#issue-2004684216:
> The following code used to work in 1.0.0-beta.3:
>
> ```rust
> #[derive(Display)]
> #[display("{name}@{tag}")]
> #[display(bound(Tag: std::fmt::Display))]
> struc... | diff --git a/impl/src/fmt/mod.rs b/impl/src/fmt/mod.rs
index baeaadb..0a3244b 100644
--- a/impl/src/fmt/mod.rs
+++ b/impl/src/fmt/mod.rs
@@ -8,8 +8,6 @@ pub(crate) mod debug;
pub(crate) mod display;
mod parsing;
-use std::mem;
-
use proc_macro2::TokenStream;
use quote::ToTokens;
use syn::{
@@ -391,7 +389,7 @@ im... | 2 | 3 | 5 |
62912dd27c8fbd3a8a469da7abf3103bfb38ead4 | Fritz Rehde | 2023-10-30T21:01:32 | Fixed typos (#310)
I fixed some typos that I found with
[`typos`](https://github.com/crate-ci/typos). | diff --git a/impl/src/try_into.rs b/impl/src/try_into.rs
index f3066c1..2feac58 100644
--- a/impl/src/try_into.rs
+++ b/impl/src/try_into.rs
@@ -46,7 +46,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
let mut tokens = TokenStream::new();
- for ((ref_type, ref original_... | 3 | 7 | 7 |
ea3fbab11cf19088d2f4f5b44596c5009dae42f3 | Kai Ren | 2023-10-30T10:42:07 | Fix merging types in multiple `#[into]` attributes (#309)
## Synopsis
Types are not always merged correctly when multiple `#[into]` attributes
are specified.
```rust
#[derive(Clone, Copy, Debug, Into)]
#[into(ref)]
#[into(owned)]
#[into((Wrapped<i32>, Transmuted<f32>))]
#[into(ref_mut((Wrapped<i32>, Transm... | diff --git a/impl/src/into.rs b/impl/src/into.rs
index 85f75ab..5789932 100644
--- a/impl/src/into.rs
+++ b/impl/src/into.rs
@@ -150,49 +150,48 @@ impl<'a> Expansion<'a> {
(&convs.ref_mut, true, true),
]
.into_iter()
- .filter_map(|(out_tys, ref_, mut_)| {
- out_tys.as_r... | 2 | 155 | 75 |
712186f13e2ea0b2a78e2cd7032e705a3486ac8a | Jelte Fennema | 2023-10-19T12:11:09 | chore: Release | diff --git a/Cargo.toml b/Cargo.toml
index 0dd790b..6dd2b1e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "derive_more"
-version = "1.0.0-beta.5"
+version = "1.0.0-beta.6"
edition = "2021"
rust-version = "1.72.0"
description = "Adds #[derive(x)] macros for more traits"
@@ -26,7 +26,7 @@... | 2 | 3 | 3 |
75bdca0373abf0e4cf983f051a4c92b113f0473e | Jelte Fennema | 2023-10-19T12:07:29 | chore: Release | diff --git a/Cargo.toml b/Cargo.toml
index 02991f7..0dd790b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "derive_more"
-version = "1.0.0-beta.4"
+version = "1.0.0-beta.5"
edition = "2021"
rust-version = "1.72.0"
description = "Adds #[derive(x)] macros for more traits"
@@ -26,7 +26,7 @@... | 2 | 3 | 3 |
79fa7e150d7051bbeac91136e2fc4547b98bb040 | Jelte Fennema | 2023-10-19T12:05:27 | chore: Release | diff --git a/Cargo.toml b/Cargo.toml
index 2cab4bc..02991f7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "derive_more"
-version = "1.0.0-beta.3"
+version = "1.0.0-beta.4"
edition = "2021"
rust-version = "1.72.0"
description = "Adds #[derive(x)] macros for more traits"
@@ -26,7 +26,7 @@... | 2 | 3 | 3 |
4aefdbbd5254af192e8ab329c0f9cc0dd88b76f3 | Kai Ren | 2023-08-14T09:54:20 | Fix `?Sized` type parameters in `Debug` (#289)
## Synopsis
At the moment, `derive_more::Debug` fails to work with `?Sized`
generics:
```rust
#[derive(derive_more::Debug)]
struct UnnamedGenericStructUnsized<T: ?Sized>(T);
```
And generates the following error:
```
error[E0277]: the size for values of type `T... | diff --git a/impl/src/fmt/debug.rs b/impl/src/fmt/debug.rs
index 4c8948f..8cfc5e4 100644
--- a/impl/src/fmt/debug.rs
+++ b/impl/src/fmt/debug.rs
@@ -77,7 +77,7 @@ fn expand_struct(
.ident
.clone()
.map_or_else(|| syn::Member::Unnamed(i.into()), syn::Member::Named);
- quote!... | 2 | 62 | 4 |
a381551f6e5e281db34b2dbe3c7257ea0e9fd352 | Jelte Fennema | 2023-08-07T11:07:12 | chore: Release | diff --git a/Cargo.toml b/Cargo.toml
index 0f2df14..bc73639 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "derive_more"
-version = "1.0.0-beta.2"
+version = "1.0.0-beta.3"
edition = "2021"
rust-version = "1.65.0"
description = "Adds #[derive(x)] macros for more traits"
@@ -26,7 +26,7 @@... | 2 | 3 | 3 |
a45f7b2893f1721f0039158b9bfebfa2cef53c06 | Jelte Fennema | 2023-07-24T16:23:09 | chore: Release | diff --git a/Cargo.toml b/Cargo.toml
index 86aae6d..0f2df14 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "derive_more"
-version = "1.0.0-beta.1"
+version = "1.0.0-beta.2"
edition = "2021"
rust-version = "1.65.0"
description = "Adds #[derive(x)] macros for more traits"
@@ -26,7 +26,7 @@... | 2 | 3 | 3 |
58b54bf4453daa382b71cabf9c2b7f15ea2abe5f | Jelte Fennema | 2023-07-23T18:49:57 | chore: Release | diff --git a/Cargo.toml b/Cargo.toml
index 961de47..4f010ff 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "derive_more"
-version = "0.99.17"
+version = "1.0.0-beta.1"
edition = "2021"
rust-version = "1.65.0"
description = "Adds #[derive(x)] macros for more traits"
@@ -26,7 +26,7 @@ incl... | 2 | 3 | 3 |
bc732a44dc5c232b3f5fb78a50ce5ecd717e2ed9 | Jelte Fennema | 2023-07-05T14:19:46 | Move `fmt` module to `__private` module (#270)
There were a whole bunch of exports and re-exports in the `fmt` module
of things that should not be public API of this crate, but instead are
implementation details. So this limits the amount of things we export
from that module, and it also moves the things we do expo... | diff --git a/impl/src/fmt/debug.rs b/impl/src/fmt/debug.rs
index 86e823e..d1f427e 100644
--- a/impl/src/fmt/debug.rs
+++ b/impl/src/fmt/debug.rs
@@ -268,7 +268,7 @@ impl<'a> Expansion<'a> {
let ident_str = self.ident.to_string();
let out = quote! {
- &mut ::derive_... | 3 | 24 | 18 |
ae5b26325b4c3a7ddc79838c326dd9a3451bc2cd | Jelte Fennema | 2023-07-05T12:57:00 | Run all tests in `no_std` environments if `std` feature is disabled (#269)
This adds the following line to all of our test files.
```rust
#![cfg_attr(not(feature = "std"), no_std)]
```
This way, we test that all our features also work in `no_std` environments.
Co-authored-by: Kai Ren <tyranron@gmail.com> | diff --git a/tests/add.rs b/tests/add.rs
index ac0230f..4c38fda 100644
--- a/tests/add.rs
+++ b/tests/add.rs
@@ -1,3 +1,4 @@
+#![cfg_attr(not(feature = "std"), no_std)]
#![allow(dead_code)]
use derive_more::Add;
diff --git a/tests/add_assign.rs b/tests/add_assign.rs
index 93270d3..4879585 100644
--- a/tests/add_ass... | 24 | 261 | 92 |
2e3ddc22e1181b032a2115b024e823db1fba1d82 | Jelte Fennema | 2023-07-03T22:31:34 | Run cargo fmt, it seems to have some new rules (#272)
CI was failing on all PRs | diff --git a/impl/src/fmt/display.rs b/impl/src/fmt/display.rs
index 0e9983a..7eb893e 100644
--- a/impl/src/fmt/display.rs
+++ b/impl/src/fmt/display.rs
@@ -331,12 +331,16 @@ impl<'a> Expansion<'a> {
/// Generates trait bounds for a struct or an enum variant.
fn generate_bounds(&self) -> Vec<syn::WherePredica... | 1 | 10 | 6 |
01bf8e66d6f69eed863c4c28726ee05dacf6c241 | Mike Hommey | 2023-06-20T21:07:09 | Add missing README.md include in impl/Cargo.toml (#263)
The packaged crate fails to build otherwise (because of the include_str
in lib.rs) | diff --git a/impl/Cargo.toml b/impl/Cargo.toml
index d74210c..f475e68 100644
--- a/impl/Cargo.toml
+++ b/impl/Cargo.toml
@@ -15,6 +15,7 @@ include = [
"src/**/*.rs",
"doc/**/*.md",
"Cargo.toml",
+ "README.md",
"LICENSE",
] | 1 | 1 | 0 |
3ab6fcc0ce82d53508e904103b5e70bb280e2f76 | Jelte Fennema | 2022-10-20T16:29:40 | Include docs in package (#213)
When testing out `cargo release patch` (dry-run by default) I would get
the following errors:
```
error: couldn't read src/../doc/mul_assign.md: No such file or directory (os error 2)
--> src/lib.rs:120:17
|
120 | #[doc = include_str!(concat!("../doc/", $feature,... | diff --git a/Cargo.toml b/Cargo.toml
index 1db63dd..26b9edd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -15,6 +15,7 @@ categories = ["development-tools", "development-tools::procedural-macro-helpers"
include = [
"src/**/*.rs",
+ "doc/**/*.md",
"Cargo.toml",
"LICENSE",
"README.md", | 1 | 1 | 0 |
354fffe32f9d6569e1ce78ae5bbea5c2b779d061 | Kai Ren | 2022-10-05T21:03:58 | Update `convert_case` crate to 0.6 version (#205)
And update `Cargo.lock`. | diff --git a/Cargo.lock b/Cargo.lock
index 2de3708..699a209 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,12 @@ version = 3
[[package]]
name = "convert_case"
-version = "0.4.0"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6245d59a3e82a7fc217c5828a6692dbc6df... | 2 | 51 | 38 |
b4bb310fe989eb9eb87a39b12ceba60446bd8b17 | Jelte Fennema | 2022-10-04T22:10:32 | Update to Rust 2021
Ran `cargo fix --edition` and updated Cargo.toml with the new edition | diff --git a/Cargo.toml b/Cargo.toml
index 63b5aab..b6ec2f4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ authors = ["Jelte Fennema <github-tech@jeltef.nl>"]
license = "MIT"
repository = "https://github.com/JelteF/derive_more"
documentation = "https://jeltef.github.io/derive_more/derive_more/"
-edition = ... | 20 | 37 | 37 |
b74a780418efdfa76d6636f615abb38b85debc34 | Thibeau Vercruyssen | 2022-10-04T22:05:26 | Avoid branch in `Display` `match` statement for empty enums (#196)
This removes a match arm that will never be triggered for non empty
enums.
So now only if their are no arms in the enum will the code for empty
enums be generated.
This changes no functionally and is a bug fix. | diff --git a/src/display.rs b/src/display.rs
index 4a04507..48ee24c 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -68,9 +68,8 @@ pub fn expand(input: &syn::DeriveInput, trait_name: &str) -> Result<TokenStream>
fn fmt(&self, _derive_more_display_formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::... | 2 | 10 | 4 |
4fb92fedc37b62dfddf9ebed4f6a3e8196e5a0aa | Philipp Schuster | 2022-10-04T22:04:40 | display: enum match arms: use 'Self' (to fix incompatibility with `#![deny(clippy::use_self)]` (#192)
This PR makes the generated code compatible with a global setting of
`#![deny(clippy::use_self)]` by using `Self::Variant` instead of
`EnumName::Variant`. | diff --git a/src/display.rs b/src/display.rs
index a6b9708..4a04507 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -503,9 +503,8 @@ impl<'a, 'b> State<'a, 'b> {
} else {
self.infer_fmt(&v.fields, &v.ident)?
};
- ... | 1 | 3 | 5 |
4ae61c5ae586ea8c91ccce73d7e034ad1edb05b4 | Jelte Fennema | 2022-08-20T15:32:46 | Don't derive From for enum variants without fields
Fixes #106 | diff --git a/src/from.rs b/src/from.rs
index 56ff5bc..83b930c 100644
--- a/src/from.rs
+++ b/src/from.rs
@@ -118,20 +118,8 @@ fn enum_from(input: &DeriveInput, state: State) -> TokenStream {
}
for (ref field_types, ref variant_states) in variants_per_types {
for variant_state in variant_states {
- ... | 2 | 1 | 15 |
069a2f763aac1351e9d0cbc93053af6a226e0971 | Jelte Fennema | 2022-02-08T12:11:37 | Allow more dead code in tests | diff --git a/tests/error/derives_for_generic_enums_with_source.rs b/tests/error/derives_for_generic_enums_with_source.rs
index 92f3b3a..8a7d42d 100644
--- a/tests/error/derives_for_generic_enums_with_source.rs
+++ b/tests/error/derives_for_generic_enums_with_source.rs
@@ -1,3 +1,4 @@
+#![allow(dead_code)]
use super::*... | 7 | 7 | 0 |
8d546b7cc2ac1f8e2f5e3cdf038b2166e75408e4 | Jelte Fennema | 2022-02-08T12:02:18 | Fix clippy error | diff --git a/src/utils.rs b/src/utils.rs
index 7226470..a08d1bf 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1189,7 +1189,7 @@ pub fn get_if_type_parameter_used_in_type(
if is_type_parameter_used_in_type(type_parameters, ty) {
match ty {
syn::Type::Reference(syn::TypeReference { elem: ty,... | 1 | 1 | 1 |
9e8582b67dbadf113f75e2f85978653bd35bda20 | Kevin Kuriakose | 2022-02-08T11:59:29 | Add doc comments for Unwrap, IsVariant (#179)
Prevents a linting issue from `missing_docs` on the derived functions
Solves #159
Co-authored-by: Jelte Fennema <github-tech@jeltef.nl> | diff --git a/src/is_variant.rs b/src/is_variant.rs
index 3f19298..f1db240 100644
--- a/src/is_variant.rs
+++ b/src/is_variant.rs
@@ -41,7 +41,11 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
Fields::Unnamed(_) => quote! { (..) },
Fields::Unit => quote! {},... | 2 | 8 | 0 |
8e16178d37530202204ec340b3a99d48dffe8bf9 | Jelte Fennema | 2022-02-08T11:56:14 | Allow dead code in test that complained about it | diff --git a/tests/error/derives_for_enums_with_source.rs b/tests/error/derives_for_enums_with_source.rs
index 2513ab6..9a732fa 100644
--- a/tests/error/derives_for_enums_with_source.rs
+++ b/tests/error/derives_for_enums_with_source.rs
@@ -1,3 +1,4 @@
+#![allow(dead_code)]
use super::*;
derive_display!(TestErr); | 1 | 1 | 0 |
7121889dd22ed661aa5a162d182e1e8e87b4f465 | Mateusz Kowalczyk | 2021-12-21T21:17:12 | Don't use collections::HashSet in derive impls (#178)
This fixes issues like we've already seen in #124.
Fixes #177. | diff --git a/src/mul_assign_like.rs b/src/mul_assign_like.rs
index eaba70d..78a433c 100644
--- a/src/mul_assign_like.rs
+++ b/src/mul_assign_like.rs
@@ -1,9 +1,8 @@
use crate::add_assign_like;
use crate::mul_helpers::generics_and_exprs;
-use crate::utils::{AttrParams, MultiFieldData, RefType, State};
+use crate::util... | 2 | 2 | 4 |
718fbb6757acca99479a8b47b2a2336d07873ad2 | Jelte Fennema | 2021-11-28T13:37:30 | (cargo-release) version 0.99.17 | diff --git a/Cargo.lock b/Cargo.lock
index 723fb18..4bdc3f3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,7 +10,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.17-alpha.0"
+version = "0.99.17"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
52fe1c9034d556da307cbe23f665b6e782cb7f59 | Jelte Fennema | 2021-07-07T23:45:23 | (cargo-release) start next development iteration 0.99.17-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 0bc6114..b4547c5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,7 +10,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.16"
+version = "0.99.17-alpha.0"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
0ad1ef9b34e5c3c86a22d57b469fcdd046ed2e4a | Jelte Fennema | 2021-07-07T23:45:11 | (cargo-release) version 0.99.16 | diff --git a/Cargo.lock b/Cargo.lock
index 744cd87..0bc6114 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,7 +10,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.16-alpha.0"
+version = "0.99.16"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
4dbcc0842034b9175db3dd02db007f17e54a7e1c | Jelte Fennema | 2021-07-07T23:39:06 | (cargo-release) start next development iteration 0.99.16-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 6d2d5ce..744cd87 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -10,7 +10,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.15"
+version = "0.99.16-alpha.0"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
76b4546713de274ab60eeb20fd5b361e148642dd | Jelte Fennema | 2021-07-07T23:38:53 | (cargo-release) version 0.99.15 | diff --git a/Cargo.lock b/Cargo.lock
index edbed53..6d2d5ce 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1,5 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
+version = 3
+
[[package]]
name = "convert_case"
version = "0.4.0"
@@ -8,7 +10,7 @@ checksum = "6245d59a3e8... | 2 | 4 | 2 |
37de245f9be8fa5df62914d069f543eb639413a9 | Jelte Fennema | 2021-07-07T23:33:45 | Only run const generic tests on nightly | diff --git a/tests/generics.rs b/tests/generics.rs
index 829e2c6..17af5f3 100644
--- a/tests/generics.rs
+++ b/tests/generics.rs
@@ -34,6 +34,7 @@ struct WrappedDouble<T: Clone, U: Clone>(T, U);
#[from(forward)]
struct WrappedDouble2<T: Clone, U: Clone>(T, U);
+#[cfg(feature = "nightly")]
#[derive(
From,
... | 1 | 1 | 0 |
249cc055dacde629d7f3a75631c79685f862e717 | Jelte Fennema | 2021-07-07T23:26:34 | Simplify sum_like.rs | diff --git a/src/sum_like.rs b/src/sum_like.rs
index 733af41..f8f8a86 100644
--- a/src/sum_like.rs
+++ b/src/sum_like.rs
@@ -26,23 +26,14 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
let op_path = quote!(::core::ops::#op_trait_ident);
let op_method_ident =
Ident... | 1 | 4 | 13 |
9abccedfec08dde43d03cb9de3de7bf497508121 | Jelte Fennema | 2021-07-07T22:36:11 | Support const generics in more places | diff --git a/src/utils.rs b/src/utils.rs
index cac0897..7226470 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -182,6 +182,27 @@ pub fn add_extra_generic_param(
generics
}
+pub fn add_extra_generic_type_param(
+ generics: &Generics,
+ generic_param: TokenStream,
+) -> Generics {
+ let generic_param: G... | 2 | 39 | 2 |
679fa029a29c4268c42ce12650b5d94028db17df | shugo256 | 2021-06-30T03:33:48 | Fix const param compilation error for Sum-like | diff --git a/src/sum_like.rs b/src/sum_like.rs
index ec7be40..733af41 100644
--- a/src/sum_like.rs
+++ b/src/sum_like.rs
@@ -31,13 +31,18 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
.type_params()
.map(|t| t.ident.clone())
.collect();
+ let const_par... | 1 | 7 | 2 |
745d69de779cc6f1c74fa021db3662b474b6c6dc | shugo256 | 2021-06-30T03:29:41 | Add a testcase which includes a const parameter | diff --git a/tests/generics.rs b/tests/generics.rs
index 8f22cd5..2d1eb18 100644
--- a/tests/generics.rs
+++ b/tests/generics.rs
@@ -34,6 +34,9 @@ struct WrappedDouble<T: Clone, U: Clone>(T, U);
#[from(forward)]
struct WrappedDouble2<T: Clone, U: Clone>(T, U);
+#[derive(Add, Sum)]
+struct WrappedWithConst<T, const ... | 1 | 3 | 0 |
f9b9edb976a4f673161b10e16dc6fd15f0d28e84 | Jelte Fennema | 2021-07-07T22:08:41 | Update Cargo.toml | diff --git a/Cargo.lock b/Cargo.lock
index bc31b32..edbed53 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -27,6 +27,15 @@ dependencies = [
"quote 0.3.15",
]
+[[package]]
+name = "pest"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10f4872ae94d7b90ae48754df22fd42ad5... | 1 | 24 | 6 |
d335514f9f732f2e1b45c4bc7f3af20502a87c5d | Robert-André Mauchin | 2021-06-19T12:07:26 | Bump rustc_version to 0.3 (#157) | diff --git a/Cargo.toml b/Cargo.toml
index 553d91e..5f9e350 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,7 +34,7 @@ convert_case = { version = "0.4", optional = true}
[build-dependencies]
peg = { version = "0.5", optional = true }
-rustc_version = {version = "0.2", optional = true }
+rustc_version = {version = "... | 1 | 1 | 1 |
a642db17412762d8c6d5508e2f0bf7f36befc323 | Jelte Fennema | 2021-05-16T13:27:17 | (cargo-release) start next development iteration 0.99.15-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index f083962..bc31b32 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,7 +8,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.14"
+version = "0.99.15-alpha.0"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
1a4fd833b65be47e3e4cd1ca0dea9e471262de0b | Jelte Fennema | 2021-05-16T13:26:48 | (cargo-release) version 0.99.14 | diff --git a/Cargo.lock b/Cargo.lock
index 6b145ea..f083962 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,7 +8,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.14-alpha.0"
+version = "0.99.14"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
3e29612d9246b9855864564fcc559225cd0103b1 | Jelte Fennema | 2021-03-21T16:34:24 | (cargo-release) start next development iteration 0.99.14-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index e21d7f7..6b145ea 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,7 +8,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.13"
+version = "0.99.14-alpha.0"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
b25f1d99105adbd9aec491ae717f397180d3d9c6 | Jelte Fennema | 2021-03-21T16:34:12 | (cargo-release) version 0.99.13 | diff --git a/Cargo.lock b/Cargo.lock
index 30f3f5b..e21d7f7 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,7 +8,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.13-alpha.0"
+version = "0.99.13"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
a09b2432d1340ae61af0a9845dfe43597864cf07 | Jelte Fennema | 2021-03-21T16:06:43 | Update dependencies | diff --git a/Cargo.lock b/Cargo.lock
index 417cda6..30f3f5b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -13,7 +13,7 @@ dependencies = [
"convert_case",
"peg",
"proc-macro2",
- "quote 1.0.1",
+ "quote 1.0.9",
"rustc_version",
"syn",
]
@@ -29,9 +29,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-ve... | 1 | 10 | 10 |
380aa9f8f12d6fa04bdf7143cc9824af8c4d1d7c | Jelte Fennema | 2021-03-21T15:37:47 | Support is_variant(ignore) | diff --git a/src/is_variant.rs b/src/is_variant.rs
index 09d7cef..9258be0 100644
--- a/src/is_variant.rs
+++ b/src/is_variant.rs
@@ -1,20 +1,34 @@
+use crate::utils::{
+ AttrParams, DeriveType, State,
+};
use convert_case::{Case, Casing};
use proc_macro2::TokenStream;
use quote::{format_ident, quote};
-use syn::{... | 3 | 25 | 9 |
b7a7f5ae8f62c391af63bad1538d5d20669b4976 | Jelte Fennema | 2021-03-21T15:33:45 | Ignore warning in utils when compiling with non default features | diff --git a/src/utils.rs b/src/utils.rs
index 74f3a65..cac0897 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,4 +1,4 @@
-#![cfg_attr(not(feature = "default"), allow(dead_code))]
+#![cfg_attr(not(feature = "default"), allow(dead_code), allow(unused_mut))]
use proc_macro2::{Span, TokenStream};
use quote::{quote,... | 1 | 1 | 1 |
4cfb6a43ef3647d03a02ee378f0b1ef939a28e07 | Jelte Fennema | 2021-03-21T15:17:33 | (cargo-release) start next development iteration 0.99.13-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 87d0fd8..417cda6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -8,7 +8,7 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "derive_more"
-version = "0.99.12"
+version = "0.99.13-alpha.0"
dependencies = [
"convert_case",
... | 2 | 2 | 2 |
c0c6958abe5c88496a2eec04567a936df7a3d366 | Jelte Fennema | 2021-03-21T15:14:35 | (cargo-release) version 0.99.12 | diff --git a/Cargo.lock b/Cargo.lock
index 428cfd4..87d0fd8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,92 +4,90 @@
name = "convert_case"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]... | 2 | 26 | 28 |
fa94fab3ba3d73d9210a30c4d8114051fccf6365 | Jelte Fennema | 2021-03-07T11:14:29 | Change panic!(format!()) to panic!() to resolve warnings | diff --git a/src/add_assign_like.rs b/src/add_assign_like.rs
index e779fd8..60a7432 100644
--- a/src/add_assign_like.rs
+++ b/src/add_assign_like.rs
@@ -23,10 +23,10 @@ pub fn expand(input: &DeriveInput, trait_name: &str) -> TokenStream {
Fields::Named(ref fields) => {
struct_exprs(&named_... | 5 | 15 | 15 |
63a8820afa8b1726f1e31ea9ad2abf9547ae0d0a | tyranron | 2021-01-25T11:18:07 | Make Clippy happy again! | diff --git a/src/error.rs b/src/error.rs
index 5235af8..e3c4718 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -110,8 +110,10 @@ fn render_enum(
let mut backtrace_match_arms = Vec::new();
for variant in state.enabled_variant_data().variants {
- let mut default_info = FullMetaInfo::default();
- ... | 1 | 4 | 2 |
7018c4f995a082d066a2884c165bd20777eeb28b | tyranron | 2021-01-25T11:11:47 | Allow complex additional types for From/Into | diff --git a/src/into.rs b/src/into.rs
index 239a438..61d820e 100644
--- a/src/into.rs
+++ b/src/into.rs
@@ -72,7 +72,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
(#(#into_types),*) #where_clause {
#[inline]
- fn fro... | 4 | 63 | 30 |
94bb9d026bdad62603de73a3537d1306f112de2e | Erich Gubler | 2020-11-09T18:27:37 | `Display`: test that we can use `self` at the top level (#141) | diff --git a/tests/display.rs b/tests/display.rs
index 119b42c..cd8daec 100644
--- a/tests/display.rs
+++ b/tests/display.rs
@@ -100,6 +100,10 @@ enum Affix {
},
}
+#[derive(Debug, Display)]
+#[display(fmt = "{:?}", self)]
+struct DebugStructAsDisplay;
+
#[test]
fn check_display() {
assert_eq!(MyInt(-2).... | 1 | 5 | 0 |
92ba4da49e5934a8801af8ffdfa27e45c693d48b | Jelte Fennema | 2020-09-30T19:02:48 | (cargo-release) start next development iteration 0.99.12-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 5d594c8..05af290 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.11"
+version = "0.99.12-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates... | 2 | 2 | 2 |
2c95900e13ed5401aaba22176cca56f8c4851236 | Jelte Fennema | 2020-09-30T19:01:46 | (cargo-release) version 0.99.11 | diff --git a/Cargo.lock b/Cargo.lock
index 3e9ed5d..5d594c8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.11-alpha.0"
+version = "0.99.11"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates... | 2 | 2 | 2 |
db01d844dfe480db88a44dfee5f48fc6ce4457d7 | Aaron Hill | 2020-09-30T19:01:26 | Avoid stringifying and reparsing a `TokenStream` (#144)
This PR changes removes uses of the pattern `syn::parse_str(tokens.to_string())`,
which loses `Span` information. In addition to making error messages
less precise, it can break code that depends on the hygiene information
carried by `Span`. Instead, `syn::par... | diff --git a/src/utils.rs b/src/utils.rs
index dfba67f..e08b13b 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -3,10 +3,10 @@
use proc_macro2::{Span, TokenStream};
use quote::{quote, ToTokens};
use syn::{
- parse_str, punctuated::Punctuated, spanned::Spanned, Attribute, Data, DeriveInput,
- Error, Field, Fiel... | 2 | 24 | 12 |
39088967ba71d8e5d936c9689659dbbf74ce38d8 | Erich Gubler | 2020-09-24T19:01:02 | docs: fix diagnostics for affix spec usage on `enum`s (#140) | diff --git a/src/display.rs b/src/display.rs
index b86ef90..972d386 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -346,11 +346,12 @@ impl<'a, 'b> State<'a, 'b> {
op if op.segments.first().expect("path shouldn't be empty").ident
== "fmt" =>
{
+ ... | 1 | 3 | 2 |
58120ebd69a4a93fa29752bb0b58e84261740f9b | Jelte Fennema | 2020-09-11T18:15:08 | (cargo-release) start next development iteration 0.99.11-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 5730992..3e9ed5d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.10"
+version = "0.99.11-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates... | 2 | 2 | 2 |
8dfd0c177953d6bbcde15c0f6c5e87352bf10051 | Jelte Fennema | 2020-09-11T18:14:48 | (cargo-release) version 0.99.10 | diff --git a/Cargo.lock b/Cargo.lock
index dc45871..5730992 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.10-alpha.0"
+version = "0.99.10"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates... | 2 | 2 | 2 |
3c5f58bea7e80a7a08ee90f898f48304aefc037a | Max Gortman | 2020-09-06T08:50:54 | Fixing typos (#139) | diff --git a/src/display.rs b/src/display.rs
index 207bd72..b86ef90 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -441,7 +441,7 @@ impl<'a, 'b> State<'a, 'b> {
} else if fields.len() > 1 {
return Err(Error::new(
fields.span(),
- "Can not automatically infer fo... | 2 | 4 | 4 |
697363ca8ca6c95d3eafaad2965e95eb25373ee4 | Jelte Fennema | 2020-06-27T22:04:30 | Fix rustfmt | diff --git a/tests/generics.rs b/tests/generics.rs
index 0e73303..8f22cd5 100644
--- a/tests/generics.rs
+++ b/tests/generics.rs
@@ -76,7 +76,6 @@ struct DoubleStruct2<T: Clone, U: Clone> {
u: U,
}
-
#[derive(From, Not, Add)]
enum TupleEnum<T: Clone, U: Clone> {
Tuple(T), | 1 | 0 | 1 |
927fa9830110f4fd016f933b779074d919660989 | Jelte Fennema | 2020-06-27T13:30:15 | Add some more tests | diff --git a/tests/generics.rs b/tests/generics.rs
index 7f08864..0e73303 100644
--- a/tests/generics.rs
+++ b/tests/generics.rs
@@ -69,14 +69,36 @@ struct DoubleStruct<T: Clone, U: Clone> {
u: U,
}
+#[derive(From)]
+#[from(forward)]
+struct DoubleStruct2<T: Clone, U: Clone> {
+ t: T,
+ u: U,
+}
+
+
#[de... | 1 | 22 | 0 |
3708fbd2351e484950034e7ee72b0359f4a5cd96 | Jelte Fennema | 2020-06-27T12:03:18 | (cargo-release) start next development iteration 0.99.10-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 77ac3fb..dc45871 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.9"
+version = "0.99.10-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.... | 2 | 2 | 2 |
a7ead18e74a3dba48100b49cd59a91543843ba8f | Jelte Fennema | 2020-06-27T12:02:57 | (cargo-release) version 0.99.9 | diff --git a/Cargo.lock b/Cargo.lock
index d01004c..77ac3fb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.9-alpha.0"
+version = "0.99.9"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
231484fb6abe9cc3ac741fa5fa9b04f732776a07 | Jelte Fennema | 2020-06-27T11:53:36 | Fix from(forward) with multiple generic fields
Fixes #133 | diff --git a/src/from.rs b/src/from.rs
index fe390c4..16dcc8d 100644
--- a/src/from.rs
+++ b/src/from.rs
@@ -59,7 +59,7 @@ pub fn struct_from(input: &DeriveInput, state: &State) -> TokenStream {
where #field_type: #sub_trait_path
};
new_generics = add_where_clauses... | 2 | 5 | 1 |
0b651107a18870dd81023b58b65c5689293a889a | Jelte Fennema | 2020-06-16T16:36:16 | (cargo-release) start next development iteration 0.99.9-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 84f102b..d01004c 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.8"
+version = "0.99.9-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
b39dbeac5f9c26ca50943f61ad953c2117354885 | Jelte Fennema | 2020-06-16T16:35:55 | (cargo-release) version 0.99.8 | diff --git a/Cargo.lock b/Cargo.lock
index 63b90e6..84f102b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.8-alpha.0"
+version = "0.99.8"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
ea5f00cfcadd1faea66d452d225942956e415a6b | Matthew McAllister | 2020-06-16T16:18:03 | Fix generic trait bound for AsRef, AsMut (#129)
Before this it added the unnecessary (and syntactically incorrect) trait bound impl<T: ::std::convert::AsRef>. | diff --git a/src/as_mut.rs b/src/as_mut.rs
index 544407a..8394464 100644
--- a/src/as_mut.rs
+++ b/src/as_mut.rs
@@ -1,15 +1,19 @@
-use crate::utils::{add_where_clauses_for_new_ident, MultiFieldData, State};
+use crate::utils::{
+ add_where_clauses_for_new_ident, AttrParams, MultiFieldData, State,
+};
use proc_macr... | 5 | 137 | 11 |
be526bb8a28fe1146d6dfb6c1a74dd54c5c024f9 | Jelte Fennema | 2020-05-16T00:34:33 | (cargo-release) start next development iteration 0.99.8-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 0d1a11d..63b90e6 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.7"
+version = "0.99.8-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
8d9a56efd95dcabeee84ca76cd4ff42d545c6005 | Jelte Fennema | 2020-05-16T00:34:10 | (cargo-release) version 0.99.7 | diff --git a/Cargo.lock b/Cargo.lock
index 828d74f..0d1a11d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.7-alpha.0"
+version = "0.99.7"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
e4b29f32f6adf9f850c88ec9a85acdadecce3c12 | Jelte Fennema | 2020-05-16T00:27:41 | Add generics tests for MulAssign | diff --git a/tests/generics.rs b/tests/generics.rs
index 4563510..9a9fdc1 100644
--- a/tests/generics.rs
+++ b/tests/generics.rs
@@ -13,6 +13,7 @@ extern crate derive_more;
Sum,
IndexMut,
AddAssign,
+ MulAssign,
Deref,
DerefMut,
IntoIterator,
@@ -26,7 +27,7 @@ struct Wrapped<T: Clone>(T... | 1 | 4 | 2 |
52c1bd78944f29207aa02ad702335ddc54d8520b | Roland Kuhn | 2020-05-16T00:29:34 | fix derivation of MulAssign for generic structs (#126) | diff --git a/src/mul_assign_like.rs b/src/mul_assign_like.rs
index 544e4b7..eaba70d 100644
--- a/src/mul_assign_like.rs
+++ b/src/mul_assign_like.rs
@@ -56,7 +56,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
Ok(quote!(
impl#impl_generics #trait_path<#scalar_ident> f... | 2 | 9 | 1 |
8f10b1ff2e51b4159573f14711aa3be15a858d5c | Jelte Fennema | 2020-05-16T00:07:04 | Only require syn extra-traits derives that need it | diff --git a/Cargo.toml b/Cargo.toml
index 6ff00c7..c6fcf40 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,7 +29,7 @@ proc-macro = true
[dependencies]
proc-macro2 = "1"
quote = "1"
-syn = { version = "1", features = ["extra-traits"] }
+syn = { version = "1" }
[build-dependencies]
peg = { version = "0.5", option... | 1 | 8 | 8 |
e6cc12fda4788ade330e56fbb9843ccddce00114 | Jelte Fennema | 2020-05-13T20:42:15 | (cargo-release) start next development iteration 0.99.7-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index e2f0de4..828d74f 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.6"
+version = "0.99.7-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
f0abb1f5764aec7179ad6817d28d880284f33aa2 | Jelte Fennema | 2020-05-13T20:41:55 | (cargo-release) version 0.99.6 | diff --git a/Cargo.lock b/Cargo.lock
index 35bfc86..e2f0de4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.6-alpha.0"
+version = "0.99.6"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
3deaddc0bc8392e82174f5717552cd93a8384fff | Edwin Cheng | 2020-05-07T06:27:29 | Use deterministic hash collections (#125) | diff --git a/src/display.rs b/src/display.rs
index e575aec..207bd72 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -1,9 +1,4 @@
-use std::{
- collections::{HashMap, HashSet},
- fmt::Display,
- iter::FromIterator as _,
- str::FromStr as _,
-};
+use std::{fmt::Display, iter::FromIterator as _, str::FromS... | 5 | 39 | 28 |
78a64d8b2d49a4a3eec9ef0bb2ed3c08f1448c85 | Jelte Fennema | 2020-03-28T14:03:59 | (cargo-release) start next development iteration 0.99.6-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 306b3c3..35bfc86 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.5"
+version = "0.99.6-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
569adea26a34273b87eeb389045d9ef445212507 | Jelte Fennema | 2020-03-28T14:03:38 | (cargo-release) version 0.99.5 | diff --git a/Cargo.lock b/Cargo.lock
index e677bec..306b3c3 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.5-alpha.0"
+version = "0.99.5"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
4a47f60ebd1c6a95b06f99aba053619c2bcfefc3 | Jelte Fennema | 2020-03-28T12:17:33 | Fix rustfmt | diff --git a/build.rs b/build.rs
index 232f254..84bb1ff 100644
--- a/build.rs
+++ b/build.rs
@@ -4,7 +4,6 @@ extern crate rustc_version;
#[cfg(feature = "generate-parsing-rs")]
extern crate peg;
-
#[cfg(not(feature = "generate-parsing-rs"))]
fn generate_peg() {}
#[cfg(feature = "generate-parsing-rs")] | 1 | 0 | 1 |
a482876a956803f3748eebc0763dde1cf039a64e | Jelte Fennema | 2020-03-28T10:59:58 | Actually run the backtrace tests on nightly | diff --git a/Cargo.lock b/Cargo.lock
index a54c951..e677bec 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -7,6 +7,7 @@ dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.1 (registry+https://git... | 3 | 39 | 1 |
ec9885938d2bda1f4df1a072a4fe980bf00703ac | Jelte Fennema | 2020-03-28T10:28:19 | (cargo-release) start next development iteration 0.99.5-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 073c6d4..a54c951 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.4"
+version = "0.99.5-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
a0ffe72419fba49ebae3ec02e1f82f7d4816ed5a | Jelte Fennema | 2020-03-28T10:27:53 | (cargo-release) version 0.99.4 | diff --git a/Cargo.lock b/Cargo.lock
index fa83379..073c6d4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.4-alpha.0"
+version = "0.99.4"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
de9fea3ed73a0db9c94160f69343a9e66cf48895 | Jelte Fennema | 2020-03-28T10:02:35 | Replace some .map calls with ? | diff --git a/src/error.rs b/src/error.rs
index 85dbe18..483cb2c 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -190,32 +190,28 @@ impl<'input, 'state> ParsedFields<'input, 'state> {
impl<'input, 'state> ParsedFields<'input, 'state> {
fn render_source_as_struct(&self) -> Option<TokenStream> {
- self.sour... | 1 | 23 | 29 |
f9c854c020b125e83dff16bcda4139d4041dc0fc | Jelte Fennema | 2020-03-14T00:13:30 | Use correct bounds for forward of Deref(Mut)
Fixes #116 | diff --git a/src/deref.rs b/src/deref.rs
index f9d1984..60e49a7 100644
--- a/src/deref.rs
+++ b/src/deref.rs
@@ -1,4 +1,4 @@
-use crate::utils::{add_extra_ty_param_bound, SingleFieldData, State};
+use crate::utils::{add_extra_where_clauses, SingleFieldData, State};
use proc_macro2::TokenStream;
use quote::quote;
use... | 4 | 45 | 4 |
6ecdbc28976bf107cb1c3631cf0edd713e67bd19 | Josh Stone | 2020-02-20T17:31:05 | Fix the include glob for tests/ (#117) | diff --git a/Cargo.toml b/Cargo.toml
index 23e0bcf..8cc465d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -18,7 +18,7 @@ include = [
"LICENSE",
"README.md",
"CHANGELOG.md",
- "test/**/*.rs", # debian packaging wants this
+ "tests/**/*.rs", # debian packaging wants this
]
autotests = true | 1 | 1 | 1 |
9ea31b2b4f58af107a39b927ffa87d1d2a1f1c9a | Jelte Fennema | 2020-02-19T08:33:19 | (cargo-release) start next development iteration 0.99.4-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index eef7cc8..fa83379 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.3"
+version = "0.99.4-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
495f177b5ecae65f2b92f3d548364ef80d29ee5a | Jelte Fennema | 2020-02-19T08:32:28 | (cargo-release) version 0.99.3 | diff --git a/Cargo.lock b/Cargo.lock
index 0dea269..eef7cc8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.3-alpha.0"
+version = "0.99.3"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
ca056fb20e703b4bfaa3d8e43699ba0eb5dd105a | yankuu | 2020-02-19T08:32:07 | Bound Deref/DerefMut only for forward (#115)
* Bound Deref/DerefMut only for forward
* Move generics logic for deref(_mut) from utils to their files
Fixes #114
Co-authored-by: Jelte Fennema <github-tech@jeltef.nl> | diff --git a/src/deref.rs b/src/deref.rs
index c7a8008..f9d1984 100644
--- a/src/deref.rs
+++ b/src/deref.rs
@@ -1,4 +1,4 @@
-use crate::utils::{SingleFieldData, State};
+use crate::utils::{add_extra_ty_param_bound, SingleFieldData, State};
use proc_macro2::TokenStream;
use quote::quote;
use syn::{parse::Result, Der... | 4 | 33 | 11 |
79d501004e8306c93735eec81b36791990a54192 | Jelte Fennema | 2019-11-17T13:12:52 | (cargo-release) start next development iteration 0.99.3-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index a6fcb56..0dea269 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.2"
+version = "0.99.3-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
e3f8a6bdea5fe7100a2dd32e9460637b6855fc68 | Jelte Fennema | 2019-11-17T13:12:28 | (cargo-release) version 0.99.2 | diff --git a/Cargo.lock b/Cargo.lock
index 6bbdedb..a6fcb56 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.2-alpha.0"
+version = "0.99.2"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
3b12e569740a73943dbde3ee7027133ac1ec5aee | troiganto | 2019-11-17T13:09:50 | Refactor derive(Display) to properly propagate the alternate flag (#108)
* Remove use statements in `impl Display` to avoid strange interactions.
* Add some tiny comments to derive(Display) for better orientation.
* Avoid `write!(f, "{}", #fmt)` in `derive(Display)`.
Using a new `write!` invocation effectivel... | diff --git a/src/deref.rs b/src/deref.rs
index 91e22f2..c7a8008 100644
--- a/src/deref.rs
+++ b/src/deref.rs
@@ -3,7 +3,7 @@ use proc_macro2::TokenStream;
use quote::quote;
use syn::{parse::Result, DeriveInput};
-/// Provides the hook to expand `#[derive(Index)]` into an implementation of `From`
+/// Provides the h... | 7 | 134 | 72 |
0f899f1e29ac1c3ede0cbf1c41ad50c3bf23f680 | Jelte Fennema | 2019-11-12T18:25:54 | (cargo-release) start next development iteration 0.99.2-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 985e3c4..6bbdedb 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.1"
+version = "0.99.2-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
01fcf71435e6fbd660921fc401cc23b6c7523c2e | Jelte Fennema | 2019-11-12T18:25:30 | (cargo-release) version 0.99.1 | diff --git a/Cargo.lock b/Cargo.lock
index b991eea..985e3c4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.1-alpha.0"
+version = "0.99.1"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
7da3ee9b7a7898f2611e2ceb5b3a5fc15c6f55c2 | Jelte Fennema | 2019-11-12T18:23:54 | Modify hotfix slightly | diff --git a/src/from.rs b/src/from.rs
index 534e78f..84cf619 100644
--- a/src/from.rs
+++ b/src/from.rs
@@ -103,7 +103,7 @@ fn enum_from(input: &DeriveInput, state: State) -> TokenStream {
.or_insert_with(Vec::new)
.push(variant_state);
}
- for (_, ref variant_states) in variants_per_... | 2 | 6 | 16 |
a1d749217f2e062d564ecf89f2cc195568b31d59 | Jelte Fennema | 2019-11-11T08:50:16 | (cargo-release) start next development iteration 0.99.1-alpha.0 | diff --git a/Cargo.lock b/Cargo.lock
index 9f22419..b991eea 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.0"
+version = "0.99.1-alpha.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.i... | 2 | 2 | 2 |
9a8d50cf54e7351a37734ba6dd43b3cd0aded5f8 | Jelte Fennema | 2019-11-11T08:49:52 | (cargo-release) version 0.99.0 | diff --git a/Cargo.lock b/Cargo.lock
index 4203c0b..9f22419 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2,7 +2,7 @@
# It is not intended for manual editing.
[[package]]
name = "derive_more"
-version = "0.99.0-pre"
+version = "0.99.0"
dependencies = [
"peg 0.5.7 (registry+https://github.com/rust-lang/crates.io-in... | 2 | 2 | 2 |
74651043f5810a24fd679a0dfa59ce3c5a28d6f9 | Jelte Fennema | 2019-11-11T08:33:01 | Update prerelease version in Cargo.toml | diff --git a/Cargo.toml b/Cargo.toml
index 1c727ed..a60da93 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "derive_more"
-version = "0.15.1-pre"
+version = "0.99.0-pre"
description = "Adds #[derive(x)] macros for more traits"
authors = ["Jelte Fennema <github-tech@jeltef.nl>"]
license = ... | 1 | 1 | 1 |
d685a2b8a018244802712cd284d29f98e5429357 | Jelte Fennema | 2019-11-10T19:20:42 | Remove code for deriving iterator it is unfinished | diff --git a/Cargo.toml b/Cargo.toml
index c85ce58..1f43648 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -160,11 +160,6 @@ name = "into_iterator"
path = "tests/into_iterator.rs"
required-features = ["into_iterator"]
-[[test]]
-name = "iterator"
-path = "tests/iterator.rs"
-required-features = ["iterator"]
-
[[test]... | 7 | 3 | 80 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.