misc: "tag" -> "enum" for cargo, compiletest, fuzzer, rustdoc

This commit is contained in:
Patrick Walton 2012-01-19 16:21:33 -08:00
parent 3333fef1af
commit 035b56d8aa
8 changed files with 11 additions and 11 deletions

View File

@ -23,7 +23,7 @@ import str;
import std::tempfile; import std::tempfile;
import vec; import vec;
tag _src { enum _src {
/* Break cycles in package <-> source */ /* Break cycles in package <-> source */
_source(source); _source(source);
} }

View File

@ -1,6 +1,6 @@
import option; import option;
tag mode { mode_compile_fail; mode_run_fail; mode_run_pass; mode_pretty; } enum mode { mode_compile_fail; mode_run_fail; mode_run_pass; mode_pretty; }
type config = type config =
// The library paths required for running the compiler // The library paths required for running the compiler

View File

@ -29,7 +29,7 @@ type handle =
{task: option::t<(task::task, port<task::task_notification>)>, {task: option::t<(task::task, port<task::task_notification>)>,
chan: reqchan}; chan: reqchan};
tag request { exec([u8], [u8], [[u8]], chan<response>); stop; } enum request { exec([u8], [u8], [[u8]], chan<response>); stop; }
type response = {pid: pid_t, infd: fd_t, type response = {pid: pid_t, infd: fd_t,
outfd: fd_t, errfd: fd_t}; outfd: fd_t, errfd: fd_t};

View File

@ -12,7 +12,7 @@ fn choice<T: copy>(r : rand::rng, v : [T]) -> T { assert vec::len(v) != 0u; v[un
// 1 in n chance of being true // 1 in n chance of being true
fn unlikely(r : rand::rng, n : uint) -> bool { under(r, n) == 0u } fn unlikely(r : rand::rng, n : uint) -> bool { under(r, n) == 0u }
tag maybe_pointy { enum maybe_pointy {
no_pointy; no_pointy;
yes_pointy(@pointy); yes_pointy(@pointy);
} }

View File

@ -6,7 +6,7 @@ import rustc::syntax::parse::parser;
import rustc::syntax::print::pprust; import rustc::syntax::print::pprust;
import rustc::driver::diagnostic; import rustc::driver::diagnostic;
tag test_mode { tm_converge; tm_run; } enum test_mode { tm_converge; tm_run; }
type context = { mode: test_mode }; // + rng type context = { mode: test_mode }; // + rng
fn write_file(filename: str, content: str) { fn write_file(filename: str, content: str) {
@ -288,7 +288,7 @@ fn last_part(filename: str) -> str {
str::slice(filename, ix as uint + 1u, str::byte_len(filename) - 3u) str::slice(filename, ix as uint + 1u, str::byte_len(filename) - 3u)
} }
tag happiness { passed; cleanly_rejected(str); known_bug(str); failed(str); } enum happiness { passed; cleanly_rejected(str); known_bug(str); failed(str); }
// We'd find more bugs if we could take an AST here, but // We'd find more bugs if we could take an AST here, but
// - that would find many "false positives" or unimportant bugs // - that would find many "false positives" or unimportant bugs
@ -464,7 +464,7 @@ fn content_is_dangerous_to_compile(code: str) -> bool {
let dangerous_patterns = let dangerous_patterns =
["xfail-test", ["xfail-test",
"-> !", // https://github.com/graydon/rust/issues/897 "-> !", // https://github.com/graydon/rust/issues/897
"tag", // typeck hang with ty variants: https://github.com/graydon/rust/issues/742 (from dup #900) "enum", // typeck hang with ty variants: https://github.com/graydon/rust/issues/742 (from dup #900)
"with", // tstate hang with expr variants: https://github.com/graydon/rust/issues/948 "with", // tstate hang with expr variants: https://github.com/graydon/rust/issues/948
"import comm" // mysterious hang: https://github.com/graydon/rust/issues/1464 "import comm" // mysterious hang: https://github.com/graydon/rust/issues/1464
]; ];

View File

@ -37,5 +37,5 @@ type retdoc = {
}; };
// Just to break the structural recursive types // Just to break the structural recursive types
tag modlist = [moddoc]; enum modlist = [moddoc];
tag fnlist = [fndoc]; enum fnlist = [fndoc];

View File

@ -6,7 +6,7 @@ export default_seq_fold_mod;
export default_seq_fold_fn; export default_seq_fold_fn;
export default_seq_fold_fnlist; export default_seq_fold_fnlist;
tag fold<T> = t<T>; enum fold<T> = t<T>;
type fold_crate<T> = fn~(fold: fold<T>, doc: doc::cratedoc) -> doc::cratedoc; type fold_crate<T> = fn~(fold: fold<T>, doc: doc::cratedoc) -> doc::cratedoc;
type fold_mod<T> = fn~(fold: fold<T>, doc: doc::moddoc) -> doc::moddoc; type fold_mod<T> = fn~(fold: fold<T>, doc: doc::moddoc) -> doc::moddoc;

View File

@ -32,7 +32,7 @@ fn write_markdown(
write_crate(ctxt, doc); write_crate(ctxt, doc);
} }
tag hlvl { enum hlvl {
h1 = 1; h1 = 1;
h2 = 2; h2 = 2;
h3 = 3; h3 = 3;