]> git.lizzy.rs Git - rust.git/commit
syntax: make OptVec immutable.
authorHuon Wilson <dbau.pp+github@gmail.com>
Wed, 19 Mar 2014 12:16:56 +0000 (23:16 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Thu, 20 Mar 2014 23:52:48 +0000 (10:52 +1100)
commit7785fe191651fb42a6300a399d61414bf49dffb3
tree1d58655556eac689f63b20f5944dd7e806d50de4
parent7334c11b4b196e39da2418a239e2ff916896fa19
syntax: make OptVec immutable.

This is the first step to replacing OptVec with a new representation:
remove all mutability. Any mutations have to go via `Vec` and then make
to `OptVec`.

Many of the uses of OptVec are unnecessary now that Vec has no-alloc
emptiness (and have been converted to Vec): the only ones that really
need it are the AST and sty's (and so on) where there are a *lot* of
instances of them, and they're (mostly) immutable.
15 files changed:
src/librustc/metadata/tydecode.rs
src/librustc/middle/borrowck/move_data.rs
src/librustc/middle/cfg/construct.rs
src/librustc/middle/cfg/mod.rs
src/librustc/middle/resolve_lifetime.rs
src/librustc/middle/trans/cleanup.rs
src/librustc/middle/ty.rs
src/librustc/middle/typeck/check/method.rs
src/librustc/middle/typeck/infer/combine.rs
src/librustc/middle/typeck/infer/error_reporting.rs
src/librustc/middle/typeck/infer/region_inference/mod.rs
src/librustc/middle/typeck/variance.rs
src/libsyntax/ext/deriving/generic.rs
src/libsyntax/opt_vec.rs
src/libsyntax/parse/parser.rs