Skip to content

Commit

Permalink
Bump crates to 2018 edition
Browse files Browse the repository at this point in the history
The problem with bad diagnostics appears to have been due to not being able to find the macro to emit compile errors.
  • Loading branch information
TedDriggs committed Jan 30, 2024
1 parent a962baf commit e60b3c1
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 25 deletions.
13 changes: 8 additions & 5 deletions derive_builder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
[package]
name = "derive_builder"
version = "0.13.0"
authors = ["Colin Kiegel <kiegel@gmx.de>",
"Pascal Hertleif <killercup@gmail.com>",
"Jan-Erik Rediger <janerik@fnordig.de>",
"Ted Driggs <ted.driggs@outlook.com>"]
authors = [
"Colin Kiegel <kiegel@gmx.de>",
"Pascal Hertleif <killercup@gmail.com>",
"Jan-Erik Rediger <janerik@fnordig.de>",
"Ted Driggs <ted.driggs@outlook.com>",
]
edition = "2018"

description = "Rust macro to automatically implement the builder pattern for arbitrary structs."
repository = "https://github.com/colin-kiegel/rust-derive-builder"
Expand All @@ -31,4 +34,4 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"

[target.'cfg(compiletests)'.dev-dependencies]
trybuild = "1.0.38"
trybuild = "1.0.38"
2 changes: 1 addition & 1 deletion derive_builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ pub use error::UninitializedFieldError;
pub mod export {
pub mod core {
#[cfg(feature = "alloc")]
pub use alloc::string;
pub use ::alloc::string;
#[cfg(not(feature = "std"))]
pub use core::*;
#[cfg(feature = "std")]
Expand Down
2 changes: 1 addition & 1 deletion derive_builder_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = [
"Jan-Erik Rediger <janerik@fnordig.de>",
"Ted Driggs <ted.driggs@outlook.com>",
]

edition = "2018"
description = "Internal helper library for the derive_builder crate."
repository = "https://github.com/colin-kiegel/rust-derive-builder"
documentation = "https://docs.rs/derive_builder_core"
Expand Down
8 changes: 3 additions & 5 deletions derive_builder_core/src/build_method.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
use std::borrow::Cow;

use doc_comment_from;
use proc_macro2::{Span, TokenStream};
use quote::{ToTokens, TokenStreamExt};
use syn;
use syn::spanned::Spanned;
use BuilderPattern;
use Initializer;
use DEFAULT_STRUCT_NAME;

use crate::DefaultExpression;
use crate::{
doc_comment_from, BuilderPattern, DefaultExpression, Initializer, DEFAULT_STRUCT_NAME,
};

/// Initializer for the struct fields in the build method, implementing
/// `quote::ToTokens`.
Expand Down
9 changes: 3 additions & 6 deletions derive_builder_core/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ use quote::{format_ident, ToTokens, TokenStreamExt};
use syn::punctuated::Punctuated;
use syn::{self, Path, TraitBound, TraitBoundModifier, TypeParamBound};

use doc_comment_from;
use BuildMethod;
use BuilderField;
use BuilderPattern;
use DeprecationNotes;
use Setter;
use crate::{
doc_comment_from, BuildMethod, BuilderField, BuilderPattern, DeprecationNotes, Setter,
};

const ALLOC_NOT_ENABLED_ERROR: &str = r#"`alloc` is disabled within 'derive_builder', consider one of the following:
* enable feature `alloc` on 'dervie_builder' if a `global_allocator` is present
Expand Down
4 changes: 1 addition & 3 deletions derive_builder_core/src/initializer.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
use proc_macro2::{Span, TokenStream};
use quote::{ToTokens, TokenStreamExt};
use syn;
use BuilderPattern;
use DEFAULT_STRUCT_NAME;

use crate::{change_span, BlockContents, DefaultExpression};
use crate::{change_span, BlockContents, BuilderPattern, DefaultExpression, DEFAULT_STRUCT_NAME};

/// Initializer for the target struct fields, implementing `quote::ToTokens`.
///
Expand Down
5 changes: 1 addition & 4 deletions derive_builder_core/src/setter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ use proc_macro2::{Span, TokenStream};
use quote::{ToTokens, TokenStreamExt};
use syn;

use BuilderFieldType;
use BuilderPattern;
use DeprecationNotes;
use Each;
use crate::{BuilderFieldType, BuilderPattern, DeprecationNotes, Each};

/// Setter for the struct fields in the build method, implementing
/// `quote::ToTokens`.
Expand Down
1 change: 1 addition & 0 deletions derive_builder_macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ authors = [
"Jan-Erik Rediger <janerik@fnordig.de>",
"Ted Driggs <ted.driggs@outlook.com>",
]
edition = "2018"

description = "Rust macro to automatically implement the builder pattern for arbitrary structs."
repository = "https://github.com/colin-kiegel/rust-derive-builder"
Expand Down

0 comments on commit e60b3c1

Please sign in to comment.