]> git.lizzy.rs Git - rust.git/commit
librustc: Check function argument patterns for legality of by-move
authorPatrick Walton <pcwalton@mimiga.net>
Tue, 24 Jun 2014 20:41:42 +0000 (13:41 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 25 Jun 2014 00:23:41 +0000 (17:23 -0700)
commit75146fd59cfa45024f70840558914b3de3158afa
treeb99fb6c93649d611ed0e491ce7db7e2f290649f1
parent5ccf056a024b0769d7adc22f57eda8d75ae07a58
librustc: Check function argument patterns for legality of by-move
bindings.

This will break code that incorrectly did things like:

    fn f(a @ box b: Box<String>) {}

Fix such code to not rely on undefined behavior.

Closes #12534.

[breaking-change]
src/librustc/middle/check_match.rs
src/test/compile-fail/bind-by-move-no-sub-bindings-fun-args.rs [new file with mode: 0644]