Skip to content

Register new snapshots #17769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/librustc/middle/resolve.rs
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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