rust/src/librustc/middle
Huon Wilson bf6c007760 Change & pat to only work with &T, and &mut with &mut T.
This implements RFC 179 by making the pattern `&<pat>` require matching
against a variable of type `&T`, and introducing the pattern `&mut
<pat>` which only works with variables of type `&mut T`.

The pattern `&mut x` currently parses as `&(mut x)` i.e. a pattern match
through a `&T` or a `&mut T` that binds the variable `x` to have type
`T` and to be mutable. This should be rewritten as follows, for example,

    for &mut x in slice.iter() {

becomes

    for &x in slice.iter() {
        let mut x = x;

Due to this, this is a

[breaking-change]

Closes #20496.
2015-01-05 16:14:17 +11:00
..
cfg Change & pat to only work with &T, and &mut with &mut T. 2015-01-05 16:14:17 +11:00
infer Remove deprecated functionality 2015-01-03 23:43:57 -08:00
traits sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
astconv_util.rs sed -i -s 's/\bmod,/self,/g' **/*.rs 2015-01-03 22:42:21 -05:00
astencode.rs sed -i -s 's/\bmod,/self,/g' **/*.rs 2015-01-03 22:42:21 -05:00
check_const.rs rustc: allow paths in constants to refer to polymorphic items. 2015-01-04 18:47:58 +02:00
check_loop.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
check_match.rs Change & pat to only work with &T, and &mut with &mut T. 2015-01-05 16:14:17 +11:00
check_rvalues.rs Make ty::ParameterEnvironment, not ty::ctxt, implement Typer and 2015-01-03 07:01:21 -05:00
check_static_recursion.rs Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
check_static.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
const_eval.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
dataflow.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
dead.rs sed -i -s 's/\bmod,/self,/g' **/*.rs 2015-01-03 22:42:21 -05:00
def.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
dependency_format.rs Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
effect.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
entry.rs
expr_use_visitor.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
fast_reject.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
graph.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
intrinsicck.rs sed -i -s 's/\bmod,/self,/g' **/*.rs 2015-01-03 22:42:21 -05:00
lang_items.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
liveness.rs auto merge of #20443 : nikomatsakis/rust/autoderef-overloaded-calls, r=pcwalton 2015-01-04 16:36:41 +00:00
mem_categorization.rs Change & pat to only work with &T, and &mut with &mut T. 2015-01-05 16:14:17 +11:00
pat_util.rs rustc: middle: move DefMap from resolve to def. 2014-12-20 07:25:37 +02:00
privacy.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
reachable.rs Fallout of std::str stabilization 2014-12-21 23:31:42 -08:00
recursion_limit.rs
region.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
resolve_lifetime.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
stability.rs Fix an infinite loop in the stability check that was the result of 2015-01-02 04:06:09 -05:00
subst.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
ty_fold.rs Convert the TODO into a FIXME. 2015-01-04 12:01:19 -05:00
ty_walk.rs sed -i -s 's/\bmod,/self,/g' **/*.rs 2015-01-03 22:42:21 -05:00
ty.rs sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs 2015-01-03 22:54:18 -05:00
weak_lang_items.rs librustc: Always parse macro!()/macro![] as expressions if not 2014-12-18 12:09:07 -05:00