mirror of
https://github.com/gnu4cn/rust-lang-zh_CN.git
synced 2026-08-22 22:23:28 +08:00
reorganized the directories
This commit is contained in:
10
projects/derive_macro_comsumer/Cargo.toml
Normal file
10
projects/derive_macro_comsumer/Cargo.toml
Normal file
@@ -0,0 +1,10 @@
|
||||
[package]
|
||||
name = "derive_macro_comsumer"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
hello_macro = { path = "../hello_macro" }
|
||||
hello_macro_derive = { path = "../hello_macro/hello_macro_derive" }
|
||||
9
projects/derive_macro_comsumer/src/main.rs
Normal file
9
projects/derive_macro_comsumer/src/main.rs
Normal file
@@ -0,0 +1,9 @@
|
||||
use hello_macro::HelloMacro;
|
||||
use hello_macro_derive::HelloMacro;
|
||||
|
||||
#[derive(HelloMacro)]
|
||||
struct Pancakes;
|
||||
|
||||
fn main() {
|
||||
Pancakes::hello_macro();
|
||||
}
|
||||
Reference in New Issue
Block a user