`T: Iterator<A>` and `U: Iterator<A>` should be able to `chain` whether `T` and `U` are same or not.
let testfile = testfile.to_str();
test::DynTestFn(|| runtest::run(config, testfile))
}
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub use sys;
pub use pipes;
}
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
assert_eq!(vec::len(lefts), 0u);
assert_eq!(vec::len(rights), 0u);
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
}
-#[test]
+#[cfg(test)]
mod test_map {
use container::{Container, Map, Set};
use option::{None, Some};
}
}
-#[test]
+#[cfg(test)]
mod test_set {
use super::*;
use container::{Container, Map, Set};
}
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
}
}
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
*/
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
-
assert_eq!(Primitive::bytes::<f32>(), sys::size_of::<f32>());
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
assert_eq!(Primitive::bytes::<f64>(), sys::size_of::<f64>());
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
assert_eq!(to_str_digits(-infinity, 10u), ~"-inf");
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
let no_stuff: Option<int> = None;
assert!(no_stuff.get_or_zero() == 0);
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
}
}
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
}
-#[test]
+#[cfg(test)]
struct P {a: int, b: float}
#[test]
test_destroy_actually_kills(true);
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
#[should_fail]
fn fail_owned() { FailWithCause::fail_with(~"cause", file!(), line!()) }
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
po.recv();
}
-#[test]
+#[cfg(test)]
struct Wrapper {
mut f: Option<Chan<()>>
}
let _s = fmt!("%s", s);
}
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
crate_map: *c_void) -> c_int;
}
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
/**
- * Creates and initializes an immutable vector.
+ * Creates and initializes an owned vector.
*
- * Creates an immutable vector of size `n_elts` and initializes the elements
+ * Creates an owned vector of size `n_elts` and initializes the elements
* to the value returned by the function `op`.
*/
pub fn from_fn<T>(n_elts: uint, op: old_iter::InitOp<T>) -> ~[T] {
}
/**
- * Creates and initializes an immutable vector.
+ * Creates and initializes an owned vector.
*
- * Creates an immutable vector of size `n_elts` and initializes the elements
+ * Creates an owned vector of size `n_elts` and initializes the elements
* to the value `t`.
*/
pub fn from_elem<T:Copy>(n_elts: uint, t: T) -> ~[T] {
error!("Fuzzer done");
}
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub fn yield_glue_name() -> ~str { return ~"rust_yield_glue"; }
pub fn no_op_type_glue_name() -> ~str { return ~"rust_no_op_type_glue"; }
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
cc_args: ~[~"-marm"]
};
}
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
return args;
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
cc_args: ~[]
};
}
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
nothrow(dv(~"reset_stack_limit", ~[]))
}
}
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
cc_args: ~[~"-m32"]
};
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
cc_args: ~[~"-m64"]
};
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
assert!((vec::len(test_items) == 1u));
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub type Session = @Session_;
pub impl Session_ {
- fn span_fatal(@self, sp: span, msg: ~str) -> ! {
+ fn span_fatal(@self, sp: span, msg: &str) -> ! {
self.span_diagnostic.span_fatal(sp, msg)
}
- fn fatal(@self, msg: ~str) -> ! {
+ fn fatal(@self, msg: &str) -> ! {
self.span_diagnostic.handler().fatal(msg)
}
- fn span_err(@self, sp: span, msg: ~str) {
+ fn span_err(@self, sp: span, msg: &str) {
self.span_diagnostic.span_err(sp, msg)
}
- fn err(@self, msg: ~str) {
+ fn err(@self, msg: &str) {
self.span_diagnostic.handler().err(msg)
}
fn has_errors(@self) -> bool {
fn abort_if_errors(@self) {
self.span_diagnostic.handler().abort_if_errors()
}
- fn span_warn(@self, sp: span, msg: ~str) {
+ fn span_warn(@self, sp: span, msg: &str) {
self.span_diagnostic.span_warn(sp, msg)
}
- fn warn(@self, msg: ~str) {
+ fn warn(@self, msg: &str) {
self.span_diagnostic.handler().warn(msg)
}
- fn span_note(@self, sp: span, msg: ~str) {
+ fn span_note(@self, sp: span, msg: &str) {
self.span_diagnostic.span_note(sp, msg)
}
- fn note(@self, msg: ~str) {
+ fn note(@self, msg: &str) {
self.span_diagnostic.handler().note(msg)
}
- fn span_bug(@self, sp: span, msg: ~str) -> ! {
+ fn span_bug(@self, sp: span, msg: &str) -> ! {
self.span_diagnostic.span_bug(sp, msg)
}
- fn bug(@self, msg: ~str) -> ! {
+ fn bug(@self, msg: &str) -> ! {
self.span_diagnostic.handler().bug(msg)
}
- fn span_unimpl(@self, sp: span, msg: ~str) -> ! {
+ fn span_unimpl(@self, sp: span, msg: &str) -> ! {
self.span_diagnostic.span_unimpl(sp, msg)
}
- fn unimpl(@self, msg: ~str) -> ! {
+ fn unimpl(@self, msg: &str) -> ! {
self.span_diagnostic.handler().unimpl(msg)
}
- fn span_lint_level(@self, level: lint::level, sp: span, msg: ~str) {
+ fn span_lint_level(@self, level: lint::level, sp: span, msg: &str) {
match level {
lint::allow => { },
lint::warn => self.span_warn(sp, msg),
expr_id: ast::node_id,
item_id: ast::node_id,
span: span,
- msg: ~str) {
+ msg: &str) {
let level = lint::get_lint_settings_level(
self.lint_settings, lint_mode, expr_id, item_id);
self.span_lint_level(level, span, msg);
assert!(building_library(lib_crate, crate, true));
}
}
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
})
})
}
-
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
debug!("current path: %s",
ast_util::path_name_i(copy cx.path, cx.sess.parse_sess.interner));
- if is_test_fn(i) || is_bench_fn(i) {
+ if is_test_fn(cx, i) || is_bench_fn(i) {
match i.node {
ast::item_fn(_, purity, _, _, _) if purity == ast::unsafe_fn => {
let sess = cx.sess;
return res;
}
-fn is_test_fn(i: @ast::item) -> bool {
+fn is_test_fn(cx: @mut TestCtxt, i: @ast::item) -> bool {
let has_test_attr = !attr::find_attrs_by_name(i.attrs,
~"test").is_empty();
}
}
+ if has_test_attr && !has_test_signature(i) {
+ let sess = cx.sess;
+ sess.span_err(
+ i.span,
+ ~"functions used as tests must have signature fn() -> ()."
+ );
+ }
return has_test_attr && has_test_signature(i);
}
);
e
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
return @mut cnum_map;
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
let cdata = cstore::get_crate_data(cstore, crate_num);
decoder::get_link_args_for_crate(cdata)
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
sorted.map(|ch| /*bad*/copy *ch.hash)
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
result
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
tyencode::enc_ty(wr, cx, t);
}
}
-
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
@bounds
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
w.write_char('|');
enc_bounds(w, cx, v.bounds);
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
expr_unary(deref, _) => { }
expr_unary(box(_), _) | expr_unary(uniq(_), _) => {
sess.span_err(e.span,
- ~"disallowed operator in constant expression");
+ "disallowed operator in constant expression");
return;
}
expr_lit(@codemap::spanned {node: lit_str(_), _}) => { }
expr_binary(_, _, _) | expr_unary(_, _) => {
if method_map.contains_key(&e.id) {
- sess.span_err(e.span, ~"user-defined operators are not \
+ sess.span_err(e.span, "user-defined operators are not \
allowed in constant expressions");
}
}
// a path in trans::callee that only works in block contexts.
if pth.types.len() != 0 {
sess.span_err(
- e.span, ~"paths in constants may only refer to \
- items without type parameters");
+ e.span, "paths in constants may only refer to \
+ items without type parameters");
}
match def_map.find(&e.id) {
Some(&def_const(_)) |
debug!("(checking const) found bad def: %?", def);
sess.span_err(
e.span,
- fmt!("paths in constants may only refer to \
- constants or functions"));
+ "paths in constants may only refer to \
+ constants or functions");
}
None => {
- sess.span_bug(e.span, ~"unbound path in const?!");
+ sess.span_bug(e.span, "unbound path in const?!");
}
}
}
_ => {
sess.span_err(
e.span,
- ~"function calls in constants are limited to \
- struct and enum constructors");
+ "function calls in constants are limited to \
+ struct and enum constructors");
}
}
}
expr_addr_of(*) => {
sess.span_err(
e.span,
- ~"borrowed pointers in constants may only refer to \
- immutable values");
+ "borrowed pointers in constants may only refer to \
+ immutable values");
}
_ => {
sess.span_err(e.span,
- ~"constant contains unimplemented expression type");
+ "constant contains unimplemented expression type");
return;
}
}
if t != ty_char {
if (v as u64) > ast_util::int_ty_max(
if t == ty_i { sess.targ_cfg.int_type } else { t }) {
- sess.span_err(e.span, ~"literal out of range for its type");
+ sess.span_err(e.span, "literal out of range for its type");
}
}
}
expr_lit(@codemap::spanned {node: lit_uint(v, t), _}) => {
if v > ast_util::uint_ty_max(
if t == ty_u { sess.targ_cfg.uint_type } else { t }) {
- sess.span_err(e.span, ~"literal out of range for its type");
+ sess.span_err(e.span, "literal out of range for its type");
}
}
_ => ()
fn visit_item(it: @item, env: env, v: visit::vt<env>) {
if env.idstack.contains(&(it.id)) {
- env.sess.span_fatal(env.root_it.span, ~"recursive constant");
+ env.sess.span_fatal(env.root_it.span, "recursive constant");
}
env.idstack.push(it.id);
visit::visit_item(it, env, v);
visit::visit_expr(e, env, v);
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
expr_break(_) => {
if !cx.in_loop {
- tcx.sess.span_err(e.span, ~"`break` outside of loop");
+ tcx.sess.span_err(e.span, "`break` outside of loop");
}
}
expr_again(_) => {
if !cx.in_loop {
- tcx.sess.span_err(e.span, ~"`again` outside of loop");
+ tcx.sess.span_err(e.span, "`again` outside of loop");
}
}
expr_ret(oe) => {
if !cx.can_ret {
- tcx.sess.span_err(e.span, ~"`return` in block function");
+ tcx.sess.span_err(e.span, "`return` in block function");
}
visit::visit_expr_opt(oe, cx, v);
}
}
let arms = vec::concat(arms.filter_mapped(unguarded_pat));
if arms.is_empty() {
- cx.tcx.sess.span_err(ex.span, ~"non-exhaustive patterns");
+ cx.tcx.sess.span_err(ex.span, "non-exhaustive patterns");
} else {
check_exhaustive(cx, ex.span, arms);
}
let v = ~[*pat];
match is_useful(cx, &seen, v) {
not_useful => {
- cx.tcx.sess.span_err(pat.span, ~"unreachable pattern");
+ cx.tcx.sess.span_err(pat.span, "unreachable pattern");
}
_ => ()
}
visit::visit_local(loc, s, v);
if is_refutable(cx, loc.node.pat) {
cx.tcx.sess.span_err(loc.node.pat.span,
- ~"refutable pattern in local binding");
+ "refutable pattern in local binding");
}
// Check legality of move bindings.
for decl.inputs.each |input| {
if is_refutable(cx, input.pat) {
cx.tcx.sess.span_err(input.pat.span,
- ~"refutable pattern in function argument");
+ "refutable pattern in function argument");
}
}
}
if sub.is_some() {
tcx.sess.span_err(
p.span,
- ~"cannot bind by-move with sub-bindings");
+ "cannot bind by-move with sub-bindings");
} else if has_guard {
tcx.sess.span_err(
p.span,
- ~"cannot bind by-move into a pattern guard");
+ "cannot bind by-move into a pattern guard");
} else if by_ref_span.is_some() {
tcx.sess.span_err(
p.span,
- ~"cannot bind by-move and by-ref \
- in the same pattern");
+ "cannot bind by-move and by-ref \
+ in the same pattern");
tcx.sess.span_note(
by_ref_span.get(),
- ~"by-ref binding occurs here");
+ "by-ref binding occurs here");
} else if is_lvalue {
tcx.sess.span_err(
p.span,
- ~"cannot bind by-move when \
- matching an lvalue");
+ "cannot bind by-move when \
+ matching an lvalue");
}
};
{
cx.tcx.sess.span_err(
pat.span,
- ~"by-move pattern \
- bindings may not occur \
- behind @ or & bindings");
+ "by-move pattern \
+ bindings may not occur \
+ behind @ or & bindings");
}
match sub {
(vt.visit_pat)(*pat, false, vt);
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub fn lit_eq(a: @lit, b: @lit) -> bool {
compare_const_vals(&lit_to_const(a), &lit_to_const(b)) == 0
}
-
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub fn has_freevars(tcx: ty::ctxt, fid: ast::node_id) -> bool {
return vec::len(*get_freevars(tcx, fid)) != 0u;
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
});
if !ty::type_is_owned(cx.tcx, struct_ty) {
cx.tcx.sess.span_err(span,
- ~"cannot implement a destructor on a struct \
- that is not Owned");
+ "cannot implement a destructor on a struct \
+ that is not Owned");
cx.tcx.sess.span_note(span,
- ~"use \"#[unsafe_destructor]\" on the \
- implementation to force the compiler to \
- allow this");
+ "use \"#[unsafe_destructor]\" on the \
+ implementation to force the compiler to \
+ allow this");
}
} else {
cx.tcx.sess.span_err(span,
- ~"cannot implement a destructor on a struct \
- with type parameters");
+ "cannot implement a destructor on a struct \
+ with type parameters");
cx.tcx.sess.span_note(span,
- ~"use \"#[unsafe_destructor]\" on the \
- implementation to force the compiler to \
- allow this");
+ "use \"#[unsafe_destructor]\" on the \
+ implementation to force the compiler to \
+ allow this");
}
}
}
_ => {
cx.tcx.sess.span_bug(self_type.span,
- ~"the self type for \
- the Drop trait \
- impl is not a \
- path");
+ "the self type for \
+ the Drop trait \
+ impl is not a \
+ path");
}
}
}
fn check_for_bare(cx: Context, fv: @freevar_entry) {
cx.tcx.sess.span_err(
fv.span,
- ~"attempted dynamic environment capture");
+ "attempted dynamic environment capture");
}
let fty = ty::node_id_to_type(cx.tcx, id);
if is_mutbl {
cx.tcx.sess.span_err(
sp,
- ~"mutable variables cannot be implicitly captured");
+ "mutable variables cannot be implicitly captured");
}
}
def_arg(*) => { /* ok */ }
if !ty::type_is_durable(tcx, ty) {
match ty::get(ty).sty {
ty::ty_param(*) => {
- tcx.sess.span_err(sp, ~"value may contain borrowed \
- pointers; use `'static` bound");
+ tcx.sess.span_err(sp, "value may contain borrowed \
+ pointers; use `'static` bound");
}
_ => {
- tcx.sess.span_err(sp, ~"value may contain borrowed \
- pointers");
+ tcx.sess.span_err(sp, "value may contain borrowed \
+ pointers");
}
}
false
if !ty::type_is_owned(cx.tcx, source_ty) {
cx.tcx.sess.span_err(
target.span,
- ~"uniquely-owned trait objects must be sendable");
+ "uniquely-owned trait objects must be sendable");
}
}
_ => {} // Nothing to do.
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
_ => {
self.sess.span_err(
meta.span,
- ~"malformed lint attribute");
+ "malformed lint attribute");
}
}
}
}
_ => {
self.sess.span_err(meta.span,
- ~"malformed lint attribute");
+ "malformed lint attribute");
}
}
}
cx.sess.span_lint(
while_true, e.id, it.id,
e.span,
- ~"denote infinite loops \
- with loop { ... }");
+ "denote infinite loops \
+ with loop { ... }");
}
_ => ()
}
&& !check_limits(cx, *binop, l, r) {
cx.sess.span_lint(
type_limits, e.id, it.id, e.span,
- ~"comparison is useless due to type limits");
+ "comparison is useless due to type limits");
}
}
_ => ()
item.id,
item.id,
item.span,
- ~"default methods are experimental");
+ "default methods are experimental");
}
}
}
item.id,
item.id,
field.span,
- ~"mutable fields are deprecated");
+ "mutable fields are deprecated");
}
ast::named_field(*) | ast::unnamed_field => {}
}
cx.sess.span_lint(
ctypes, id, fn_id,
ty.span,
- ~"found rust type `int` in foreign module, while \
+ "found rust type `int` in foreign module, while \
libc::c_int or libc::c_long should be used");
}
ast::def_prim_ty(ast::ty_uint(ast::ty_u)) => {
cx.sess.span_lint(
ctypes, id, fn_id,
ty.span,
- ~"found rust type `uint` in foreign module, while \
+ "found rust type `uint` in foreign module, while \
libc::c_uint or libc::c_ulong should be used");
}
_ => ()
cx.sess.span_lint(
path_statement, id, it.id,
s.span,
- ~"path statement with no effect");
+ "path statement with no effect");
}
_ => ()
}
if !is_camel_case(cx, ident) {
cx.sess.span_lint(
non_camel_case_types, expr_id, item_id, span,
- ~"type, variant, or trait should have \
- a camel case identifier");
+ "type, variant, or trait should have \
+ a camel case identifier");
}
}
if !cx.used_unsafe.contains(&blk.node.id) {
cx.sess.span_lint(unused_unsafe, blk.node.id, it.id,
blk.span,
- ~"unnecessary `unsafe` block");
+ "unnecessary `unsafe` block");
}
}
_ => ()
}
if !used {
let msg = if bindings == 1 {
- ~"variable does not need to be mutable"
+ "variable does not need to be mutable"
} else {
- ~"variables do not need to be mutable"
+ "variables do not need to be mutable"
};
tcx.sess.span_lint(unused_mut, p.id, it.id, p.span, msg);
}
tcx.sess.abort_if_errors();
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
match self.capture_info_map.find(&expr.id) {
Some(&caps) => caps,
None => {
- self.tcx.sess.span_bug(expr.span, ~"no registered caps");
+ self.tcx.sess.span_bug(expr.span, "no registered caps");
}
}
}
}
None => {
self.tcx.sess.span_bug(
- span, ~"Not present in def map")
+ span, "Not present in def map")
}
}
}
// to find with one
match self.tcx.def_map.find(&id) {
Some(&def_label(loop_id)) => loop_id,
- _ => self.tcx.sess.span_bug(sp, ~"Label on break/loop \
- doesn't refer to a loop")
+ _ => self.tcx.sess.span_bug(sp, "Label on break/loop \
+ doesn't refer to a loop")
},
None => {
// Vanilla 'break' or 'loop', so use the enclosing
// loop scope
let loop_scope = &mut *self.loop_scope;
if loop_scope.len() == 0 {
- self.tcx.sess.span_bug(sp, ~"break outside loop");
+ self.tcx.sess.span_bug(sp, "break outside loop");
}
else {
// FIXME(#5275): this shouldn't have to be a method...
}
stmt_mac(*) => {
- self.tcx.sess.span_bug(stmt.span, ~"unexpanded macro");
+ self.tcx.sess.span_bug(stmt.span, "unexpanded macro");
}
}
}
match self.break_ln.find(&sc) {
Some(&b) => b,
None => self.tcx.sess.span_bug(expr.span,
- ~"Break to unknown label")
+ "Break to unknown label")
}
}
match self.cont_ln.find(&sc) {
Some(&b) => b,
None => self.tcx.sess.span_bug(expr.span,
- ~"Loop to unknown label")
+ "Loop to unknown label")
}
}
}
expr_mac(*) => {
- self.tcx.sess.span_bug(expr.span, ~"unexpanded macro");
+ self.tcx.sess.span_bug(expr.span, "unexpanded macro");
}
}
}
} else if ty::type_is_bot(t_ret) {
// for bot return types, not ok. Function should fail.
self.tcx.sess.span_err(
- sp, ~"some control paths may return");
+ sp, "some control paths may return");
} else {
self.tcx.sess.span_err(
- sp, ~"not all control paths return a value");
+ sp, "not all control paths return a value");
}
}
}
None => {
self.tcx.sess.span_err(
span,
- ~"re-assignment of immutable variable");
+ "re-assignment of immutable variable");
self.tcx.sess.span_note(
orig_span,
- ~"prior assignment occurs here");
+ "prior assignment occurs here");
}
}
}
_ => {
self.tcx.sess.span_bug(
pat.span,
- ~"enum pattern didn't resolve to enum or struct");
+ "enum pattern didn't resolve to enum or struct");
}
}
}
MoveInWhole => {
self.tcx.sess.span_bug(
expr.span,
- fmt!("Component mode can never be MoveInWhole"));
+ "Component mode can never be MoveInWhole");
}
}
}
expr_mac(*) => {
self.tcx.sess.span_bug(
expr.span,
- ~"macro expression remains after expansion");
+ "macro expression remains after expansion");
}
}
}
parental_privacy == Public)
== Private {
tcx.sess.span_err(span,
- ~"can only dereference enums \
- with a single, public variant");
+ "can only dereference enums \
+ with a single, public variant");
}
};
tcx.sess.parse_sess.interner)));
}
None => {
- tcx.sess.span_bug(span, ~"method not found in \
- AST map?!");
+ tcx.sess.span_bug(span, "method not found in \
+ AST map?!");
}
}
};
// Look up the enclosing impl.
if container_id.crate != local_crate {
tcx.sess.span_bug(span,
- ~"local method isn't in local \
- impl?!");
+ "local method isn't in local \
+ impl?!");
}
match tcx.items.find(&container_id.node) {
}
}
Some(_) => {
- tcx.sess.span_bug(span, ~"impl wasn't an item?!");
+ tcx.sess.span_bug(span, "impl wasn't an item?!");
}
None => {
- tcx.sess.span_bug(span, ~"impl wasn't in AST map?!");
+ tcx.sess.span_bug(span, "impl wasn't in AST map?!");
}
}
}
tcx.sess.parse_sess.interner)));
}
None => {
- tcx.sess.span_bug(span, ~"method not found in \
- AST map?!");
+ tcx.sess.span_bug(span, "method not found in \
+ AST map?!");
}
}
};
.interner)));
}
None => {
- tcx.sess.span_bug(span, ~"item not found in AST map?!");
+ tcx.sess.span_bug(span, "item not found in AST map?!");
}
}
};
match item.node {
item_trait(_, _, ref methods) => {
if method_num >= (*methods).len() {
- tcx.sess.span_bug(span, ~"method \
- number \
- out of \
- range?!");
+ tcx.sess.span_bug(span, "method \
+ number \
+ out of \
+ range?!");
}
match (*methods)[method_num] {
provided(method)
}
}
_ => {
- tcx.sess.span_bug(span, ~"trait wasn't \
- actually a \
- trait?!");
+ tcx.sess.span_bug(span, "trait wasn't \
+ actually a \
+ trait?!");
}
}
}
Some(_) => {
- tcx.sess.span_bug(span, ~"trait wasn't an \
- item?!");
+ tcx.sess.span_bug(span, "trait wasn't an \
+ item?!");
}
None => {
- tcx.sess.span_bug(span, ~"trait item wasn't \
- found in the AST \
- map?!");
+ tcx.sess.span_bug(span, "trait item wasn't \
+ found in the AST \
+ map?!");
}
}
} else {
match method_map.find(&expr.id) {
None => {
tcx.sess.span_bug(expr.span,
- ~"method call not in \
- method map");
+ "method call not in \
+ method map");
}
Some(ref entry) => {
debug!("(privacy checking) checking \
}
_ => {
tcx.sess.span_bug(expr.span,
- ~"resolve didn't \
- map enum struct \
- constructor to a \
- variant def");
+ "resolve didn't \
+ map enum struct \
+ constructor to a \
+ variant def");
}
}
}
}
_ => {
- tcx.sess.span_bug(expr.span, ~"struct expr \
- didn't have \
- struct type?!");
+ tcx.sess.span_bug(expr.span, "struct expr \
+ didn't have \
+ struct type?!");
}
}
}
}
_ => {
tcx.sess.span_bug(pattern.span,
- ~"resolve didn't \
- map enum struct \
- pattern to a \
- variant def");
+ "resolve didn't \
+ map enum struct \
+ pattern to a \
+ variant def");
}
}
}
}
_ => {
tcx.sess.span_bug(pattern.span,
- ~"struct pattern didn't have \
- struct type?!");
+ "struct pattern didn't have \
+ struct type?!");
}
}
}
pub fn parent_id(cx: ctxt, span: span) -> ast::node_id {
match cx.parent {
None => {
- cx.sess.span_bug(span, ~"crate should not be parent here");
+ cx.sess.span_bug(span, "crate should not be parent here");
}
Some(parent_id) => {
parent_id
}
return bcx;
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
return (llmod, link_meta);
}
}
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
llvm::LLVMBuildAtomicRMW(B(cx), op, dst, src, order)
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
pub fn bool_to_i1(bcx: block, llval: ValueRef) -> ValueRef {
build::ICmp(bcx, lib::llvm::IntNE, llval, C_bool(false))
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
let dataptr = get_dataptr(bcx, body_ptr);
return iter_vec_raw(bcx, dataptr, vec_ty, fill, f);
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
ast::expr_mac(*) => {
tcx.sess.span_bug(
expr.span,
- ~"macro expression remains after expansion");
+ "macro expression remains after expansion");
}
}
}
const_eval::const_uint(count) => return count as uint,
const_eval::const_float(count) => {
tcx.sess.span_err(count_expr.span,
- ~"expected signed or unsigned integer for \
- repeat count but found float");
+ "expected signed or unsigned integer for \
+ repeat count but found float");
return count as uint;
}
const_eval::const_str(_) => {
tcx.sess.span_err(count_expr.span,
- ~"expected signed or unsigned integer for \
- repeat count but found string");
+ "expected signed or unsigned integer for \
+ repeat count but found string");
return 0;
}
const_eval::const_bool(_) => {
tcx.sess.span_err(count_expr.span,
- ~"expected signed or unsigned integer for \
- repeat count but found boolean");
+ "expected signed or unsigned integer for \
+ repeat count but found boolean");
return 0;
}
},
Err(*) => {
tcx.sess.span_err(count_expr.span,
- ~"expected constant integer for repeat count \
- but found variable");
+ "expected constant integer for repeat count \
+ but found variable");
return 0;
}
}
(trait_ref,
mk_trait(tcx, trait_ref.def_id, copy trait_ref.substs, BoxTraitStore, ast::m_imm))
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
tcx.sess.abort_if_errors();
(ccx.method_map, ccx.vtable_map)
}
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
run_compiler(&args, demitter);
}
}
-
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
// A set of node IDs (used to keep track of which node IDs are for statements)
pub type stmt_set = @mut HashSet<ast::node_id>;
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
vstore_to_str(tcx, *self)
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End
}
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
assert!(!(&1.5f).fuzzy_eq_eps(&0.9, &0.5));
}
-#[test]
+#[cfg(test)]
mod test_complex{
use cmp::*;
// the process under normal circumstances
breakpoint();
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
assert!(*deq.get(3) == d);
}
- #[test]
+ #[cfg(test)]
fn test_parameterized<T:Copy + Eq + Durable>(a: T, b: T, c: T, d: T) {
let mut deq = Deque::new();
assert!(deq.len() == 0);
assert!(usage == expected)
}
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
== list::append(list::from_vec(~[1,2]), list::from_vec(~[3,4])));
}
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
A BigUint-typed value BigUint { data: @[a, b, c] } represents a number
(a + b * BigDigit::base + c * BigDigit::base^2).
*/
+#[deriving(Clone)]
pub struct BigUint {
priv data: ~[BigDigit]
}
}
/// A Sign is a BigInt's composing element.
-#[deriving(Eq)]
+#[deriving(Eq, Clone)]
pub enum Sign { Minus, Zero, Plus }
impl Ord for Sign {
}
/// A big signed integer type.
+#[deriving(Clone)]
pub struct BigInt {
priv sign: Sign,
priv data: BigUint
#[inline(always)]
fn abs(&self) -> BigInt {
match self.sign {
- Plus | Zero => copy *self,
- Minus => BigInt::from_biguint(Plus, copy self.data)
+ Plus | Zero => self.clone(),
+ Minus => BigInt::from_biguint(Plus, self.data.clone())
}
}
#[inline(always)]
fn add(&self, other: &BigInt) -> BigInt {
match (self.sign, other.sign) {
- (Zero, _) => copy *other,
- (_, Zero) => copy *self,
+ (Zero, _) => other.clone(),
+ (_, Zero) => self.clone(),
(Plus, Plus) => BigInt::from_biguint(Plus,
self.data + other.data),
(Plus, Minus) => self - (-*other),
fn sub(&self, other: &BigInt) -> BigInt {
match (self.sign, other.sign) {
(Zero, _) => -other,
- (_, Zero) => copy *self,
+ (_, Zero) => self.clone(),
(Plus, Plus) => match self.data.cmp(&other.data) {
Less => BigInt::from_biguint(Minus, other.data - self.data),
Greater => BigInt::from_biguint(Plus, self.data - other.data),
impl Neg<BigInt> for BigInt {
#[inline(always)]
fn neg(&self) -> BigInt {
- BigInt::from_biguint(self.sign.neg(), copy self.data)
+ BigInt::from_biguint(self.sign.neg(), self.data.clone())
}
}
#[cfg(test)]
mod biguint_tests {
+ use super::*;
use core::num::{IntConvertible, Zero, One, FromStrRadix};
use core::cmp::{Less, Equal, Greater};
- use super::{BigUint, BigDigit};
#[test]
fn test_from_slice() {
let c = BigUint::from_slice(cVec);
if !a.is_zero() {
- assert!(c.div_rem(&a) == (copy b, Zero::zero()));
+ assert!(c.div_rem(&a) == (b.clone(), Zero::zero()));
}
if !b.is_zero() {
- assert!(c.div_rem(&b) == (copy a, Zero::zero()));
+ assert!(c.div_rem(&b) == (a.clone(), Zero::zero()));
}
}
#[cfg(test)]
mod bigint_tests {
- use super::{BigInt, BigUint, BigDigit, Sign, Minus, Zero, Plus};
+ use super::*;
use core::cmp::{Less, Equal, Greater};
use core::num::{IntConvertible, Zero, One, FromStrRadix};
}
}
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
}
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub use serialize;
pub use test;
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub fn bg(writer: @io::Writer, color: u8) {
return set_color(writer, '4' as u8, color);
}
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
}
}
-
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
*/
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
_ => fail!(error_msg)
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
fm.next_line(BytePos(2));
}
}
-
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
span: sp
})
}
-
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
assert_eq!(*(m.find(&@~"def").get()),16);
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
};
MRExpr(e)
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
return mk_block(cx, fmt_sp, ~[], stms, Some(buf()));
}
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
copy *arg
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
_ => p.fatal(~"Unsupported builtin nonterminal parser: " + name)
}
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub fn make_fold(afp: ast_fold_fns) -> @ast_fold {
afp as @ast_fold
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
assert_eq!(tok, token::LIFETIME(id));
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
new_parser_from_source_str(ps,~[],~"bogofile",source_str)
}
- #[test] fn to_json_str<E : Encodable<std::json::Encoder>>(val: @E) -> ~str {
+ #[cfg(test)] fn to_json_str<E : Encodable<std::json::Encoder>>(val: @E) -> ~str {
do io::with_str_writer |writer| {
val.encode(~std::json::Encoder(writer));
}
string_to_expr(@~"a::z.froob(b,@(987+3))");
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
}
}
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
return words;
}
-
-
-// Local Variables:
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
}
pub fn hardbreak_tok() -> token { return hardbreak_tok_offset(0); }
-
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
assert_eq!(&varstr,&~"pub principal_skinner");
}
}
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
v_struct_method(v.visit_struct_method, a, b, c)
});
}
-
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
#define RED_ZONE_SIZE RZ_MAC_32
#endif
+#ifndef RED_ZONE_SIZE
+# error "Red zone not defined for this platform"
+#endif
+
struct frame_glue_fns {
uintptr_t mark_glue_off;
uintptr_t drop_glue_off;
}
pub fn main() { }
-
-//
-// Local Variables:
-// mode: rust
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
-//
}
fn child(&&i: int) { error!(i); assert!((i == 10)); }
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
assert!((i8 == 80));
assert!((i9 == 90));
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub fn main() {
join(joinable(supervisor));
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End:
pub fn main() {
task::spawn_unlinked(supervisor)
}
-
-// Local Variables:
-// mode: rust;
-// fill-column: 78;
-// indent-tabs-mode: nil
-// c-basic-offset: 4
-// buffer-file-coding-system: utf-8-unix
-// End: