Skip to content

Commit 8249ee4

Browse files
committed
---
yaml --- r: 64258 b: refs/heads/snap-stage3 c: 2cd9d7b h: refs/heads/master v: v3
1 parent 826f056 commit 8249ee4

File tree

8 files changed

+18
-60
lines changed

8 files changed

+18
-60
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 0af64ae315abe1d6ba8d30280b8229b57c898744
4+
refs/heads/snap-stage3: 2cd9d7bc88dc4e7c2a1fd25325eb95ff781395b7
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/smallintmap.rs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@
1818

1919
use std::cmp;
2020
use std::container::{Container, Mutable, Map, Set};
21-
use std::iterator::*;
21+
use std::iterator::{Iterator,IteratorUtil,ZipIterator,Counter};
2222
use std::uint;
2323
use std::util::replace;
2424
use std::vec::{VecIterator,VecMutIterator,VecRevIterator,VecMutRevIterator};
25-
use std::vec::VecConsumeIterator;
2625

2726
#[allow(missing_doc)]
2827
pub struct SmallIntMap<T> {
@@ -205,17 +204,6 @@ impl<V> SmallIntMap<V> {
205204
iter: Counter::new(self.len() as int - 1, -1).zip(self.v.mut_rev_iter())
206205
}
207206
}
208-
209-
/// Empties the hash map, moving all values into the specified closure
210-
pub fn consume(&mut self)
211-
-> FilterMapIterator<(uint, Option<V>), (uint, V),
212-
EnumerateIterator<Option<V>, VecConsumeIterator<Option<V>>>>
213-
{
214-
let values = replace(&mut self.v, ~[]);
215-
values.consume_iter().enumerate().filter_map(|(i, v)| {
216-
v.map_consume(|v| (i, v))
217-
})
218-
}
219207
}
220208

221209
impl<V:Copy> SmallIntMap<V> {
@@ -637,21 +625,6 @@ mod tests {
637625

638626
assert!(a.iter().all(|(_,v)| *v == 5 ));
639627
}
640-
641-
#[test]
642-
fn test_consume() {
643-
let mut m = SmallIntMap::new();
644-
m.insert(1, ~2);
645-
let mut called = false;
646-
for m.consume().advance |(k, v)| {
647-
assert!(!called);
648-
called = true;
649-
assert_eq!(k, 1);
650-
assert_eq!(v, ~2);
651-
}
652-
assert!(called);
653-
m.insert(2, ~1);
654-
}
655628
}
656629

657630
#[cfg(test)]

branches/snap-stage3/src/librustc/middle/lint.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ fn check_item_ctypes(cx: &Context, it: &ast::item) {
741741
_ => ()
742742
}
743743
}
744+
ast::ty_ptr(ref mt) => { check_ty(cx, mt.ty) }
744745
_ => ()
745746
}
746747
}

branches/snap-stage3/src/libstd/unstable/global.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ avoid hitting the mutex.
2828
use cast::{transmute};
2929
use clone::Clone;
3030
use kinds::Send;
31-
use libc::{c_void};
31+
use libc::{c_void, intptr_t};
3232
use option::{Option, Some, None};
3333
use ops::Drop;
3434
use unstable::sync::{Exclusive, exclusive};
@@ -228,7 +228,7 @@ fn key_ptr<T:Send>(key: GlobalDataKey<T>) -> uint {
228228
}
229229

230230
extern {
231-
fn rust_get_global_data_ptr() -> *mut int;
231+
fn rust_get_global_data_ptr() -> *mut intptr_t;
232232
}
233233

234234
#[test]

branches/snap-stage3/src/rt/rust_builtin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ rust_register_exit_function(spawn_fn runner, fn_env_pair *f) {
774774
task->kernel->register_exit_function(runner, f);
775775
}
776776

777-
extern "C" void *
777+
extern "C" intptr_t*
778778
rust_get_global_data_ptr() {
779779
rust_task *task = rust_get_current_task();
780780
return &task->kernel->global_data;

branches/snap-stage3/src/rt/rust_kernel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class rust_kernel {
124124

125125
public:
126126
struct rust_env *env;
127-
uintptr_t global_data;
127+
intptr_t global_data;
128128

129129
rust_kernel(rust_env *env);
130130

branches/snap-stage3/src/test/compile-fail/warn-ctypes-err-attr.rs renamed to branches/snap-stage3/src/test/compile-fail/lint-ctypes.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,19 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// error-pattern:found rust type
1211
#[deny(ctypes)];
1312

14-
mod libc {
15-
#[nolink]
16-
pub extern {
17-
pub fn malloc(size: int) -> *u8;
18-
}
13+
use std::libc;
14+
15+
#[nolink]
16+
extern {
17+
pub fn bare_type1(size: int); //~ ERROR: found rust type
18+
pub fn bare_type2(size: uint); //~ ERROR: found rust type
19+
pub fn ptr_type1(size: *int); //~ ERROR: found rust type
20+
pub fn ptr_type2(size: *uint); //~ ERROR: found rust type
21+
22+
pub fn good1(size: *libc::c_int);
23+
pub fn good2(size: *libc::c_uint);
1924
}
2025

2126
fn main() {

branches/snap-stage3/src/test/compile-fail/warn-ctypes.rs

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)