Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
Fix bug resizing attribute vec
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Aug 18, 2015
1 parent c8efb64 commit 53c2ed4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion syntex_syntax/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "syntex_syntax"
version = "0.11.0"
version = "0.11.1"
authors = [ "[email protected]" ]
license = "MIT/Apache-2.0"
description = "Export of libsyntax for code generation"
Expand Down
4 changes: 2 additions & 2 deletions syntex_syntax/src/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ pub fn mark_used(attr: &Attribute) {
let idx = (id / 64) as usize;
let shift = id % 64;
if slot.borrow().len() <= idx {
slot.borrow_mut().extend(
(slot.borrow().len() .. idx).map(|_| 0));
let len = slot.borrow().len();
slot.borrow_mut().extend((0 .. (idx + 1 - len)).map(|_| 0));
}
slot.borrow_mut()[idx] |= 1 << shift;
});
Expand Down

0 comments on commit 53c2ed4

Please sign in to comment.