Skip to content

Use proc macro to define Config #3873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ dirs = "2.0.1"
ignore = "0.4.6"
annotate-snippets = { version = "0.6", features = ["ansi_term"] }
structopt = "0.3"
rustfmt-config_proc_macro = { version = "0.2", path = "config_proc_macro" }
thiserror = "1.0"
lazy_static = "1.0.0"

rustfmt-config_proc_macro = { version = "0.3", path = "config_proc_macro" }

# A noop dependency that changes in the Rust repository, it's a bit of a hack.
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`
# for more information.
Expand Down
14 changes: 0 additions & 14 deletions Configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2435,17 +2435,3 @@ Break comments to fit on the line
// exercitation ullamco laboris nisi ut aliquip ex ea
// commodo consequat.
```

# Internal Options

## `emit_mode`

Internal option

## `make_backup`

Internal option, use `--backup`

## `print_misformatted_file_names`

Internal option, use `-l` or `--files-with-diff`
3 changes: 2 additions & 1 deletion config_proc_macro/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
target/
target/
Cargo.lock
68 changes: 0 additions & 68 deletions config_proc_macro/Cargo.lock

This file was deleted.

4 changes: 3 additions & 1 deletion config_proc_macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rustfmt-config_proc_macro"
version = "0.2.0"
version = "0.3.0"
authors = ["topecongiro <[email protected]>"]
edition = "2018"
description = "A collection of procedural macros for rustfmt"
Expand All @@ -15,9 +15,11 @@ proc-macro = true
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "1.0", features = ["full", "visit"] }
thiserror = "1.0"

[dev-dependencies]
serde = { version = "1.0", features = ["derive"] }
toml = "0.5"

[features]
default = []
Expand Down
Loading