Merge pull request #151 from zicklag/patch-2
[Docs] Add Cargo Expand to Macro Debugging Tips
This commit is contained in:
		
						commit
						090c06c55a
					
				| @ -2,5 +2,7 @@ | |||||||
| 
 | 
 | ||||||
| ## Macro Debugging | ## Macro Debugging | ||||||
| 
 | 
 | ||||||
| * Print the final output of a macro using ```cargo rustc --profile=check -- -Zunstable-options --pretty=expanded``` | - Print the final output of a macro using `cargo rustc --profile=check -- -Zunstable-options --pretty=expanded` | ||||||
| * Print output during macro compilation using ```eprintln!("hi");``` |   - Alternatively you could install and use [cargo expand](https://github.com/dtolnay/cargo-expand) which adds syntax highlighting to the terminal output. | ||||||
|  |     - Additionally get pager by piping to `less` ( on Unix systems ): `cargo expand --color always | less -R` | ||||||
|  | - Print output during macro compilation using `eprintln!("hi");` | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Carter Anderson
						Carter Anderson