This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add quasi_codegen::expand and remove the public dependency on syntex
This helps to avoid the issue of incompatible syntex types being passed between crates.
- Loading branch information
Showing
3 changed files
with
26 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
extern crate syntex; | ||
extern crate quasi_codegen; | ||
|
||
use std::env; | ||
use std::path::Path; | ||
|
||
pub fn main() { | ||
let out_dir = env::var_os("OUT_DIR").unwrap(); | ||
let mut registry = syntex::Registry::new(); | ||
quasi_codegen::register(&mut registry); | ||
|
||
let src = Path::new("tests/test.rs.in"); | ||
let dst = Path::new(&out_dir).join("test.rs"); | ||
|
||
registry.expand("", &src, &dst).unwrap(); | ||
quasi_codegen::expand(&src, &dst).unwrap(); | ||
} |