Rebrand as 'syn'
diff --git a/Cargo.toml b/Cargo.toml
index b9dc217..e83240c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "item"
+name = "syn"
version = "0.3.2"
authors = ["David Tolnay <dtolnay@gmail.com>"]
license = "MIT/Apache-2.0"
diff --git a/README.md b/README.md
index 390c402..c6831c7 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
```toml
[dependencies]
-item = "0.3"
+syn = "0.3"
```
```rust
@@ -23,7 +23,7 @@
}
";
-let ast = item::parse(raw);
+let ast = syn::parse_item(raw);
```
## License
diff --git a/src/lib.rs b/src/lib.rs
index c1951de..1e6cd14 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -64,7 +64,7 @@
};
#[cfg(feature = "parsing")]
-pub fn parse(input: &str) -> Item {
+pub fn parse_item(input: &str) -> Item {
return match item::parsing::item(input) {
nom::IResult::Done(rest, ast) => {
if rest.is_empty() {
diff --git a/tests/all.rs b/tests/all.rs
index 50d70ee..a8a84e1 100644
--- a/tests/all.rs
+++ b/tests/all.rs
@@ -1,4 +1,4 @@
-extern crate item;
+extern crate syn;
#[macro_use]
extern crate quote;
@@ -8,9 +8,9 @@
#[test]
fn test_all() {
for s in ITEMS {
- let ast = item::parse(s);
+ let ast = syn::parse_item(s);
let tokens = quote!(#ast).to_string();
- assert_eq!(ast, item::parse(&tokens));
+ assert_eq!(ast, syn::parse_item(&tokens));
}
static ITEMS: &'static [&'static str] = &[
diff --git a/tests/test.rs b/tests/test.rs
index 82b2716..6dd25d3 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1,5 +1,5 @@
-extern crate item;
-use item::*;
+extern crate syn;
+use syn::*;
fn simple_ty(ident: &str) -> Ty {
Ty::Path(None, Path {
@@ -20,7 +20,7 @@
body: Body::Struct(Style::Unit, Vec::new()),
};
- assert_eq!(expected, parse(raw));
+ assert_eq!(expected, parse_item(raw));
}
#[test]
@@ -76,7 +76,7 @@
]),
};
- assert_eq!(expected, parse(raw));
+ assert_eq!(expected, parse_item(raw));
}
#[test]
@@ -152,5 +152,5 @@
]),
};
- assert_eq!(expected, parse(raw));
+ assert_eq!(expected, parse_item(raw));
}