diff --git a/Cargo.toml b/Cargo.toml index dc648fb..5cf409b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ A procedural macro for generating the most basic getters and setters on fields. version = "0.0.7" authors = ["Ana Hobden "] license = "MIT" +edition = "2018" categories = ["development-tools::procedural-macro-helpers"] keywords = ["macro", "getter", "setter", "getters", "setters"] diff --git a/src/generate.rs b/src/generate.rs index aa01951..371972a 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -1,4 +1,4 @@ -use attr_name; +use crate::attr_name; use proc_macro2::TokenStream as TokenStream2; use proc_macro2::{Ident, Span}; use syn::{Attribute, Field, Lit, Meta, MetaNameValue}; diff --git a/src/lib.rs b/src/lib.rs index d839c9d..380f49a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -91,7 +91,7 @@ use proc_macro2::TokenStream as TokenStream2; use syn::{Attribute, DataStruct, DeriveInput, Ident, Meta}; mod generate; -use generate::{GenMode, GenParams}; +use crate::generate::{GenMode, GenParams}; fn attr_name(attr: &Attribute) -> Option { attr.interpret_meta().map(|v| v.name()) diff --git a/tests/getters.rs b/tests/getters.rs index 8e5ecf9..bc9e2a1 100644 --- a/tests/getters.rs +++ b/tests/getters.rs @@ -1,7 +1,7 @@ #[macro_use] extern crate getset; -use submodule::other::{Generic, Plain, Where}; +use crate::submodule::other::{Generic, Plain, Where}; // For testing `pub(super)` mod submodule { diff --git a/tests/mut_getters.rs b/tests/mut_getters.rs index 0ae45f7..c536f5c 100644 --- a/tests/mut_getters.rs +++ b/tests/mut_getters.rs @@ -1,7 +1,7 @@ #[macro_use] extern crate getset; -use submodule::other::{Generic, Plain, Where}; +use crate::submodule::other::{Generic, Plain, Where}; // For testing `pub(super)` mod submodule { diff --git a/tests/setters.rs b/tests/setters.rs index c03e2ab..ba5998d 100644 --- a/tests/setters.rs +++ b/tests/setters.rs @@ -1,7 +1,7 @@ #[macro_use] extern crate getset; -use submodule::other::{Generic, Plain, Where}; +use crate::submodule::other::{Generic, Plain, Where}; // For testing `pub(super)` mod submodule {