id
stringlengths
8
11
text
stringlengths
32
472
label
stringclasses
5 values
label_id
int64
0
4
rust_207
compile-fail tests ignore pattern after the first : | I am adding a test to compile-fail that has // error-pattern: unresolved name: a to test the test I changed the line to // error-pattern: unresolved name: x and to my surprise the test passed changing it to something like // error-pattern: unresolved namex: a correc...
medium
2
rust_210
Teach rustc to deal with argv | Rustc doesn't know how to compile a program that takes command line args. It needs to learn. The tests are argv.rs and command-line-args.rs. | labels: E-easy
low
3
rust_211
Cascading else-ifs | Rustc doesn't know how to handle if-else if-else if-else cascades. Only if/else. Teach it how to do else if. | labels: E-easy
low
3
rust_212
Get generic tags working | Generics only work in rustc for types and functions. Get tags working.
medium
2
rust_213
Implement derived type descriptors in rustc | Rustc doesn't know how to do derived type descriptors. This is necessary for generic objects and closures (the tydesc for the captured body has a derived type).
medium
2
rust_214
Get generic objects working in rustc | Rustc needs to learn to capture tydescs into generic objs. Requires issue #213.
medium
2
rust_215
Get generic closures working in rustc | Rustc needs to learn to capture tydescs into generic closures. Requires issue #213.
medium
2
rust_216
Teach rustc about native modules and general C calls | Rustc needs to learn to parse native module declarations and emit stack-switching C calls and undefined symbol references in the LLVM code.
medium
2
rust_217
Teach rustc to do tail calls | Rustc doesn't know how to do tail calls ('be' rather than 'ret') yet. It shouldn't be too hard to teach it how. | labels: A-LLVM
medium
2
rust_218
Teach rustc to do vec-append / growth | Rustc doesn't have any support for appending to vectors. Needs it. | labels: E-easy
question
4
rust_219
Teach rustc to do FRU | Rustc doesn't know how to do rec(a=b with x) for functional record update. Needs to learn.
medium
2
rust_220
Teach rustc about iterators | Rustc has no support for iterators beyond basic parsing. Neither the iterator nor the for each loop that interlocks with it. Implement these.
question
4
rust_221
Teach rustc about spawning and tasks | This is a long-ish piece of work, and not essential for bootstrapping, but rustc doesn't know anything about the tasking system yet. Needs to eventually. | labels: A-runtime
medium
2
rust_227
Fix fixed-point iteration in type unification | Can infinite loop. | labels: A-type-system
medium
2
rust_228
Implement SHA1 in standard library | We need a reasonable cryptographic hash function to use as part of name mangling in rustc. Linkage will need this eventually. | labels: E-easy
low
3
rust_229
Implement the occurs check for type unification | We can infinite loop if we try to unify e.g. T with option[T]. Fixing this requires implementing the occurs check. Off the top of my head, I can't think of any cases in which we'd actually trip this, but it's theoretically possible. --- Tim thinks this may also be the c...
high
1
rust_232
add typestate pass to rustc | rustc has no typestate checker. add one.
medium
2
rust_233
add effect-checking pass to rustc | rustc has no effect-checking pass. add one.
medium
2
rust_234
add kind system and kind-checking pass to rustc | rustc has no kind system, now kind-checking pass. add one.
medium
2
rust_235
implement gc in rustc | rustc lacks a majority of the machinery required for mark/sweep gc on the kind of cyclic values. implement it. | labels: A-runtime, E-hard
medium
2
rust_236
add fail-unwind machinery to rustc | code coming out of rustc can't fail-and-unwind properly. it needs to learn how to. | labels: A-runtime, A-LLVM
medium
2
rust_237
add debug info to rustc | rustc generates code with only the barest symbol tables to guide debuggers. llvm is happy to generate dwarf if we tell it what to say in high-level terms. implement this.
medium
2
rust_238
Change statement to expression in docs | The docs still refer to rust semantics in terms of statements; most things that are documented as statements at present are expressions, in rustc. This is a tedious, semi-automatable rewrite where you spend a lot of time changing very little semantic content, just correcting ter...
low
3
rust_239
Escape analysis | We should use some escape analysis. This will be useful both to ensure that aliases don't escape and to enable optimizations (heap allocation to stack frame for closure environments, etc.)
medium
2
rust_240
Escape analysis | We could use some escape analysis. This will be useful both to ensure that aliases don't escape and to enable optimizations (heap allocation to stack frame for closure environments, etc.) This should be a separate pass that operates independently (or, someday, in parallel with) t | labels: C-enhanceme...
low
3
rust_242
Extend lexer to cover non-ASCII unicode cases | There are a few parts to this: - Implement the PEP 3131 rule for identifier tokenization: notice when you leave ASCII range, switch to XID_Start/XID_Continue, NFKC-normalize. This is expensive but it'll be a cold path in any ASCII-range input. - Copy of the rules in rustb...
medium
2
rust_243
Make the glue tables in trans not sensitive to cname | Currently, changing the cname will cause duplicate glue to be generated in trans. It should pay attention to struct only.
medium
2
rust_244
implement 'use' for rustc | Rustc can't 'use' crates yet. In fact it can't even write out crate metadata. It has to learn how. Tasks here involve: - Make up a serial encoding of crate metadata that is efficient to incrementally parse and seek around inside of, but also stable and simple enough that we're no
question
4
rust_245
support dtors in rustc | rustc has no support for obj drop blocks (dtors). implement these. | labels: E-easy
question
4
rust_249
Polymorphic types don't seem to work across crate boundaries | If I use the rustc crate, I can't match on a std.option.t coming from that crate — firstly, the compiler thinks it is of type rustc.std.option.t, but even if I qualify it like that, I get errors like ``` error: mismatched types: expected rustc.std.option.t ...
medium
2
rust_250
"fail" should have no output edges | Failing test case: ``` auto x; alt (...) { case (...) { x = 3; } case (_) { fail; } } log x; ``` `x` should have init set after the `alt`.
medium
2
rust_254
bind-obj-ctor: Binding object constructors doesn't work | Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file Instructions.cpp, line 197.
medium
2
rust_255
drop-parametric-closure-on-bound-box fails | Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file Instructions.cpp, line 197.
medium
2
rust_256
foreach-nested-* fail | Fails in trans_path.
medium
2
rust_257
foreach-put-structured fails | Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && "Calling a function with a bad signature!"), function init, file Instructions.cpp, line 197.
medium
2
rust_258
generic-fn-twice fails | rt: 9741:main:main: rust: test/run-pass/generic-fn-twice.rs:8:2:8:17: error: expected 0 type parameter(s) but found 1 parameter(s) | labels: A-type-system
medium
2
rust_259
generic-recursive-tag fails | Assertion failed: (Ty && "Invalid GetElementPtrInst indices for type!"), function checkType, file /Users/pwalton/Source/llvm/local/include/llvm/Instructions.h, line 278.
medium
2
rust_260
generic-tag-alt fails | rt: 9741:main:main: rust: test/run-pass/generic-tag-alt.rs:8:10:8:20: error: mismatched types: expected P0:5 but found P0:1 (types differ) | labels: A-type-system
medium
2
rust_261
generic-tag-values fails | rt: 9741:main:main: rust: test/run-pass/generic-tag-values.rs:10:10:10:23: error: mismatched types: expected int but found P0:1 (types differ) | labels: A-type-system
medium
2
rust_262
integral-indexing fails | Assertion failed: (C1->getType() == C2->getType() && "Op types should be identical!"), function get, file Constants.cpp, line 1425. | labels: E-easy
low
3
rust_267
Rustc thinks there's a cyclic import in lib | I'm trying to get 'rustc -shared lib/std.rc' to work. Currently it's blocked on thinking that 'sbuf' in lib/linux_os.rs is a cyclic import. What it does is resolve to _str.sbuf, which is itself an import of _str.rustrt.sbuf. Somehow rustc is not figuring this out, thinks th...
low
3
rust_268
imported modules aren't exported | If I have, in `mod1`: ``` import foo = x.y; ``` And then in another mod try to refer to `mod1.foo.[something]`, I get (with rustboot) `"error: the name 'foo' can't be found in the module"`. Maybe this is by design, but I'd argue that it'd be very good to have this supported (and
question
4
rust_269
Makefile sometimes errors out without notice | (On Linux) It'll exit with status code 2, not printing an error message, and leaving some stuff unbuilt. I've put the output of `make --debug=v` at https://gist.github.com/865862 , but that doesn't seem to contain any useful error messages either. If someone has more ideas...
medium
2
rust_270
Can't return from inside a block | `iterFunc({|| ret; })` does not return from the outer function. Maybe we'll just have accept this, since in the absence of non-local control flow, there's no nice way to implement such returns.
medium
2
rust_275
"file not found" error message should be friendlier | If I do: $ rustc some-file-that-doesnt-exist.rs I get: upcall fail '.t144 != 0u', lib/io.rs:110 Indeed, the file_reader function in lib/io.rs fails with an uncaught exception if the file that's being opened doesn't exist. It would be better to print a more informati...
medium
2
rust_276
Hello World | Just for the record, how would you write a sample hello world program in Rust?
medium
2
rust_277
`rustc -pp lib/_str.rs` corrupts memory | Looks like it's trying to call take glue on an already-freed token.
medium
2
rust_291
Stack not aligned on "main" | While debugging the crash with optimizations enabled, I noticed that on OS X esp was not 16 byte aligned at the start of _rust_fn3_main. As a hack to find the remaining problems I added a rust_sp -= 12; to rust_task::start, but a more complete accounting of the used stack is need
medium
2
rust_293
Nested clean-up-requiring blocks in loop (sometimes) segfault [rustc] | This one does: ``` fn main() { auto i = 0; while (i < 20) { { auto pt2 = @i; auto pt = @i; i = *pt + 1; } } } ``` | labels: I-crash
high
1
rust_300
Try to reuse cleanup code when appropriate | Each ret, break. cont, and maybe others, currently outputs it own block-unwind-cleanup code. A block (or nested set of blocks) which requires non-trivial cleanup code, having a bunch of rets/breaks in it will cause way too much repetitive code to be generated. The compiler w...
low
3
rust_301
Generic vector reads read from the wrong place | Test case: ``` fn get[T](vec[T] v) -> T { ret v.(1); } fn main() { auto v = vec(1, 2, 3, 4, 5); log get(v); } ``` Result: ``` [pwalton@fireferret ~/Source/rust/build] ./a.out rt: --- rt: 12ed:main:main: rust: 33554432 (0x2000000) ``` `ret v.(0)` works, so looks like we'r...
medium
2
rust_320
Compiler allows tail calls to functions with aliased arguments | It seems to me that the following code: ``` fn bar(&int i) -> bool { ret (i == 37); } fn foo(int i) -> bool { be bar(i); } fn main() { check(foo(37)); } ``` should be rejected by the compiler, because foo makes a tail call to bar, whose argument is aliase...
low
3
rust_322
unresolved name conflict | Here's a fun one! ``` fn main() { fn id(int n) -> int { // this should have been 'ret n;' ret i; } let int i = id(5); log i; } ``` This shouldn't compile, and it doesn't, but instead of the expected "unresolved name: i", I get all the way to trans.rs and then get: upcall fail '.t
medium
2
rust_324
Unused functions in objects can affect whether self calls compile | https://gist.github.com/654a2ffb1b6a0a50ffb0 Should compile and run as expected -- but commenting out the (unused!) 'wrapper' fn produces: rust: ../rust/src/test/run-pass/obj-self-4.rs:11:19:11:26: error: mismatched types: expected fn(int) -> <T0> but ...
medium
2
rust_325
Use MCStreamer to emit object files | Having to run `llc` and `gcc` to create a usable binary after running `rustc` is a lot of work. We should use LLVM's MCStreamer framework to emit object files directly.
medium
2
rust_330
Intern types | rustc is unbearably slow at the moment, largely due to `unify`. We should do what LLVM does and intern types in one global table and refer to them by index into that table. We can then keep a cache on the side of unified types. | labels: A-type-system
medium
2
rust_331
Implement "walk" | We should be able to just visit the tree in rustc, not have to fold over it every time.
medium
2
rust_332
Store types in a side table | We should store types in a side table instead of rebuilding the AST during typeck. I don't think this will be as much of a perf win as interning types will be, but it should be significant. | labels: A-type-system
medium
2
rust_333
Assigning a function to a variable causes an assertion failure | Compiling this program with rustc: ``` fn quux[T]() -> T { auto f = id[T]; } fn id[T](&T x) -> T { ret x; } ``` yields an assertion failure: "Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "...
medium
2
rust_335
SSA problem when using `log_err` with a computed string | ``` fn main() { log_err "foo" + "bar"; } ``` fails with: ``` Instruction does not dominate all uses! %12 = load %str* %3 store %str %12, %str* %5 Broken module found, compilation aborted! Stack dump: 0. Running pass 'Function Pass Manager' on module 'rust_out'. ...
medium
2
rust_342
Compiler warning for "condition is always true" | `while (i >= 0u)` cost a morning. We should add a warning for this. | labels: E-easy, C-enhancement, A-lints
low
3
rust_345
Use correct extension when the output path is not provided to rustc | rustc now builds several types of output with the -S and -c flags, but if the -o flag is not provided it still generates a file with a .bc extension. This is true for the --glue flag as well. | labels: E-easy
low
3
rust_352
static exhaustiveness checking | Currently a non-exhaustive match is silently compiled and turns into a runtime fault if it hits the not-handled case. It'd be nice to at least have a warning, or perhaps strict checking, on non-exhaustive matches. | labels: E-easy
low
3
rust_355
Separate namespaces for types and values | This will allow us to reuse some names. Once the parser becomes more careful with keywords, it'll also allow things like `char` as a value name, or `mod.
medium
2
rust_356
Separate namespaces for types and values | This will allow us to reuse some names. Once the parser becomes more careful with keywords, it'll also allow things like `char` as a value name, or `mod` as a type name.
medium
2
rust_358
Compiler crash on using a const | When, in the resolve.rs at 14f1fe0e29d5f4d832ef622b7a1a49e5c591e1c0, I add a ``` const ast.def_num toplevel_mod = -1; ``` at the top, and replace the instances of -1 in found_view_item, map_crate, and lookup_in_mod with `toplevel_mod`, I get an inexhaustive match error in trans.r
medium
2
rust_359
'for each' doesn't seem to be typechecked | If I provide an incorrect type for the loop variable, the error happens in the form of an LLVM type assert firing in trans. | labels: A-type-system
medium
2
rust_360
--shared should be a crate directive | `--shared` violates the design because every crate is either shared or isn't. This should be a crate directive. | labels: A-frontend, E-easy
low
3
rust_361
Print a backtrace on failure | It'd be nice to print a backtrace on failure using backtrace(3) for starters. | labels: A-runtime, E-easy
low
3
rust_362
'ret none;' should typecheck | Probably, this indicates that the typechecker isn't unifying ret expressions with the enclosing function's return type. Currently, you always have to provide a type parameter to return argumentless tag variants. | labels: A-type-system
medium
2
rust_363
Can't leave off type parameters in tag patterns | I.e. ``` alt (expr) { case (some(?thing)) {} case (none) {} } ``` won't typecheck without explicit type params. The type of expr should contain enough information to deduce the type params. | labels: A-type-system
medium
2
rust_364
Closing over an outer function arg is not caught by capture pass | This currently crashes the compiler (Map.get miss in `ty_param_count_and_ty_for_def` in typeck.rs when looking up `outer_arg`): ``` fn foo(int outer_arg) { fn local() -> int { ret outer_arg; } } ```
medium
2
rust_367
internal error instead of type error on "some_vector.some_field_name" | Trying to compile the file: ``` fn f() { auto v = vec(1); log v.some_field_name; //type error } ``` Results in the error message: 6:6:6:23: error: internal compiler error: unimplemented base type for expr_field in typeck.check_expr: vec[int] | labe...
high
1
rust_368
clang does not like rust_box's flexible array | Compiling rust_builtin.cpp errors out with this message: ``` compile: rt/rust_builtin.o ../rust/src/rt/rust_builtin.cpp:388:13: error: flexible array 'data' not allowed in otherwise empty struct uint8_t data[]; ^ ```
medium
2
rust_369
Bindings with the same name on the same level are not caught | Instead, one of them silently takes precedence.
medium
2
rust_370
Unexpected behavior importing nested modules with the same name | The following test results in items in the inner foo not being resolved even though the compiler let us import foo::foo ``` import foo::foo; mod foo { mod foo { fn baz() { } } } fn main() { // error: unresolved name: baz foo::baz(); } ``` Also, using `im...
medium
2
rust_372
implicit block values as function bodies don't actually get returned | ``` fn f() -> int { auto x = { 3 }; x } fn main() -> int { log_err f(); ret 1; } ``` This prints 0, instead of 3 (though it's probably a garbage value). (the wacky definition of `f` is because of a parser problem)
medium
2
rust_374
Conditional jump or move depends on uninitialized value in rustc | Running `make stage2/std.o VALGRIND_COMPILE=1` on Linux reports the following: ``` ==15459== Conditional jump or move depends on uninitialised value(s) ==15459== at 0x80DA7CD: _rust_fn960_middle_ty_ty_to_str (in /home/brian/Dev/rust/build/stage1/rustc) ...
medium
2
rust_375
Binding non-alias arguments with type parameters fails in llvm | `make stage2/std.o CFG_DISABLE_OPTIMIZE=1` results in the following: ``` Instruction does not dominate all uses! %20 = load %tydesc** %19 store %tydesc* %20, %tydesc** %7 Broken module found, compilation aborted! Stack dump: 0. Running pass 'Function Pass...
medium
2
rust_376
Run the ll verifier before the optimizer | Currently ll bitcode is verified after it is optimized. Unfortunately, the optimizer seems to hide issues in the generated code and a few bugs have crept into trans as a result. Once those are ironed out we should run the verifier before optimization instead of (or in addition...
low
3
rust_377
Incorrect block results from intermediate tuple | In the following test case a contains 0 instead of 3. ``` fn main() { auto a = { auto b = tup(3); log_err b._0; b }; log_err a._0; assert a._0 == 3; } ```
medium
2
rust_379
assert(false) causes Valgrind problems | `fn main() { assert(false); }` causes 16 Valgrind errors on my machine: https://gist.github.com/975527 Doing `assert(true)` instead causes none
medium
2
rust_383
Unused variables should be reported as warnings | Title says it all. This could be done in resolve perhaps. | labels: A-frontend, E-easy
low
3
rust_385
Inefficient ref counting in else if expressions | The way else if is currently translated the following code ``` auto x = if (a) { b } else if (c) { d } else { e }; ``` translates the same as ``` auto x = if (a) { b } else { if (c) { d } else { e } }; ``` This creates a new sub-scope for each else if branch. The mechan...
medium
2
rust_387
Reconfiguring should preserve CFG_* settings | As I mentioned in graydon/rust#368, I need to specify a custom version of llvm and clang for compiling rust. Unfortunately, when the makefiles are changed, this triggers a reconfigure, which blows away my CFG_\* settings. This results in the wrong version of clang being us...
medium
2
rust_388
Incorrect ref counting on nested block expressions | `auto x = {{[0]}};` drops the references on the vector too early and causes invalid memory access. This also affects else if constructs like ``` auto x = if (false) { [0] } else if (true) { [0] } else { [0] }; ```
medium
2
rust_390
Receiving from a port doesn't block correctly. | See https://gist.github.com/979173 This program should hang indefinitely. Instead, it runs and exits successfully. It seems that when the read call goes to block, it doesn't really block and just keeps on going. It's rather bizarre that this works. | labels: A-runtime
medium
2
rust_391
Logging a tuple causes an LLVM assertion to fail | ``` fn main() { auto t = tup(1, 2, 3); log_err t; } ``` fails to compile with: rustc: /home/lkuper/llvm/include/llvm/Support/Casting.h:202: typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X = llvm::IntegerType, Y = llvm::Type_, typename llvm::c...
question
4
rust_400
Warn or error on path statements | This is pretty useless and error prone: ``` fn do_something_important() { } fn main() { do_something_important; } ``` It's just mentioning a function, when the user probably wanted to call it. Note that it's not useless when leaving off the semi. | labels: A-lints
medium
2
rust_407
Lots of things are passing typechecking that shouldn't | See https://gist.github.com/992122 # fmt doesn't seem to mind being passed more arguments than the format string expects (although this may be by design). I'm passing both TypeRefs and ValueRefs to ty_str, which is declared to take a TypeRef. The ValueRef cases s...
medium
2
rust_408
alias analysis pass in rustc | Currently we permit forming aliases in ways that are not safe: aliasing a mutable cell within a non-pinned box, doubly aliasing mutable values, etc. We need a pass which prohibits these sorts of things (as well as, er, a principled enumeration of which types of aliasing are bad).
medium
2
rust_409
Unique boxes | Add a ~ box type (steal unary-bitwise-not, it's rare enough to live in a library or use ! as a synonym or something). This will live in the tree kind, not permit shallow copies, only deep copies and move semantics. | labels: A-frontend, A-type-system
medium
2
rust_410
Move and swap operators | Add operator <- for move semantics and operator <-> for in-place swapping. Essential components to making the unique ownership model work. Steal <- from send, turn operator send into |> and make it chain to the right. | labels: A-frontend, E-easy
low
3
rust_411
Resource types | Non-sendable, non-copyable nominal items spelled "res(...) { ... }" that hold a value-tuple and associate a destructor. Remove dtors from objs. Purpose is to make the feature orthogonal (and introduce the kind of types that cannot be copied, to be reused in the lambda blocks, iss | labels: A-frontend, ...
medium
2
rust_412
inline keyword and llvm section for exported inline bitcode | Add an inline keyword for items and insert their definitions as llvm bitcode in a section of the output file -- if this is even possible; otherwise I guess pickled ASTs? -- such that the user of a crate can pull copies of the definition in entirely, not just...
low
3
rust_413
Unsafe blocks and sub-language | Add a new raw-pointer-to-T type constructor *T, and a lexical block type 'unsafe { ... }' in which a few new operations become allowed: forming a raw pointer with unary &, dereferencing a raw pointer with unary *, casting a raw pointer to another raw pointer with binary 'as', ind | labe...
medium
2
rust_414
Fuzzer | Write a fuzzer. This should probably be based on mutation (taking an existing AST and performing edits on it), with "generation" being the degenerate case of mutating outwards from an empty AST. The general cycle should just be to mutate from an input, a seed and a particular ite | labels: C-enhancement
low
3
rust_415
Implement 'note' | When unwinding, we should log things marked with 'note' in the unwinding block. Currently we have no support for this, despite excited claims in the manual. | labels: A-runtime, C-enhancement
question
4
rust_416
Extend typestate system to cover non-init preds | Typestate system currently only tracks init-ness. This is good but it's incomplete; needs to track other preds as well eventually.
medium
2
rust_417
object extension, overriding | Make anonymous objects that delegate to base objects -- adding or redefining methods along the way -- work. | labels: A-frontend, A-type-system, I-slow
medium
2