]> git.lizzy.rs Git - rust.git/commit
librustc: allow destructuring of structs with destructors if the pattern has no moves.
authorHuon Wilson <dbau.pp+github@gmail.com>
Fri, 10 May 2013 06:12:19 +0000 (16:12 +1000)
committerHuon Wilson <dbau.pp+github@gmail.com>
Fri, 10 May 2013 08:34:19 +0000 (18:34 +1000)
commitf6743fea70e99efc33f6890770da8c0f91723311
treebea6b5eedf23690d16021815c4c1d9d61a665393
parentad8e236f32fccf6ec99025e2ba77f79b4c98d399
librustc: allow destructuring of structs with destructors if the pattern has no moves.

This check only works for `match`s, the checks (incorrectly) do not run for patterns in
`let`s.
src/librustc/middle/check_match.rs
src/librustc/middle/typeck/check/_match.rs
src/test/compile-fail/disallowed-deconstructing-destructing-struct-let.rs [new file with mode: 0644]
src/test/compile-fail/disallowed-deconstructing-destructing-struct-match.rs [new file with mode: 0644]
src/test/compile-fail/disallowed-deconstructing-destructing-struct.rs [deleted file]
src/test/run-pass/issue-6341.rs [new file with mode: 0644]