about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-05-02 14:00:09 +0000
committerbors <bors@rust-lang.org>2021-05-02 14:00:09 +0000
commit019dfb950252e5df05ac2fc2e7fc9d0197c19619 (patch)
tree880ca5a252f2ed15ccc8c1772cb7929f693e3781 /compiler/rustc_mir/src/transform/coverage/debug.rs
parent841244dff039f6ac344d34da30b63b14a3a4f5c3 (diff)
parent1e22e564e4d272c296a6acb8596831fbaa05bc7b (diff)
downloadrust-019dfb950252e5df05ac2fc2e7fc9d0197c19619.tar.gz
rust-019dfb950252e5df05ac2fc2e7fc9d0197c19619.zip
Auto merge of #7150 - camsteffen:better-conf, r=llogiq
`Conf` macro improvements

changelog: Allow `default_trait_access` in macros

Mainly this is a change to use serde as in [Manually implementing Deserialize for a struct](https://serde.rs/deserialize-struct.html), which opens the door for a cleaner implementation overall.

* Allow `default_trait_access` in macros (tangential, but used in this PR)
* Deserialize into `TryConf { conf, errors }` instead of using a global `ERRORS` variable.
* Improve the `define_Conf!` macro
	* Remove the redundant string literal `(name, "name", ..)`
	* Support deprecated configs with `#[conf_deprecated(message)]`. Message shows in error.
	* Make the default value optional. Use `Default::default()` if omitted.
* Invalid config value error now shows the key (see test output)
* Cleaner `impl Default for Conf` (no `toml::from_str("")`)
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions