Skip to content

Commit

Permalink
auto merge of #17769 : dotdash/rust/snapshot, r=eddyb
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Oct 4, 2014
2 parents 749ff5e + 2d93a04 commit 20f4c45
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
7 changes: 2 additions & 5 deletions src/librustc/middle/resolve.rs
Expand Up @@ -5852,11 +5852,8 @@ impl<'a> Resolver<'a> {
visit::walk_expr(self, expr);
}

ExprFnBlock(_, ref fn_decl, ref block) => {
// NOTE(stage0): After snapshot, change to:
//
//self.capture_mode_map.insert(expr.id, capture_clause);
self.capture_mode_map.insert(expr.id, ast::CaptureByRef);
ExprFnBlock(capture_clause, ref fn_decl, ref block) => {
self.capture_mode_map.insert(expr.id, capture_clause);
self.resolve_function(ClosureRibKind(expr.id, ast::DUMMY_NODE_ID),
Some(&**fn_decl), NoTypeParameters,
&**block);
Expand Down
8 changes: 2 additions & 6 deletions src/libsyntax/codemap.rs
Expand Up @@ -291,10 +291,8 @@ impl FileMap {

/// get a line from the list of pre-computed line-beginnings
///
/// NOTE(stage0, pcwalton): Remove `#[allow(unused_mut)]` after snapshot.
#[allow(unused_mut)]
pub fn get_line(&self, line: int) -> String {
let mut lines = self.lines.borrow_mut();
let lines = self.lines.borrow();
let begin: BytePos = *lines.get(line as uint) - self.start_pos;
let begin = begin.to_uint();
let slice = self.src.as_slice().slice_from(begin);
Expand Down Expand Up @@ -515,16 +513,14 @@ impl CodeMap {
return a;
}

// NOTE(stage0, pcwalton): Remove `#[allow(unused_mut)]` after snapshot.
#[allow(unused_mut)]
fn lookup_line(&self, pos: BytePos) -> FileMapAndLine {
let idx = self.lookup_filemap_idx(pos);

let files = self.files.borrow();
let f = files.get(idx).clone();
let mut a = 0u;
{
let mut lines = f.lines.borrow_mut();
let lines = f.lines.borrow();
let mut b = lines.len();
while b - a > 1u {
let m = (a + b) / 2u;
Expand Down
9 changes: 9 additions & 0 deletions src/snapshots.txt
@@ -1,3 +1,12 @@
S 2014-10-04 749ff5e
freebsd-x86_64 f39d94487d29b3d48217b1295ad2cda8c941e694
linux-i386 555aca74f9a268f80cab2df1147dc6406403e9e4
linux-x86_64 6a43c2f6c8ba2cbbcb9da1f7b58f748aef99f431
macos-i386 331bd7ef519cbb424188c546273e8c7d738f0894
macos-x86_64 2c83a79a9febfe1d326acb17c3af76ba053c6ca9
winnt-i386 fcf0526e5dc7ca4b149e074ff056ac03e2240ac7
winnt-x86_64 611f19816fbfe0730b1fee51481b8d25dd78fa10

S 2014-09-28 7eb9337
freebsd-x86_64 d45e0edd44f40a976ea0affaadd98732684cfca0
linux-i386 3acb35755aa62b7ff78f76007d9a70696fce7aa7
Expand Down

0 comments on commit 20f4c45

Please sign in to comment.