mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-27 01:41:05 +00:00
c6ce512015
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 */ } } |
||
---|---|---|
.. | ||
cfg.rs | ||
clone.rs | ||
debug.rs | ||
eq.rs | ||
file.rs | ||
fold.rs | ||
full.rs | ||
gen.rs | ||
hash.rs | ||
json.rs | ||
lookup.rs | ||
main.rs | ||
operand.rs | ||
parse.rs | ||
snapshot.rs | ||
version.rs | ||
visit_mut.rs | ||
visit.rs |