Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
D7050E_proc_macro
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Lindgren
D7050E_proc_macro
Commits
69f90757
Commit
69f90757
authored
4 years ago
by
Per Lindgren
Browse files
Options
Downloads
Patches
Plain Diff
with cargo expand
parent
24caa45a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+12
-0
12 additions, 0 deletions
README.md
expand_main.rs
+7
-0
7 additions, 0 deletions
expand_main.rs
with
19 additions
and
0 deletions
README.md
0 → 100644
+
12
−
0
View file @
69f90757
# Proc macro example
> cargo run --example main
To see the result of macro expansion, you need
`cargo-expand`
.
> cargo install cargo-expand
Now you can run:
> cargo expand --example main > expand_main.rs
This diff is collapsed.
Click to expand it.
expand_main.rs
0 → 100644
+
7
−
0
View file @
69f90757
#![feature(prelude_import)]
#[prelude_import]
use
std
::
prelude
::
v1
::
*
;
#[macro_use]
extern
crate
std
;
use
d7050e_proc_macro
::
my_attribute
;
fn
main
()
{}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment