Skip to content

Commit 6e40348

Browse files
authored
Fix makefile (#4203)
1 parent 15e7cab commit 6e40348

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.cargo/Makefile.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,22 @@
44
CFG_RELEASE = { value = "${CARGO_MAKE_RUST_VERSION}", condition = { env_not_set = ["CFG_RELEASE"] } }
55
CFG_RELEASE_CHANNEL = { value = "${CARGO_MAKE_RUST_CHANNEL}", condition = { env_not_set = ["CFG_RELEASE_CHANNEL"] } }
66

7+
[tasks.build-bin]
8+
workspace = false
9+
command = "cargo"
10+
args = [
11+
"build",
12+
"--bin",
13+
"rustfmt",
14+
"--all-features",
15+
]
16+
717
[tasks.b]
818
alias = "build"
919

20+
[tasks.bb]
21+
alias = "build-bin"
22+
1023
[tasks.c]
1124
alias = "check"
1225

Makefile.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
extend = ".cargo/Makefile.toml"
22

3-
[tasks.build]
4-
clear = true
5-
command = "cargo"
6-
args = [
7-
"build",
8-
"--manifest-path",
9-
"rustfmt-core/Cargo.toml",
10-
"--workspace",
11-
]
12-
133
[tasks.install]
144
command = "cargo"
155
args = [

rustfmt-core/rustfmt-lib/config_proc_macro/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rustfmt-config_proc_macro"
3-
version = "0.5.0"
3+
version = "0.5.1"
44
authors = ["topecongiro <seuchida@gmail.com>"]
55
edition = "2018"
66
description = "A collection of procedural macros for rustfmt"
@@ -21,4 +21,3 @@ serde = { version = "1.0", features = ["derive"] }
2121

2222
[features]
2323
default = []
24-
debug-with-rustfmt = []

rustfmt-core/rustfmt-lib/config_proc_macro/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ pub fn config_type(_args: TokenStream, input: TokenStream) -> TokenStream {
1818
let input = parse_macro_input!(input as syn::Item);
1919
let output = config_type::define_config_type(&input);
2020

21-
#[cfg(feature = "debug-with-rustfmt")]
22-
{
21+
if std::env::var("RUSTFMT_DEV_DEBUG_PROC_MACRO").is_ok() {
2322
utils::debug_with_rustfmt(&output);
2423
}
2524

rustfmt-core/rustfmt-lib/config_proc_macro/src/utils.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ pub fn is_unit(v: &syn::Variant) -> bool {
1919
}
2020
}
2121

22-
#[cfg(feature = "debug-with-rustfmt")]
2322
/// Pretty-print the output of proc macro using rustfmt.
24-
pub fn debug_with_rustfmt(input: &TokenStream) {
23+
pub(crate) fn debug_with_rustfmt(input: &TokenStream) {
2524
use std::io::Write;
2625
use std::process::{Command, Stdio};
2726

0 commit comments

Comments
 (0)