third_party_rust_syn/codegen/src
David Tolnay c6ce512015
Switch non exhaustive syntax tree enums to use #[non_exhaustive]
This follows through on the comments on the __TestExhaustive variants
promising that their purpose will be substituted with a deny(reachable)
rustc lint once one is available.

That lint is now landing as non_exhaustive_omitted_patterns in Rust 1.57.
The correct way to use it for checking exhaustivity of a match is:

    match expr {
        Expr::Array(e) => {...}
        Expr::Assign(e) => {...}
        ...
        Expr::Yield(e) => {...}

        #[cfg_attr(test, deny(non_exhaustive_omitted_patterns))]
        _ => { /* some sane fallback */ }
    }
2022-03-27 14:19:01 -07:00
..
cfg.rs Factor out features-to-cfg conversion for reuse 2020-08-16 20:02:07 -07:00
clone.rs Switch non exhaustive syntax tree enums to use #[non_exhaustive] 2022-03-27 14:19:01 -07:00
debug.rs Switch non exhaustive syntax tree enums to use #[non_exhaustive] 2022-03-27 14:19:01 -07:00
eq.rs Emit imports in rustfmt's preferred order 2022-01-11 13:35:29 -08:00
file.rs Replace rustfmt with prettyplease crate 2022-01-12 10:01:19 -08:00
fold.rs Switch non exhaustive syntax tree enums to use #[non_exhaustive] 2022-03-27 14:19:01 -07:00
full.rs Factor out full macro 2019-05-08 18:47:13 -07:00
gen.rs Factor out features-to-cfg conversion for reuse 2020-08-16 20:02:07 -07:00
hash.rs Switch non exhaustive syntax tree enums to use #[non_exhaustive] 2022-03-27 14:19:01 -07:00
json.rs Switch codegen error handling to anyhow 2019-11-30 14:28:19 -08:00
lookup.rs Factor out codegen node lookup for reuse 2020-08-16 20:59:57 -07:00
main.rs Pre-expand Clone derives 2020-08-16 23:55:49 -07:00
operand.rs Consolidate Operand code 2019-05-08 18:47:13 -07:00
parse.rs Do nonexhaustive detection based on doc(hidden) attribute 2021-01-24 00:12:58 -08:00
snapshot.rs Factor out codegen node lookup for reuse 2020-08-16 20:59:57 -07:00
version.rs Condense some import blocks 2020-09-05 22:04:36 -07:00
visit_mut.rs Switch non exhaustive syntax tree enums to use #[non_exhaustive] 2022-03-27 14:19:01 -07:00
visit.rs Switch non exhaustive syntax tree enums to use #[non_exhaustive] 2022-03-27 14:19:01 -07:00