File tree Expand file tree Collapse file tree 1 file changed +24
-24
lines changed Expand file tree Collapse file tree 1 file changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -1691,41 +1691,41 @@ fn fix_with_run_cargo_in_proc_macros() {
16911691 . file (
16921692 "Cargo.toml" ,
16931693 r#"
1694- [package]
1695- name = "foo"
1696- version = "0.1.0"
1697- edition = "2018"
1694+ [package]
1695+ name = "foo"
1696+ version = "0.1.0"
1697+ edition = "2018"
16981698
1699- [lib]
1700- proc-macro = true
1701- "# ,
1699+ [lib]
1700+ proc-macro = true
1701+ "# ,
17021702 )
17031703 . file (
17041704 "src/lib.rs" ,
17051705 r#"
1706- use proc_macro::*;
1706+ use proc_macro::*;
17071707
1708- #[proc_macro]
1709- pub fn foo(_input: TokenStream) -> TokenStream {
1710- let output = std::process::Command::new("cargo")
1711- .args(&["metadata", "--format-version=1"])
1712- .output()
1713- .unwrap();
1714- eprintln!("{}", std::str::from_utf8(&output.stderr).unwrap());
1715- println!("{}", std::str::from_utf8(&output.stdout).unwrap());
1716- "".parse().unwrap()
1717- }
1718- "# ,
1708+ #[proc_macro]
1709+ pub fn foo(_input: TokenStream) -> TokenStream {
1710+ let output = std::process::Command::new("cargo")
1711+ .args(&["metadata", "--format-version=1"])
1712+ .output()
1713+ .unwrap();
1714+ eprintln!("{}", std::str::from_utf8(&output.stderr).unwrap());
1715+ println!("{}", std::str::from_utf8(&output.stdout).unwrap());
1716+ "".parse().unwrap()
1717+ }
1718+ "# ,
17191719 )
17201720 . file (
17211721 "src/bin/main.rs" ,
17221722 r#"
1723- use foo::foo;
1723+ use foo::foo;
17241724
1725- fn main() {
1726- foo!("bar")
1727- }
1728- "# ,
1725+ fn main() {
1726+ foo!("bar")
1727+ }
1728+ "# ,
17291729 )
17301730 . build ( ) ;
17311731 p. cargo ( "fix --allow-no-vcs" )
You can’t perform that action at this time.
0 commit comments