diff options
| author | bors <bors@rust-lang.org> | 2014-06-10 09:49:29 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-10 09:49:29 -0700 |
| commit | 9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6 (patch) | |
| tree | 6b900931014b0ea0ed76e2b6ee5ab2f78583b165 /src/libstd | |
| parent | 0ee6a8e8a564ec0134ebdc0869fab5e4bb28024c (diff) | |
| parent | 8e34f647ee5db795e1ea46715de61cee63f4f4a7 (diff) | |
| download | rust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.tar.gz rust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.zip | |
auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichton
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code. The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/collections/hashmap.rs | 5 | ||||
| -rw-r--r-- | src/libstd/rt/backtrace.rs | 1 | ||||
| -rw-r--r-- | src/libstd/task.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/libstd/collections/hashmap.rs b/src/libstd/collections/hashmap.rs index a780b63bfd0..34851265409 100644 --- a/src/libstd/collections/hashmap.rs +++ b/src/libstd/collections/hashmap.rs @@ -393,7 +393,7 @@ mod table { } pub fn move_iter(self) -> MoveEntries<K, V> { - MoveEntries { table: self, idx: 0, elems_seen: 0 } + MoveEntries { table: self, idx: 0 } } } @@ -428,8 +428,7 @@ mod table { /// Iterator over the entries in a table, consuming the table. pub struct MoveEntries<K, V> { table: RawTable<K, V>, - idx: uint, - elems_seen: uint, + idx: uint } impl<'a, K, V> Iterator<(&'a K, &'a V)> for Entries<'a, K, V> { diff --git a/src/libstd/rt/backtrace.rs b/src/libstd/rt/backtrace.rs index 423f372f018..a1372b51d47 100644 --- a/src/libstd/rt/backtrace.rs +++ b/src/libstd/rt/backtrace.rs @@ -325,6 +325,7 @@ mod imp { #[cfg(target_os = "macos")] fn print(w: &mut Writer, idx: int, addr: *libc::c_void) -> IoResult<()> { use intrinsics; + #[repr(C)] struct Dl_info { dli_fname: *libc::c_char, dli_fbase: *libc::c_void, diff --git a/src/libstd/task.rs b/src/libstd/task.rs index 9ee62ee3d81..a4e1ad84252 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -84,7 +84,7 @@ pub struct TaskBuilder { /// Options to spawn the new task with pub opts: TaskOpts, gen_body: Option<proc(v: proc():Send):Send -> proc():Send>, - nocopy: Option<marker::NoCopy>, + nocopy: marker::NoCopy, } impl TaskBuilder { @@ -94,7 +94,7 @@ impl TaskBuilder { TaskBuilder { opts: TaskOpts::new(), gen_body: None, - nocopy: None, + nocopy: marker::NoCopy, } } |
