]> git.lizzy.rs Git - rust.git/commit
Induce an empty loan for the value being matched in match expressions
authorJakub Wieczorek <jakub@jakub.cc>
Sat, 20 Sep 2014 17:32:18 +0000 (19:32 +0200)
committerJakub Wieczorek <jakub@jakub.cc>
Sat, 20 Sep 2014 19:01:29 +0000 (21:01 +0200)
commit7b08827f2ddef8e80c176baa8d9f12561a06f1ee
tree49cd36f67e08c7549366395220208dfe5d28cd6f
parent5d335c94bd9017f16ce7538a5f4063e1178f15a1
Induce an empty loan for the value being matched in match expressions

This is to make sure it hadn't been moved if there are no bindings
in any of the arms.

Fixes #17385.
src/librustc/middle/borrowck/check_loans.rs
src/librustc/middle/borrowck/mod.rs
src/librustc/middle/expr_use_visitor.rs
src/librustc/middle/ty.rs
src/test/compile-fail/issue-13359.rs [new file with mode: 0644]
src/test/compile-fail/issue-17385.rs [new file with mode: 0644]
src/test/compile-fail/issue13359.rs [deleted file]