Skip to content

Commit 28fef93

Browse files
committed
---
yaml --- r: 139050 b: refs/heads/try2 c: deeeaf0 h: refs/heads/master v: v3
1 parent c5b0fd7 commit 28fef93

File tree

9 files changed

+31
-65
lines changed

9 files changed

+31
-65
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: b53da4b9dd977fdffba3f10e570d7c025238dec3
8+
refs/heads/try2: deeeaf0ddbe3c5244442f3d12d0eaed512d65e75
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcore/cleanup.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ unsafe fn each_live_alloc(f: &fn(box: *mut BoxRepr, uniq: bool) -> bool) {
145145

146146
#[cfg(unix)]
147147
fn debug_mem() -> bool {
148-
::rt::env::get().debug_mem
148+
use os;
149+
use libc;
150+
do os::as_c_charp("RUST_DEBUG_MEM") |p| {
151+
unsafe { libc::getenv(p) != null() }
152+
}
149153
}
150154

151155
#[cfg(windows)]

branches/try2/src/libcore/rt/env.rs

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

branches/try2/src/libcore/rt/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ mod work_queue;
4545
mod stack;
4646
mod context;
4747
mod thread;
48-
pub mod env;

branches/try2/src/librustdoc/prune_private_pass.rs

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,19 @@ fn is_visible(srv: astsrv::Srv, doc: doc::ItemDoc) -> bool {
5959
do astsrv::exec(srv) |ctxt| {
6060
match ctxt.ast_map.get(&id) {
6161
ast_map::node_item(item, _) => {
62-
item.vis == ast::public
62+
match item.node {
63+
ast::item_impl(_, Some(_), _, _) => {
64+
// This is a trait implementation, make it visible
65+
// NOTE: This is not quite right since this could be an impl
66+
// of a private trait. We can't know that without running
67+
// resolve though.
68+
true
69+
}
70+
_ => {
71+
// Otherwise just look at the visibility
72+
item.vis == ast::public
73+
}
74+
}
6375
}
6476
_ => util::unreachable()
6577
}
@@ -72,6 +84,16 @@ fn should_prune_items_without_pub_modifier() {
7284
fail_unless!(vec::is_empty(doc.cratemod().mods()));
7385
}
7486

87+
#[test]
88+
fn unless_they_are_trait_impls() {
89+
let doc = test::mk_doc(
90+
~" \
91+
trait Foo { } \
92+
impl Foo for int { } \
93+
");
94+
fail_unless!(!doc.cratemod().impls().is_empty());
95+
}
96+
7597
#[cfg(test)]
7698
pub mod test {
7799
use astsrv;

branches/try2/src/rt/rust_builtin.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -876,11 +876,6 @@ rust_dbg_extern_identity_u8(char u) {
876876
return u;
877877
}
878878

879-
extern "C" rust_env*
880-
rust_get_rt_env() {
881-
rust_task *task = rust_get_current_task();
882-
return task->kernel->env;
883-
}
884879

885880
//
886881
// Local Variables:

branches/try2/src/rt/rust_env.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#define DETAILED_LEAKS "DETAILED_LEAKS"
2424
#define RUST_SEED "RUST_SEED"
2525
#define RUST_POISON_ON_FREE "RUST_POISON_ON_FREE"
26-
#define RUST_DEBUG_MEM "RUST_DEBUG_MEM"
2726

2827
#if defined(__WIN32__)
2928
static int
@@ -129,7 +128,6 @@ load_env(int argc, char **argv) {
129128
env->poison_on_free = getenv(RUST_POISON_ON_FREE) != NULL;
130129
env->argc = argc;
131130
env->argv = argv;
132-
env->debug_mem = getenv(RUST_DEBUG_MEM) != NULL;
133131
return env;
134132
}
135133

branches/try2/src/rt/rust_env.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,16 @@
1414

1515
#include "rust_globals.h"
1616

17-
// Avoiding 'bool' type here since I'm not sure it has a standard size
18-
typedef uint8_t rust_bool;
19-
2017
struct rust_env {
2118
size_t num_sched_threads;
2219
size_t min_stack_size;
2320
size_t max_stack_size;
2421
char* logspec;
25-
rust_bool detailed_leaks;
22+
bool detailed_leaks;
2623
char* rust_seed;
27-
rust_bool poison_on_free;
24+
bool poison_on_free;
2825
int argc;
2926
char **argv;
30-
rust_bool debug_mem;
3127
};
3228

3329
rust_env* load_env(int argc, char **argv);

branches/try2/src/rt/rustrt.def.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,3 @@ rust_dbg_extern_identity_u64
201201
rust_dbg_extern_identity_TwoU64s
202202
rust_dbg_extern_identity_double
203203
rust_dbg_extern_identity_u8
204-
rust_get_rt_env

0 commit comments

Comments
 (0)