mirror of https://github.com/rwf2/Rocket.git
parent
7090e2a1ee
commit
4ef179cc59
|
@ -19,9 +19,6 @@ database_attribute = []
|
|||
[lib]
|
||||
proc-macro = true
|
||||
|
||||
[dependencies.derive_utils]
|
||||
git = "https://github.com/SergioBenitez/derive-utils"
|
||||
rev = "62f361f"
|
||||
|
||||
[dependencies]
|
||||
devise = "0.1"
|
||||
quote = "0.6"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use proc_macro::TokenStream;
|
||||
use derive_utils::{Spanned, Result};
|
||||
use devise::{Spanned, Result};
|
||||
use syn::{DataStruct, Fields, Data, Type, LitStr, DeriveInput, Ident, Visibility};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
//! DATABASE_NAME := (string literal)
|
||||
//! </pre>
|
||||
|
||||
extern crate derive_utils;
|
||||
extern crate devise;
|
||||
extern crate proc_macro;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
#[macro_use] extern crate quote;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
crate use derive_utils::{syn, proc_macro2};
|
||||
crate use devise::{syn, proc_macro2};
|
||||
|
||||
#[cfg(feature = "database_attribute")]
|
||||
mod database;
|
||||
|
|
|
@ -21,15 +21,12 @@ proc-macro = true
|
|||
indexmap = "1.0"
|
||||
quote = "0.6.1"
|
||||
rocket_http = { version = "0.4.0-dev", path = "../http/" }
|
||||
devise = "0.1"
|
||||
|
||||
[build-dependencies]
|
||||
yansi = "0.4"
|
||||
version_check = "0.1.3"
|
||||
|
||||
[dependencies.derive_utils]
|
||||
git = "https://github.com/SergioBenitez/derive-utils"
|
||||
rev = "62f361f"
|
||||
|
||||
[dev-dependencies]
|
||||
rocket = { version = "0.4.0-dev", path = "../lib" }
|
||||
compiletest_rs = { git = "https://github.com/laumann/compiletest-rs" }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use proc_macro::{TokenStream, Span};
|
||||
use derive_utils::{syn, Spanned, Result, FromMeta};
|
||||
use devise::{syn, Spanned, Result, FromMeta};
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
|
||||
use http_codegen::Status;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use proc_macro::{TokenStream, Span};
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
use derive_utils::{syn, Spanned, SpanWrapped, Result, FromMeta, ext::TypeExt};
|
||||
use devise::{syn, Spanned, SpanWrapped, Result, FromMeta, ext::TypeExt};
|
||||
use indexmap::IndexSet;
|
||||
|
||||
use proc_macro_ext::{Diagnostics, SpanExt};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::hash::{Hash, Hasher};
|
||||
|
||||
use derive_utils::syn;
|
||||
use devise::syn;
|
||||
use proc_macro::{Span, Diagnostic};
|
||||
|
||||
use http::route::RouteSegment;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use proc_macro::TokenStream;
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
|
||||
use derive_utils::{syn, Spanned, Result};
|
||||
use devise::{syn, Spanned, Result};
|
||||
use self::syn::{Path, punctuated::Punctuated, parse::Parser, token::Comma};
|
||||
use syn_ext::{IdentExt, syn_to_diag};
|
||||
use {ROUTE_STRUCT_PREFIX, CATCH_STRUCT_PREFIX};
|
||||
|
|
|
@ -2,8 +2,8 @@ use std::fmt::Display;
|
|||
use proc_macro::TokenStream;
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
|
||||
use derive_utils::{syn, Result};
|
||||
use derive_utils::syn::{Expr, Ident, Type, spanned::Spanned};
|
||||
use devise::{syn, Result};
|
||||
use devise::syn::{Expr, Ident, Type, spanned::Spanned};
|
||||
use http::{uri::Origin, ext::IntoOwned};
|
||||
use http::route::{RouteSegment, Kind, Source};
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
use proc_macro::Span;
|
||||
|
||||
use derive_utils::{syn, Spanned};
|
||||
use derive_utils::proc_macro2::TokenStream as TokenStream2;
|
||||
use derive_utils::ext::TypeExt;
|
||||
use devise::{syn, Spanned};
|
||||
use devise::proc_macro2::TokenStream as TokenStream2;
|
||||
use devise::ext::TypeExt;
|
||||
use quote::ToTokens;
|
||||
|
||||
use self::syn::{Expr, Ident, LitStr, Path, Token, Type};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use proc_macro::{Span, TokenStream};
|
||||
use derive_utils::{*, ext::{TypeExt, Split3}};
|
||||
use devise::{*, ext::{TypeExt, Split3}};
|
||||
|
||||
#[derive(FromMeta)]
|
||||
crate struct Form {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use derive_utils::*;
|
||||
use devise::*;
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
#[derive(FromMeta)]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use quote::ToTokens;
|
||||
use proc_macro::TokenStream;
|
||||
use derive_utils::{*, ext::TypeExt};
|
||||
use derive_utils::proc_macro2::TokenStream as TokenStream2;
|
||||
use devise::{*, ext::TypeExt};
|
||||
use devise::proc_macro2::TokenStream as TokenStream2;
|
||||
|
||||
use http_codegen::{ContentType, Status};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use proc_macro::{Span, TokenStream};
|
||||
use derive_utils::*;
|
||||
use devise::*;
|
||||
|
||||
use derive::from_form::Form;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use quote::ToTokens;
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
use derive_utils::{FromMeta, MetaItem, Result, ext::Split2};
|
||||
use devise::{FromMeta, MetaItem, Result, ext::Split2};
|
||||
use http::{self, ext::IntoOwned};
|
||||
use attribute::segments::{parse_segments, parse_segment, Segment, Kind, Source};
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
//! ```
|
||||
|
||||
#[macro_use] extern crate quote;
|
||||
#[macro_use] extern crate derive_utils;
|
||||
#[macro_use] extern crate devise;
|
||||
extern crate proc_macro;
|
||||
extern crate rocket_http as http;
|
||||
extern crate indexmap;
|
||||
|
@ -64,7 +64,7 @@ mod syn_ext;
|
|||
|
||||
use http::Method;
|
||||
use proc_macro::TokenStream;
|
||||
crate use derive_utils::proc_macro2;
|
||||
crate use devise::proc_macro2;
|
||||
|
||||
crate static ROUTE_STRUCT_PREFIX: &str = "static_rocket_route_info_for_";
|
||||
crate static CATCH_STRUCT_PREFIX: &str = "static_rocket_catch_info_for_";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! Extensions to `syn` types.
|
||||
|
||||
use derive_utils::syn;
|
||||
use devise::syn;
|
||||
use proc_macro::Diagnostic;
|
||||
|
||||
pub fn syn_to_diag(error: syn::parse::Error) -> Diagnostic {
|
||||
|
|
Loading…
Reference in New Issue