misc: "tag" -> "enum" for cargo, compiletest, fuzzer, rustdoc
This commit is contained in:
parent
3333fef1af
commit
035b56d8aa
@ -23,7 +23,7 @@ import str;
|
||||
import std::tempfile;
|
||||
import vec;
|
||||
|
||||
tag _src {
|
||||
enum _src {
|
||||
/* Break cycles in package <-> source */
|
||||
_source(source);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
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 =
|
||||
// The library paths required for running the compiler
|
||||
|
@ -29,7 +29,7 @@ type handle =
|
||||
{task: option::t<(task::task, port<task::task_notification>)>,
|
||||
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,
|
||||
outfd: fd_t, errfd: fd_t};
|
||||
|
@ -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
|
||||
fn unlikely(r : rand::rng, n : uint) -> bool { under(r, n) == 0u }
|
||||
|
||||
tag maybe_pointy {
|
||||
enum maybe_pointy {
|
||||
no_pointy;
|
||||
yes_pointy(@pointy);
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import rustc::syntax::parse::parser;
|
||||
import rustc::syntax::print::pprust;
|
||||
import rustc::driver::diagnostic;
|
||||
|
||||
tag test_mode { tm_converge; tm_run; }
|
||||
enum test_mode { tm_converge; tm_run; }
|
||||
type context = { mode: test_mode }; // + rng
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
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
|
||||
// - 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 =
|
||||
["xfail-test",
|
||||
"-> !", // 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
|
||||
"import comm" // mysterious hang: https://github.com/graydon/rust/issues/1464
|
||||
];
|
||||
|
@ -37,5 +37,5 @@ type retdoc = {
|
||||
};
|
||||
|
||||
// Just to break the structural recursive types
|
||||
tag modlist = [moddoc];
|
||||
tag fnlist = [fndoc];
|
||||
enum modlist = [moddoc];
|
||||
enum fnlist = [fndoc];
|
||||
|
@ -6,7 +6,7 @@ export default_seq_fold_mod;
|
||||
export default_seq_fold_fn;
|
||||
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_mod<T> = fn~(fold: fold<T>, doc: doc::moddoc) -> doc::moddoc;
|
||||
|
@ -32,7 +32,7 @@ fn write_markdown(
|
||||
write_crate(ctxt, doc);
|
||||
}
|
||||
|
||||
tag hlvl {
|
||||
enum hlvl {
|
||||
h1 = 1;
|
||||
h2 = 2;
|
||||
h3 = 3;
|
||||
|
Loading…
Reference in New Issue
Block a user