]> git.lizzy.rs Git - rust.git/commit
Auto merge of #45394 - davidtwco:rfc-2008, r=petrochenkov
authorbors <bors@rust-lang.org>
Sat, 4 Nov 2017 18:07:07 +0000 (18:07 +0000)
committerbors <bors@rust-lang.org>
Sat, 4 Nov 2017 18:07:07 +0000 (18:07 +0000)
commitd762b1d6c67db12e117186d94d70e46cddb22965
treecbb52929585ad9ea4e52a9dde6e9170375ccf04a
parent98e4b6845f111d297fa2bff759b6f15855280161
parent86c62d02eebb037faf7c0752a9c472181e5608cb
Auto merge of #45394 - davidtwco:rfc-2008, r=petrochenkov

RFC 2008: Future-proofing enums/structs with #[non_exhaustive] attribute

This work-in-progress pull request contains my changes to implement [RFC 2008](https://github.com/rust-lang/rfcs/pull/2008). The related tracking issue is #44109.

As of writing, enum-related functionality is not included and there are some issues related to tuple/unit structs. Enum related tests are currently ignored.

WIP PR requested by @nikomatsakis [in Gitter](https://gitter.im/rust-impl-period/WG-compiler-middle?at=59e90e6297cedeb0482ade3e).
src/librustc/ty/mod.rs
src/librustc_metadata/encoder.rs
src/librustc_passes/ast_validation.rs
src/librustc_privacy/lib.rs
src/librustc_resolve/build_reduced_graph.rs
src/librustc_typeck/diagnostics.rs
src/libsyntax/feature_gate.rs