mirror of https://github.com/rust-lang/rust.git
Re-enable tidy (it was broken) and fix various non-tidy things.
This commit is contained in:
parent
190644063e
commit
c796a8f24d
|
@ -265,12 +265,11 @@ ifneq ($(findstring reformat,$(MAKECMDGOALS)),)
|
|||
include $(CFG_SRC_DIR)/mk/pp.mk
|
||||
endif
|
||||
|
||||
ifneq ($(findstring check,$(MAKECMDGOALS)),)
|
||||
ifneq ($(findstring check,$(MAKECMDGOALS))\
|
||||
$(findstring test,$(MAKECMDGOALS))\
|
||||
$(findstring tidy,$(MAKECMDGOALS)),)
|
||||
include $(CFG_SRC_DIR)/mk/dist.mk
|
||||
include $(CFG_SRC_DIR)/mk/tests.mk
|
||||
else
|
||||
ifneq ($(findstring test,$(MAKECMDGOALS)),)
|
||||
include $(CFG_SRC_DIR)/mk/tests.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(findstring clean,$(MAKECMDGOALS)),)
|
||||
|
|
|
@ -375,7 +375,8 @@ fn truncated_sha1_result(sha1 sha) -> str {
|
|||
|
||||
|
||||
// This calculates STH for a symbol, as defined above
|
||||
fn symbol_hash(ty::ctxt tcx, sha1 sha, &ty::t t, &link_meta link_meta) -> str {
|
||||
fn symbol_hash(ty::ctxt tcx, sha1 sha, &ty::t t,
|
||||
&link_meta link_meta) -> str {
|
||||
// NB: do *not* use abbrevs here as we want the symbol names
|
||||
// to be independent of one another in the crate.
|
||||
|
||||
|
|
|
@ -180,7 +180,8 @@ fn encode_type(&@crate_ctxt cx, &ebml::writer ebml_w, &ty::t typ) {
|
|||
ebml::start_tag(ebml_w, tag_items_data_item_type);
|
||||
auto f = def_to_str;
|
||||
auto ty_str_ctxt =
|
||||
@rec(ds=f, tcx=cx.tcx, abbrevs=tyencode::ac_use_abbrevs(cx.type_abbrevs));
|
||||
@rec(ds=f, tcx=cx.tcx,
|
||||
abbrevs=tyencode::ac_use_abbrevs(cx.type_abbrevs));
|
||||
tyencode::enc_ty(io::new_writer_(ebml_w.writer), ty_str_ctxt, typ);
|
||||
ebml::end_tag(ebml_w);
|
||||
}
|
||||
|
@ -346,7 +347,8 @@ fn encode_info_for_items(&@crate_ctxt cx, &ebml::writer ebml_w) ->
|
|||
vec[tup(int, uint)] {
|
||||
let vec[tup(int, uint)] index = [];
|
||||
ebml::start_tag(ebml_w, tag_items_data);
|
||||
for each (@tup(node_id, middle::ast_map::ast_node) kvp in cx.ast_map.items()) {
|
||||
for each (@tup(node_id, middle::ast_map::ast_node) kvp in
|
||||
cx.ast_map.items()) {
|
||||
alt (kvp._1) {
|
||||
case (middle::ast_map::node_item(?i)) {
|
||||
index += [tup(kvp._0, ebml_w.writer.tell())];
|
||||
|
@ -458,10 +460,10 @@ fn encode_attributes(&ebml::writer ebml_w, &vec[attribute] attrs) {
|
|||
ebml::end_tag(ebml_w);
|
||||
}
|
||||
|
||||
// So there's a special crate attribute called 'link' which defines the metadata
|
||||
// that Rust cares about for linking crates. This attribute requires name and
|
||||
// value attributes, so if the user didn't provide them we will throw them in
|
||||
// anyway with default values.
|
||||
// So there's a special crate attribute called 'link' which defines the
|
||||
// metadata that Rust cares about for linking crates. This attribute requires
|
||||
// name and value attributes, so if the user didn't provide them we will throw
|
||||
// them in anyway with default values.
|
||||
fn synthesize_crate_attrs(&@crate_ctxt cx,
|
||||
&@crate crate) -> vec[attribute] {
|
||||
|
||||
|
|
|
@ -631,7 +631,7 @@ fn find_pre_post_state_stmt(&fn_ctxt fcx, &prestate pres, @stmt s) -> bool {
|
|||
// let int = x; => x is uninit in poststate
|
||||
set_poststate_ann(fcx.ccx, id, pres);
|
||||
clear_in_poststate_ident(fcx, alocal.node.id,
|
||||
alocal.node.ident, id);
|
||||
alocal.node.ident, id);
|
||||
set_prestate(stmt_ann, pres);
|
||||
ret false;
|
||||
}
|
||||
|
|
|
@ -1528,7 +1528,8 @@ fn equal_type_structures(&sty a, &sty b) -> bool {
|
|||
auto len = vec::len[mt](mts_a);
|
||||
if (len != vec::len[mt](mts_b)) { ret false; }
|
||||
auto i = 0u;
|
||||
while (i < len) { if (!equal_mt(mts_a.(i), mts_b.(i))) { ret false; }
|
||||
while (i < len) {
|
||||
if (!equal_mt(mts_a.(i), mts_b.(i))) { ret false; }
|
||||
i += 1u;
|
||||
}
|
||||
ret true;
|
||||
|
|
|
@ -134,7 +134,8 @@ fn visit_item[E](&@item i, &E e, &vt[E] v) {
|
|||
alt (ob.dtor) {
|
||||
case (none) { }
|
||||
case (some(?m)) {
|
||||
vt(v).visit_fn(m.node.meth, [], m.span, some(m.node.ident),
|
||||
vt(v).visit_fn(m.node.meth, [], m.span,
|
||||
some(m.node.ident),
|
||||
m.node.id, e, v);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -154,7 +154,8 @@ void
|
|||
circular_buffer::shrink() {
|
||||
size_t new_buffer_sz = _buffer_sz / 2;
|
||||
I(sched, initial_size() <= new_buffer_sz);
|
||||
DLOG(sched, mem, "circular_buffer is shrinking to %d bytes", new_buffer_sz);
|
||||
DLOG(sched, mem, "circular_buffer is shrinking to %d bytes",
|
||||
new_buffer_sz);
|
||||
void *new_buffer = task->malloc(new_buffer_sz);
|
||||
transfer(new_buffer);
|
||||
task->free(_buffer);
|
||||
|
|
|
@ -47,7 +47,8 @@ last_os_error(rust_task *task) {
|
|||
task->fail(1);
|
||||
return NULL;
|
||||
}
|
||||
rust_str *st = new (mem) rust_str(sched, alloc, fill, (const uint8_t *)buf);
|
||||
rust_str *st = new (mem) rust_str(sched, alloc, fill,
|
||||
(const uint8_t *)buf);
|
||||
|
||||
#ifdef __WIN32__
|
||||
LocalFree((HLOCAL)buf);
|
||||
|
|
|
@ -49,7 +49,8 @@ bool rust_chan::is_associated() {
|
|||
* Unlink this channel from its associated port.
|
||||
*/
|
||||
void rust_chan::disassociate() {
|
||||
A(task->sched, is_associated(), "Channel must be associated with a port.");
|
||||
A(task->sched, is_associated(),
|
||||
"Channel must be associated with a port.");
|
||||
|
||||
if (port->is_proxy() == false) {
|
||||
LOG(task, task,
|
||||
|
|
|
@ -52,7 +52,9 @@ rust_kernel::internal_get_sched_handle(rust_scheduler *sched) {
|
|||
rust_handle<rust_scheduler> *handle = NULL;
|
||||
if (_sched_handles.get(sched, &handle) == false) {
|
||||
handle =
|
||||
new (this) rust_handle<rust_scheduler>(this, sched->message_queue, sched);
|
||||
new (this) rust_handle<rust_scheduler>(this,
|
||||
sched->message_queue,
|
||||
sched);
|
||||
_sched_handles.put(sched, handle);
|
||||
}
|
||||
return handle;
|
||||
|
@ -72,7 +74,8 @@ rust_kernel::get_task_handle(rust_task *task) {
|
|||
rust_handle<rust_task> *handle = NULL;
|
||||
if (_task_handles.get(task, &handle) == false) {
|
||||
handle =
|
||||
new (this) rust_handle<rust_task>(this, task->sched->message_queue,
|
||||
new (this) rust_handle<rust_task>(this,
|
||||
task->sched->message_queue,
|
||||
task);
|
||||
_task_handles.put(task, handle);
|
||||
}
|
||||
|
@ -85,10 +88,10 @@ rust_kernel::get_port_handle(rust_port *port) {
|
|||
_kernel_lock.lock();
|
||||
rust_handle<rust_port> *handle = NULL;
|
||||
if (_port_handles.get(port, &handle) == false) {
|
||||
handle =
|
||||
new (this) rust_handle<rust_port>(this,
|
||||
port->task->sched->message_queue,
|
||||
port);
|
||||
handle = new (this)
|
||||
rust_handle<rust_port>(this,
|
||||
port->task->sched->message_queue,
|
||||
port);
|
||||
_port_handles.put(port, handle);
|
||||
}
|
||||
_kernel_lock.unlock();
|
||||
|
|
|
@ -26,7 +26,8 @@ public:
|
|||
void flush();
|
||||
};
|
||||
|
||||
struct rust_scheduler : public kernel_owned<rust_scheduler>, rc_base<rust_scheduler>
|
||||
struct rust_scheduler : public kernel_owned<rust_scheduler>,
|
||||
rc_base<rust_scheduler>
|
||||
{
|
||||
// Fields known to the compiler:
|
||||
uintptr_t interrupt_flag;
|
||||
|
|
|
@ -339,7 +339,8 @@ rust_str *make_str(rust_task *task, char const *s, size_t fill) {
|
|||
task->fail(3);
|
||||
return NULL;
|
||||
}
|
||||
rust_str *st = new (mem) rust_str(sched, alloc, fill, (uint8_t const *) s);
|
||||
rust_str *st = new (mem) rust_str(sched, alloc, fill,
|
||||
(uint8_t const *) s);
|
||||
LOG(task, mem,
|
||||
"upcall new_str('%s', %" PRIdPTR ") = 0x%" PRIxPTR,
|
||||
s, fill, st);
|
||||
|
|
|
@ -8,9 +8,9 @@ fn main() {
|
|||
log y;
|
||||
do {
|
||||
do {
|
||||
do {
|
||||
x <- y;
|
||||
} while (true);
|
||||
do {
|
||||
x <- y;
|
||||
} while (true);
|
||||
} while (true);
|
||||
} while (true);
|
||||
} while (true);
|
||||
|
|
|
@ -17,9 +17,9 @@ fn main() {
|
|||
print_even(y);
|
||||
do {
|
||||
do {
|
||||
do {
|
||||
y += 1;
|
||||
} while (true);
|
||||
do {
|
||||
y += 1;
|
||||
} while (true);
|
||||
} while (true);
|
||||
} while (true);
|
||||
} while (true);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// error-pattern:can't find crate for 'std'
|
||||
|
||||
use std (name = "std",
|
||||
vers = "bogus");
|
||||
vers = "bogus");
|
|
@ -8,9 +8,9 @@ fn main() {
|
|||
log y;
|
||||
while (true) {
|
||||
while (true) {
|
||||
while (true) {
|
||||
x <- y;
|
||||
}
|
||||
while (true) {
|
||||
x <- y;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,9 +18,9 @@ fn main() {
|
|||
print_even(y);
|
||||
while (true) {
|
||||
while (true) {
|
||||
while (true) {
|
||||
y += x;
|
||||
}
|
||||
while (true) {
|
||||
y += x;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue