{"id": "rust_150179", "text": "Tracking issue for release notes of #150151: Destabilise `target-spec-json` | This issue tracks the release notes text for #150151. cc @davidtwco, @Kivooeo -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparin | labels: T-compiler, relnotes, relnotes-tracking-issue", "label": "medium", "label_id": 2} {"id": "rust_152771", "text": "[ICE]: assertion failed: !deep_decl.is_glob_import() while building with 2026-02-11 nightly compiler | ### Meta I am using a nightly version of the compiler. `rustc --version --verbose`: ``` rustc 1.93.1 (01f6ddf75 2026-02-11) binary: rustc commit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf commit-date: 2026-02-11 host: x86_64-pc-windows-msvc release: 1.93.1 | labels: I-ICE, T-compiler, C-bug", "label": "question", "label_id": 4} {"id": "rust_151729", "text": "rustc is not building for custom targets | rustc is not building for custom targets with the current nightly branch. I suspect this is related to the following [commit](https://github.com/rust-lang/rust/pull/150151) As mentioned in the commit, I tried passing the `-Zunstable-options` flag using the fol | labels: T-compiler, C-discussion, A-targets", "label": "question", "label_id": 4} {"id": "rust_152585", "text": "linking with cc failed, could not compile rustc-main due to undef reference | ### Summary ### Command used ```sh ./x.py build --s | labels: T-bootstrap, C-bug", "label": "medium", "label_id": 2} {"id": "rust_97270", "text": "box syntax creates Box where T is not yet initialized | I tried this code: ```rust #![feature(box_syntax)] fn main() { let _x = box return; } ``` miri reports | labels: A-MIR, C-bug, A-miri, A-box", "label": "medium", "label_id": 2} {"id": "rust_152501", "text": "`try bikeshed $ty { … }` is not pre-expansion gated (affects beta+nightly) | The following code compiles even though it shouldn't: ```rs fn main() { #[cfg(false)] try bikeshed () {} } ``` Contrary to `try { … }` it does not even issue a pre-expansion gate *warning*. For context, try blocks and some other ancient features are notoriousl | labels: A-parser, P-high, T-compiler, regression-from-stable-to-beta, C-bug", "label": "critical_bug", "label_id": 0} {"id": "rust_152601", "text": "[ICE]: cargo doc panicked | I tried this code: [playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gi | labels: A-associated-items, I-unsound, C-bug, T-types, A-dyn-trait, F-ptr_metadata", "label": "medium", "label_id": 2} {"id": "rust_148203", "text": "ICE with dyn of subtrait of Pointee | ### Code ```Rust #![feature(ptr_metadata)] use std::ptr::Pointee; pub trait SubPointee: Pointee { type SubMetadata; } impl SubPointee for T { type SubMetadata = ::Metadata; } pub fn foo(f: F) { if let Ok(true) = std::fs::exists(\"may_or_may_not_call_f\") { _ = std::panic::catch_unwind(std::panic::AssertU | labels: A-diagnostics, P-high, T-compiler, regression-from-stable-to-stable, L-unused_assignments", "label": "critical_bug", "label_id": 0} {"id": "rust_141726", "text": "Unify and deduplicate float tests | We currently have at least two somewhat independent places where float functions are being tested: - in `coretests/tests/float/mod.rs` - in `coretests/tests/floats/f*.rs` - in `std/tests/floats/f*.rs` - In `tests/ui/float/conv-bits-runtime-const.rs` Confusingl | labels: E-easy, C-cleanup, A-testsuite, E-mentor, T-libs, A-floating-point", "label": "low", "label_id": 3} {"id": "rust_133469", "text": "test issue | nothing to see ### Summary Notes - [Note](https://github.com/rust-lang/rust/issues/133469#issuecomment-2865978181) by [Urgau](https://github.com/Urgau) - [This is a test](https://github.com/rust-lang/ru", "label": "medium", "label_id": 2} {"id": "rust_148730", "text": "ICE `type_of` called on const argument's anon const before the const argument was lowered | src/lib.rs:5:28 | | labels: A-diagnostics, P-low, A-macros, T-compiler", "label": "low", "label_id": 3} {"id": "rust_152263", "text": "[ICE]: Corrupted .rmeta data causes panic | I tried this code: ```rust #![allow(deref_nullptr)] enum Never {} fn main() { unsafe { match *std::ptr | labels: T-compiler, A-MIR, C-bug, A-miri, A-patterns, A-exhaustiveness-checking", "label": "medium", "label_id": 2} {"id": "rust_146590", "text": "Uninhabited types have strange borrow-checking behavior, even behind references | I'm not sure if this is a bug or not. ```rust enum Never {} fn works(x: &mut Result) { match x { &mut Ok(ref mut y) => match x { &mut Err(ref mut z) => { let _y = y; let _z = z; } _ => {} }, _ => {} }; } fn fails(x: &mut Result) | labels: A-borrow-checker, T-lang, T-compiler, C-bug, A-patterns, A-exhaustiveness-checking", "label": "medium", "label_id": 2} {"id": "rust_152545", "text": "[ICE]: `invalid rigid alias in layout_of after normalization` | I tried this code: https://doc.rust-lang.org/std/fs/struct.FileTimes.html#method.set_modified ```rust | labels: E-easy, C-enhancement, A-filesystem, D-lack-of-suggestion", "label": "low", "label_id": 3} {"id": "rust_152470", "text": "[autodiff] compiler error when differentiating functions (like powi) | Follow up of [#wg-autodiff > Simplify autodiff handling of dependencies (rlib) @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/390790-wg-autodiff/topic/Simplify.20autodiff.20handling.20of.20dependencies.20.28rlib.29/near/573014613) for @ZuseZ4 and @sgasho | labels: T-compiler, C-bug, F-autodiff", "label": "low", "label_id": 3} {"id": "rust_150899", "text": "Better help text for incorrect `macro_rules!` usage | ### Code ```Rust macro_rules!(i_think_the_name_should_go_here) { () => {} } ``` ### Current output ```Shell error: macros that expand to items must be delimited with braces or followed by a semicolon --> src/lib.rs:1:13 | 1 | macro_rules!(i_think_the_name_shou | labels: A-diagnostics, A-macros, T-compiler", "label": "medium", "label_id": 2} {"id": "rust_104463", "text": "Misleading comments over methods on `TyCtxtEnsure` in `rustc_middle::mir::interpret::queries` | > These comments (also the one below) are wrong now -- they talk about the return value of a function that doesn't return anything! I have no idea what is going on here so if someone could make a PR to update the comments, that would be much appreciated. :) _O | labels: A-docs, C-bug, A-contributor-roadblock, A-query-system", "label": "question", "label_id": 4} {"id": "rust_152510", "text": "Cleanup: go through `bootstrap.py` and make sure we specify explicit `open()` encodings | > Remark: we should go through `bootstrap.py` and make sure we specific explicit `open()` encodings, as far as I am aware there is a reasonable desire to want to make a future change in Python 3.* where `open()` defaults to UTF-8 encoding, which could break `o | labels: C-cleanup, T-bootstrap, A-Python", "label": "question", "label_id": 4} {"id": "rust_147465", "text": "Rust 1.90 causes Wasm crash by out of memory | After updating to Rust 1.90.0, Wasm becomes to be crashed by out of memory. The reproduce senquence is | labels: I-crash, regression-from-stable-to-nightly, O-wasm, C-bug, C-external-bug", "label": "critical_bug", "label_id": 0} {"id": "rust_145866", "text": "RISC-V Extension Changes coming to LLVM 22 | In LLVM 22.x, we intend to simplify how the C and Zc* extensions are handled in the LLVM backend, in the change llvm/llvm-project#155035. This should more closely align with how these instructions are specified in the RISC-V specification. In clang, we are rel | labels: A-LLVM, T-compiler, O-riscv", "label": "medium", "label_id": 2} {"id": "rust_128203", "text": "Tracking Issue for `rwlock_downgrade` | foo.rs:4:1 | 4 | fn foo() -> | labels: A-lints, A-visibility, T-compiler, A-impl-trait, C-bug, L-private_interfaces", "label": "medium", "label_id": 2} {"id": "rust_151832", "text": "SIGSEGV during stage1 compilation of `proc_macro` for `i686-win7-windows-msvc` | Cross-compiling the stage1 from `x86_64-unknown-linux-gnu` to `i686-win7-windows-msvc` now seems to crash during the compilation of `proc_macro`: ``` Building stage1 library artifacts (stage1:x86_64-unknown-linux-gnu -> stage1:i686-win7-windows-msvc) Compiling | labels: I-crash, A-LLVM, T-compiler, C-bug, A-proc-macros, llvm-fixed-upstream", "label": "high", "label_id": 1} {"id": "rust_71850", "text": "Reuse LTO products for incremental builds when deps are unchanged | Incremental builds with LTO (`thin` or `fat`) always take the same amount of time (~10s on [my project](https://github.com/fenollp/reMarkable-tools/tree/730e3fc2c100a713abdeebeb434a9d86aa2a48cc/marauder)) when dependencies are unchanged. It seems to take as lo | labels: A-linkage, C-enhancement, I-compiletime, T-compiler", "label": "low", "label_id": 3} {"id": "rust_49569", "text": "Cryptic LTO-related error message when performing `include_bytes!` on large files | When trying to include a large (> 500MiB) binary in a program, the compiler crashes with an error message relating to LTO (Link time optimization?) I tried this code: ```rust fn main() { // the file below was generated with // $ dd if=/dev/urandom of=output.da | labels: A-codegen, A-diagnostics, T-compiler, C-bug", "label": "medium", "label_id": 2} {"id": "rust_152347", "text": "regression: name resolution fails to find constant? | I'm not sure if this is our fault or something in the underlying library... ``` [INFO] [stdout] error[E0425]: cannot find value `TEST_MODULE_ID` in this scope [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/abstract-t | labels: A-resolve, T-compiler, regression-from-stable-to-beta, P-critical", "label": "critical_bug", "label_id": 0} {"id": "rust_151124", "text": "ICE: `DefId(..)): reachable Public > nominal Restricted(DefId(..)` | :2:5 | 2 | 0usize as *const U | ^^^^^^^^^^^^^^^^^^ ``` I | labels: C-enhancement, A-diagnostics, T-compiler, D-papercut, D-terse", "label": "low", "label_id": 3} {"id": "rust_151904", "text": "Rustdoc syntax highlighting of `ident !=` is displayed as a macro invocation `ident!` | # Code ```rs if layout != Layout::new::() { return Err(new_value); } ``` [Click here to view this live](https://docs.rs/tokio-util/0.7.18/src/tokio_util/sync/reusable_box.rs.html#106) # Expected Outcome The `layout !=` part is displayed in black. # Actual O | labels: T-rustdoc, C-bug, A-rustdoc-ui", "label": "low", "label_id": 3} {"id": "rust_147883", "text": "\"Size::sub: 0 - 8 would result in negative size\" ICE on sparc | **I tried this code**: ```rust // with --target=sparc64-unknown-linux-gnu #[repr(C)] pub struct Double | labels: P-medium, T-compiler, I-unsound, O-SPARC, C-bug, A-ABI", "label": "high", "label_id": 1} {"id": "rust_141679", "text": "error message for inherent `impl` on `type` that is external could be more explanatory | ### Code ```Rust use std::rc::Rc; pub struct Foo; pub type Function = Rc; impl Function { } ``` ### Current output ```Shell error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> src/lib.rs:6:1 | 6 | impl | labels: A-diagnostics, T-compiler, D-terse", "label": "medium", "label_id": 2} {"id": "rust_81059", "text": "Error message improvement: Manual reborrowing with `&mut *variable` | In this testcase, I wanted to reborrow `outer`, but accidentally wrote `&mut outer` instead of `&mut *outer`. However, the error's suggestion was ```try removing `&mut` here``` which wouldn't have worked. It would be better to have the suggestion ```try adding | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-papercut, D-newcomer-roadblock, D-invalid-suggestion", "label": "medium", "label_id": 2} {"id": "rust_82775", "text": "Tracking Issue for assert_matches | Rust 1.93.0 stable produces `wasm32-wasip2` components that are missing the `fd_close` import from `wasi_snapshot_preview1`. File descriptors are ne | labels: regression-from-stable-to-stable, C-bug, P-critical, T-libs, O-wasi, O-wasip2", "label": "critical_bug", "label_id": 0} {"id": "rust_124309", "text": "std::fs::create_dir_all will stack overflow with big paths | I tried this code: ```rust std::fs::create_dir_all(big_path); ``` I expected to see this happen: doesn | labels: C-bug, T-libs, A-io", "label": "medium", "label_id": 2} {"id": "rust_88051", "text": "Semantically equal `Ordering` matches generate different assembly | https://rust.godbolt.org/z/orxr8sffq I tried this code: ```rust use std::cmp::Ordering; pub fn a(x: i3 | labels: I-slow, C-bug", "label": "medium", "label_id": 2} {"id": "rust_152468", "text": "[ICE]: calling a `Fn` incorrectly in `core` ICEs when making the type error diagnostic | src/main.rs:10:5 | 10 | wut(); | ^^^^^ | = note: could not prove `for<'a> (dyn Tra | labels: A-type-system, I-ICE, A-trait-system, T-compiler, C-bug, T-types", "label": "high", "label_id": 1} {"id": "rust_151358", "text": "[ICE]: `!worker_thread.is_null()` | I tried this code: ```rust use std::future::{IntoFuture, Ready}; async fn test(t: T) -> u32 where T | labels: C-discussion, A-impossible-bounds", "label": "question", "label_id": 4} {"id": "rust_151273", "text": "ICE: `thir_body queried for type_const` (via cfg_attr) | I found this with the following code: ```rust #![allow(incomplete_features)] #![feature(min_generic_const_args)] pub trait Foo { #[cfg_attr(feature = \"some_feature\", type_const)] const N: usize; } impl Foo for u32 { #[cfg_attr(feature = \"some_feature\", type_co | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions, F-min_generic_const_args", "label": "high", "label_id": 1} {"id": "rust_80317", "text": "Function pointer does not fulfill the required lifetime | Function pointers have no lifetime of their own, and essentially are `'static` ([Unsafe Code Guidelines Reference](https://rust-lang.github.io/unsafe-code-guidelines/layout/function-pointers.html)), so I would expect `fn(T) -> U: 'a` to hold for any lifetime ` | labels: A-lifetimes, C-bug, T-types", "label": "medium", "label_id": 2} {"id": "rust_207", "text": "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 correctly causes it ", "label": "medium", "label_id": 2} {"id": "rust_210", "text": "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", "label": "low", "label_id": 3} {"id": "rust_211", "text": "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", "label": "low", "label_id": 3} {"id": "rust_212", "text": "Get generic tags working | Generics only work in rustc for types and functions. Get tags working.", "label": "medium", "label_id": 2} {"id": "rust_213", "text": "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).", "label": "medium", "label_id": 2} {"id": "rust_214", "text": "Get generic objects working in rustc | Rustc needs to learn to capture tydescs into generic objs. Requires issue #213.", "label": "medium", "label_id": 2} {"id": "rust_215", "text": "Get generic closures working in rustc | Rustc needs to learn to capture tydescs into generic closures. Requires issue #213.", "label": "medium", "label_id": 2} {"id": "rust_216", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_217", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_218", "text": "Teach rustc to do vec-append / growth | Rustc doesn't have any support for appending to vectors. Needs it. | labels: E-easy", "label": "question", "label_id": 4} {"id": "rust_219", "text": "Teach rustc to do FRU | Rustc doesn't know how to do rec(a=b with x) for functional record update. Needs to learn.", "label": "medium", "label_id": 2} {"id": "rust_220", "text": "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.", "label": "question", "label_id": 4} {"id": "rust_221", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_227", "text": "Fix fixed-point iteration in type unification | Can infinite loop. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_228", "text": "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", "label": "low", "label_id": 3} {"id": "rust_229", "text": "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 cause of se | labels: A-type-system, I-crash", "label": "high", "label_id": 1} {"id": "rust_232", "text": "add typestate pass to rustc | rustc has no typestate checker. add one.", "label": "medium", "label_id": 2} {"id": "rust_233", "text": "add effect-checking pass to rustc | rustc has no effect-checking pass. add one.", "label": "medium", "label_id": 2} {"id": "rust_234", "text": "add kind system and kind-checking pass to rustc | rustc has no kind system, now kind-checking pass. add one.", "label": "medium", "label_id": 2} {"id": "rust_235", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_236", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_237", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_238", "text": "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 term | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_239", "text": "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.)", "label": "medium", "label_id": 2} {"id": "rust_240", "text": "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-enhancement", "label": "low", "label_id": 3} {"id": "rust_242", "text": "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 rustboot's ha", "label": "medium", "label_id": 2} {"id": "rust_243", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_244", "text": "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", "label": "question", "label_id": 4} {"id": "rust_245", "text": "support dtors in rustc | rustc has no support for obj drop blocks (dtors). implement these. | labels: E-easy", "label": "question", "label_id": 4} {"id": "rust_249", "text": "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 but found rustc.std.opt", "label": "medium", "label_id": 2} {"id": "rust_250", "text": "\"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`.", "label": "medium", "label_id": 2} {"id": "rust_254", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_255", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_256", "text": "foreach-nested-* fail | Fails in trans_path.", "label": "medium", "label_id": 2} {"id": "rust_257", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_258", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_259", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_260", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_261", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_262", "text": "integral-indexing fails | Assertion failed: (C1->getType() == C2->getType() && \"Op types should be identical!\"), function get, file Constants.cpp, line 1425. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_267", "text": "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 the impo | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_268", "text": "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 ", "label": "question", "label_id": 4} {"id": "rust_269", "text": "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 on how", "label": "medium", "label_id": 2} {"id": "rust_270", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_275", "text": "\"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 informative error messa", "label": "medium", "label_id": 2} {"id": "rust_276", "text": "Hello World | Just for the record, how would you write a sample hello world program in Rust?", "label": "medium", "label_id": 2} {"id": "rust_277", "text": "`rustc -pp lib/_str.rs` corrupts memory | Looks like it's trying to call take glue on an already-freed token.", "label": "medium", "label_id": 2} {"id": "rust_291", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_293", "text": "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", "label": "high", "label_id": 1} {"id": "rust_300", "text": "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 will e | labels: I-slow, A-codegen", "label": "low", "label_id": 3} {"id": "rust_301", "text": "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're miscalc", "label": "medium", "label_id": 2} {"id": "rust_320", "text": "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 aliased. The check in the main | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_322", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_324", "text": "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) -> but found fn() -> int (incorrect", "label": "medium", "label_id": 2} {"id": "rust_325", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_330", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_331", "text": "Implement \"walk\" | We should be able to just visit the tree in rustc, not have to fold over it every time.", "label": "medium", "label_id": 2} {"id": "rust_332", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_333", "text": "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(getOperand(1)->getType())->getElementType() && \"Ptr must be a pointer to ", "label": "medium", "label_id": 2} {"id": "rust_335", "text": "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'. 1. Running pass 'M", "label": "medium", "label_id": 2} {"id": "rust_342", "text": "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", "label": "low", "label_id": 3} {"id": "rust_345", "text": "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", "label": "low", "label_id": 3} {"id": "rust_352", "text": "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", "label": "low", "label_id": 3} {"id": "rust_355", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_356", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_358", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_359", "text": "'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", "label": "medium", "label_id": 2} {"id": "rust_360", "text": "--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", "label": "low", "label_id": 3} {"id": "rust_361", "text": "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", "label": "low", "label_id": 3} {"id": "rust_362", "text": "'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", "label": "medium", "label_id": 2} {"id": "rust_363", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_364", "text": "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; } } ```", "label": "medium", "label_id": 2} {"id": "rust_367", "text": "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] | labels: A-type-system", "label": "high", "label_id": 1} {"id": "rust_368", "text": "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[]; ^ ```", "label": "medium", "label_id": 2} {"id": "rust_369", "text": "Bindings with the same name on the same level are not caught | Instead, one of them silently takes precedence.", "label": "medium", "label_id": 2} {"id": "rust_370", "text": "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 `import foo = foo::foo` has t", "label": "medium", "label_id": 2} {"id": "rust_372", "text": "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)", "label": "medium", "label_id": 2} {"id": "rust_374", "text": "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) ==15459== by 0x8072DA6: _ru", "label": "medium", "label_id": 2} {"id": "rust_375", "text": "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 Manager' on module 'rust", "label": "medium", "label_id": 2} {"id": "rust_376", "text": "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 to | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_377", "text": "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; } ```", "label": "medium", "label_id": 2} {"id": "rust_379", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_383", "text": "Unused variables should be reported as warnings | Title says it all. This could be done in resolve perhaps. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_385", "text": "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 mechanism for re", "label": "medium", "label_id": 2} {"id": "rust_387", "text": "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 used, whi", "label": "medium", "label_id": 2} {"id": "rust_388", "text": "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] }; ```", "label": "medium", "label_id": 2} {"id": "rust_390", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_391", "text": "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::ret_type llvm::cast(const Y&) [with X = llvm::IntegerType, Y = llvm::Type_, typename llvm::cast_retty 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", "label": "low", "label_id": 3} {"id": "rust_411", "text": "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, A-type-system", "label": "medium", "label_id": 2} {"id": "rust_412", "text": "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 reference via extern | labels: A-frontend, A-linkage, A-LLVM, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_413", "text": "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 | labels: A-frontend, A-type-system", "label": "medium", "label_id": 2} {"id": "rust_414", "text": "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", "label": "low", "label_id": 3} {"id": "rust_415", "text": "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", "label": "question", "label_id": 4} {"id": "rust_416", "text": "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.", "label": "medium", "label_id": 2} {"id": "rust_417", "text": "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", "label": "medium", "label_id": 2} {"id": "rust_418", "text": "Full macro system | Once syntax extension is working (issue #38), implement a \"real\" macro system, for some definition of \"real\". Doesn't have to be state of the art, just the basics (some form of hygiene and/or gensym, various quoters and splicers, a short macro-definition form). | labels: C-enhancement, A-syntaxext", "label": "low", "label_id": 3} {"id": "rust_419", "text": "Pretty-printing wraps trailing paren | Not sure why, but pretty printing an expr list (foo, bar) will often produce: ``` (foo, bar ); ``` Ideally the ) would be considered part of the final token in the list, indivisible from wherever it gets wrapped to. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_420", "text": "Pretty-printing injects new lines for line-trailing comments | Pretty printing a list like this: ``` rec(foo, // comment 1 bar, // comment 2 baz) ``` Turns into this: ``` rec(foo, // comment 1 bar, // comment 2 baz) ``` Which is close, but not quite right. It seems to be always opening a new line for a line-comment; maybe if it were to check | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_421", "text": "Pretty-printing binops should have lower affinity somehow | When printing a binop expression containing fn calls, we wind up wrapping rather late: ``` foo(a, b, c) + bar(d, e, f) ``` will sometimes print as ``` foo(a, b, c) + bar(d, e, f) ``` rather than ``` foo(a, b, c) + bar(d, e, f) ``` or similar (+ could be on the previous line, what | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_422", "text": "Pretty-printing support for words that aren't broken relative to their neighbour | Given the way the pretty printer is structured, generating a token at a time, it'd probably be useful to have token types that the pretty printer considered effectively \"indivisible\" with the word before (or after, or both) them. Otherwise we have to mix stringifying with adjacen | labels: A-pretty", "label": "question", "label_id": 4} {"id": "rust_423", "text": "Pretty-print crate files | Not a huge issue since our crates are still relatively small, but crates and crate directives are not presently supported. Probably should be. | labels: A-pretty", "label": "question", "label_id": 4} {"id": "rust_424", "text": "Implement log for more types | Currently, log works for integral, floating point, and string types. It will raise an error in trans on other types. We should add support for other types. | labels: A-runtime", "label": "question", "label_id": 4} {"id": "rust_427", "text": "write a tutorial for the docs | Currently we just throw the user into a reference manual and hope for the best. A tutorial section would be good.", "label": "low", "label_id": 3} {"id": "rust_428", "text": "unit test machinery | We want the language to ship with an integrated unit-testing system of sorts. Nothing too fancy, just a \"no excuses\" sort of entrypoint _in_ the language plus some driver logic to collect tests and make a binary that shells out to a runner with a stock interface. Possibly copy D | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_429", "text": "website | At some point we need to actually flesh out rust-lang.org to be more than just a github project page. Use the github-pages system (http://pages.github.com/) with a CNAME to rust-lang.org. And a labs VM for dynamic content (perf measurements and such).", "label": "medium", "label_id": 2} {"id": "rust_430", "text": "website | At some point we need to actually flesh out rust-lang.org to be more than just a github project page. Use the github-pages system (http://pages.github.com/) with a CNAME to rust-lang.org. And a labs VM for dynamic content (perf measurements and such).", "label": "medium", "label_id": 2} {"id": "rust_431", "text": "make trans contexts into objects | Nobody should have to write cx.fcx.lcx.ccx.tcx. Everyone winces when they see it. Fix this. Put the contexts in objects that pick such things up from their parents. No functional changes, just a whole lot of shoving stuff around. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_435", "text": "Add support for binding a method off an impl | Make it legal to do the following: ``` obj foo() { fn add5(n: int) -> int { ret n + 5; } } fn add5(n: int) -> int { ret n + 5; } fn main() { let fiveplusseven = bind add5(7); log_err fiveplusseven(); // Can't do this currently let my_foo = foo(); let fiveplusseven_too = bind my_f | labels: A-frontend, A-type-system", "label": "question", "label_id": 4} {"id": "rust_436", "text": "-L sysroot should be default | The sysroot should be searched for the standard library by default. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_437", "text": "Error messages should follow a consistent style | We've decided for now that error messages should begin with a lowercase letter. Variable names and type names should follow a consistent format; I've started using backquotes following Markdown, but single quotes would work too. | labels: A-frontend, E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_438", "text": "put librustrt and librustllvm in stageN directories of build | Currently all stages use the same C++ libs. This can make snapshot migration hard, and requires over-large LD_LIBRARY_PATHs. Make copies of them in stage0 ... stage1 when building. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_439", "text": "Print out the offending line on error | When rustc emits an error, we should print out the offending line. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_440", "text": "rustc shouldn't stop after the first error | After the first error, we should keep going in some cases. As a first stab at this, we could abandon the current function and try to resolve/typecheck other functions. | labels: A-driver", "label": "medium", "label_id": 2} {"id": "rust_441", "text": "rpath binaries so no LD_LIBRARY_PATH is needed | use of rpath and $ORIGIN when linking, and we won't need LD_LIBRARY_PATH settings at all. implement this. | labels: E-easy, A-linkage", "label": "low", "label_id": 3} {"id": "rust_442", "text": "make all error messages lowercase | We have mixed case error messages. Make them all lower case. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_443", "text": "rustc should know how to run the linker on all platforms | And preferably `ld`, not `gcc`. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_444", "text": "try to ensure all errors use spans | We have a bunch of cases of sess.err in the code that ought to be sess.span_err -- that is, they should carry a source position indicating the origin of the error. Fix these. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_445", "text": "make sure every FIXME in the code has an issue open for it | Also make sure the issue number is noted next to the FIXME. This requires periodic re-checking. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_446", "text": "Disallow binding to alias parameters | This is unsafe (until we have interior/nonescaping lambdas). | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_448", "text": "Multiline strings | We should support multiline strings, possibly both by backslashing escapes and with Python-style triple-quoted strings. | labels: A-frontend, E-easy", "label": "question", "label_id": 4} {"id": "rust_449", "text": "Or-patterns | It would be nice to be able to do something like: ``` alt (thingie) { case (foo) case (something_much_like_foo) { ... } ... } ``` or even ``` case (foo | something_much_like_foo) { ... } ``` (Feel free to close this if it's a dup of an existing issue. I heard it was on the featur | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_452", "text": "if/alt expressions don't understand how to return functions that fail | In the following example the first arm of the if expression doesn't translate: ``` fn f() -> ! { fail } fn g() -> int { auto x = if (true) { f() } else { 10 }; ret x; } ``` Trans thinks that f() returns int (because x is int) and tries to copy the result of f, which is not int. R | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_454", "text": "Implement \"fail EXPR\" for convenience | `log_err \"Going down in flames...\"; fail;\"` code is very common. It'd be nice to able to optionally supply an error message with `fail` statements. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_456", "text": "Implement per-symbol and per-crate versioned-API support | Currently we have very weak support for user-meaningful version numbers; a per-crate version number that is possibly mangled into the crate compilation name, but nothing else. Ideally we'd be using a symbol-versioning approach similar to the GNU-style @@vers stuff, outlined in th | labels: A-linkage, A-LLVM, C-enhancement", "label": "question", "label_id": 4} {"id": "rust_457", "text": "Serialize the non-exported metadata into the crate as well, for documentation purposes. | Currently front::eval throws away all non-exported metadata while interpreting the crate directives. This is not right; it should store the non-exported stuff in the crate as well, tagged differently but still extractable by tools. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_458", "text": "Get dynamic loading working | For syntax extensions (and possibly semantic extensions) to load in from external crates, we need to dynamically load them. Currently the library-scanning machinery is a bit too weak to handle this, and there's no os-level interface in the standard library for fetching symbols fr | labels: A-linkage, C-enhancement, P-medium", "label": "low", "label_id": 3} {"id": "rust_459", "text": "Perform meta tag matching to bind to crates | Currently 'use std' is resolved by unambiguously opening libstd.so (or .dylib, .dll) in each of the library search paths. This is inadequate. We should be opening all relevant crates and scanning the metadata sections looking for meta tag matches. | labels: A-frontend, A-linkage", "label": "medium", "label_id": 2} {"id": "rust_460", "text": "Allow assignment to aliases only when they were declared mutable | Right now, the word 'mutable' after the & symbol is simply skipped by the parser. Will need to remember that an alias is mutable, and disallow assigning to them when it is not.", "label": "medium", "label_id": 2} {"id": "rust_461", "text": "Port to x64 at least, not just x86. | Hopefully we can get to a point where we only need a ucontext impl to port to a new platform. Still not quite at this stage yet.", "label": "medium", "label_id": 2} {"id": "rust_463", "text": "Allow tasks to return values | Right now tasks are all void. If we could return values from tasks, it would make the \"go do this asynchronously and get back to me\" pattern a lot easier. It would require changes to the type system though (task becomes task[T]), but most of the plumbing is in place to return a v", "label": "medium", "label_id": 2} {"id": "rust_464", "text": "Remove rustboot \"trans_const_lval bug\" workaround | There's a lot of obsolete `auto f = foo; g(f);` code to work around the fact that you couldn't say `g(foo);` when `foo` was a function in rustboot. We should remove this. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_465", "text": "Have human-readable source for vec append glue | Currently vec append glue is LLVM bitcode `vec_append.ll`. This isn't very human-readable. | labels: A-runtime, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_466", "text": "Experiment with moving the task pointer to thread local storage | We currently thread the task pointer through all Rust functions, which increases register pressure and makes calls slightly more expensive. It may well be cheaper to put it in thread-local storage. We should experiment with this. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_467", "text": "Compile pattern matches to switch statements | Right now pattern matching is always O(n) in the number of cases. This is suboptimal. Tags should be compiled to switch statements. | labels: I-slow", "label": "medium", "label_id": 2} {"id": "rust_468", "text": "Accept .<> as well as [] for type parameters | I think ES4-style `option.` type parameters have reached consensus. The `>>` ambiguity should be fixed as well; easiest solution IMO is just to define right shift as two consecutive greater-than signs. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_469", "text": "Allow pattern matching over structural types | We should be able to pattern match over tups and recs in particular. | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_470", "text": "Allow multiple vars to be declared in one declaration | Allowing `auto a, b;` would be a nice convenience. | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_473", "text": "move librustrt.so and librustllvm.so into sysroot | having them in their own non-stageN directories makes many things more delicate than necessary", "label": "medium", "label_id": 2} {"id": "rust_474", "text": "make target-run compiled artifacts per-arch | once in sysroot, librustrt.so should be built as stageN/lib/$arch/librustrt.so and recompiled for every target in the targets list for the current compiler. rustc and librustllvm should probably only be compiled for every host in the host list. Or, if we're lucky, we only have on", "label": "medium", "label_id": 2} {"id": "rust_475", "text": "Allocating memory from rust involves 5 layers of indirection | Allocating memory from rust involves 5 layers of indirection upcall_malloc -> rust_task::malloc -> rust_dom::malloc -> memory_region::malloc -> rust_srv::malloc -> malloc And rust_srv::malloc is virtual. | labels: A-runtime, I-slow", "label": "medium", "label_id": 2} {"id": "rust_476", "text": "`rustc -S --emit-llvm` should emit LLVM assembler | For compatibility with clang and for debugging convenience, `rustc -S --emit-llvm` should disassemble the bitcode. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_477", "text": "Eliminate the builder objects in lib/llvm and trans | Very large objects slow down typechecking and add vtable dispatch overhead for no real benefit that I can see. Instead of `bcx.build.Foo(…)` we could just have functions like `Foo(bcx, …)`. This is a mechanical change. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_478", "text": "Make all of our GEPs InBoundsGEPs | All of our GEP instructions are really InBoundsGEPs. Using InBoundsGEPs makes it more likely for SROA to succeed. LLVM often mops up, but this takes some of the pressure off it. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_479", "text": "Typechecker does not require LHS of assignment to be an lval | Assigning to something that isn't an lval produces an error in trans, not during typechecking: fn main() { 5 = 1; } produces the error: fail.rs:2:1:2:2: error: internal compiler error unimplemented expr variant in trans_lval: 5 | labels: A-frontend", "label": "high", "label_id": 1} {"id": "rust_480", "text": "Variable sized function arguments don't fail until trans | Trying to compile \"fn test[X](X l) { }\" results in \"upcall fail 'arg.mode != ty::mo_val', ../src/comp/middle/trans.rs:736\" | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_481", "text": "Resolve should make sure variables aren't used before they're declared | Typestate usually errors out when this happens, but the message is confusing. This should be picked up in resolve.", "label": "medium", "label_id": 2} {"id": "rust_482", "text": "internal error \"imports and matches don't agree\" on multiple glob-import when at least one source is from a different crate | For example: use std; import std::vec::_; import alternate_supplier::_; ``` mod alternate_supplier { fn swap() {} } fn main() { swap() } ``` The internal error occurs when trying to generate an error message indicating that `swap` is doubly-imported. The problem is that, as `std:", "label": "medium", "label_id": 2} {"id": "rust_483", "text": "Using the result of an assignment expression results in an LLVM assert | I am not sure what the correct behavior should be (parse error, typecheck error, working like in C), but I am pretty sure this isn't it. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_484", "text": "Typechecker doesn't properly check assignment operations | The typechecker treats assignment operations exactly like normal assignment and thus does not require that the values are of the appropriate type for the operation being performed. auto x = tup(1, 5); x += tup(3, 5); will pass typechecking but trip an LLVM assertion. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_486", "text": "Implement an alias analysis pass | One of the nice things about our type system is that we have very strong alias information. We can feed this information to LLVM to help guide its optimizations. | labels: A-LLVM, I-slow", "label": "medium", "label_id": 2} {"id": "rust_487", "text": "Extend metadata to items, not just crates | Crates support attributes through the `meta` statement. To support conditional compilation, among other things, we want to allow attributes on all items. Instead of using the meta statement, attributes will be applied using syntaxes like the following ``` #[foo] mod bar { } ``` ` | labels: A-frontend", "label": "question", "label_id": 4} {"id": "rust_488", "text": "Automatically 'bind' generic functions when their value is taken | Currently this doesn't work: ``` fn generic[T](&T x) -> vec[T] { ret [x]; } fn main() { auto f = generic; log_err f(1).(0); } ``` It could, though -- the compiler has enough type information available when the value of `generic` is taken to statically allocate a closure that has ", "label": "medium", "label_id": 2} {"id": "rust_489", "text": "More robust support for conditional compilation | Use item attributes to support conditional compilation. Items marked with a certain attribute, e.g. `#[cfg(test)]` will only be translated when rustc is passed a flag for the 'test' configuration. Remove the target_os hack (as used in std.rc)", "label": "question", "label_id": 4} {"id": "rust_492", "text": "Find a solid way to pass span info around trans | The current approach (8cbdaf4f93ecc775727d334890014ca929ad2b36) puts a span in the block_ctxt record, probably because that's already being passed around. The two have very little to do with each other though, and the re-creating of block contexts makes it very easy to accidental | labels: C-cleanup", "label": "low", "label_id": 3} {"id": "rust_493", "text": "Modules can't be defined inside of functions | While pretty much useless, the following should work: ``` fn f() { mod m { } } ``` Currently fails in typestate. | labels: A-frontend, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_494", "text": "Context switching doesn't pass valgrind on OS X when built with Clang | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_495", "text": "Task startup makes cross-language/module fastcalls | This isn't safe, in general. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_496", "text": "Context creation doesn't respect stack alignment | labels: A-runtime, I-crash", "label": "high", "label_id": 1} {"id": "rust_497", "text": "Pretty-printer prints comments above a case too late | In parser.rs, we now have... ``` case ( //the lexer can't tell the different kinds of stars apart ) : token::BINOP(token::STAR)) { glob = true; p.bump(); } ``` The comment used to be above the case, but ends up being printed after the \"case (\" part has already been output. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_498", "text": "upcall_vec_append can crash when self-appending | use std; import std::vec; fn main() { let vec[int] a = [0]; auto i = 20; while (i > 0) { a += a; i -= 1; } } I suspect, but haven't confirmed, the following: If a vector that is in the process of self-appending (v += v) grows, we can realloc the existing vector pointer and invali | labels: A-runtime, I-crash", "label": "high", "label_id": 1} {"id": "rust_499", "text": "Fix pretty-printing of anonymous objects | Right now they just pretty-print as `anon obj`. Fix this. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_500", "text": "Binary operations are not type checked | This fails in trans: ``` fn main() { auto x = true; auto y = 1; auto z = x + y; } ``` | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_501", "text": "Pretty printer comment drift in tag definitions | The pretty printer caused the following comment drift in the ast definitions: expr_assign(@expr /\\* TODO: @expr|is_lval _/, @expr, ann); became expr_assign(@expr, /_ TODO: @expr|is_lval */@expr, ann); | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_502", "text": "std::term needs better detection of color terminals | Right now it just checks the value of $TERM, leaving lots of users unable to see rustc's awesome colored errors | labels: C-enhancement", "label": "low", "label_id": 3} {"id": "rust_506", "text": "Internal compiler error when trying to spawn a native function as a task | I see 'internal compiler error ret_ty_of_fn_ty() called on non-function type' when trying to compile: native \"rust\" mod rustrt { fn uvtask(); } fn iotask() { let task iothread = spawn rustrt::uvtask(); }", "label": "high", "label_id": 1} {"id": "rust_507", "text": "Unable to pass channels across more than one task | Test case is approximately as follows: 1. create a channel and pass it to a new task 2. have the new task pass the channel to another new task 3. from that newest task, send on the channel 4.receive on the original task Expected: successful exit of program Actual: - warning: '_un", "label": "medium", "label_id": 2} {"id": "rust_508", "text": "Implement M:N task to OS thread scheduling. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_509", "text": "Remove upcall_join | This is dead code now that join has been moved to the standard library. | labels: C-cleanup", "label": "low", "label_id": 3} {"id": "rust_510", "text": "Directly call glue functions when we can instead of picking them out of the type descriptor | We always pull type glue out of a type descriptor to call it, even when the type descriptor in question is statically known. This makes debugging the generated code harder and makes LLVM do more work than it needs to to clean it up.", "label": "question", "label_id": 4} {"id": "rust_511", "text": "Passing \"none\" to an &mutable option::t[T] leaks | Just what it says: if a alias parameter has type `mutable option::t[T]` for some `T`, passing a literal `none` to it leaks.", "label": "medium", "label_id": 2} {"id": "rust_513", "text": "Typechecking if apparently doesn't require a boolean. | I accidentally wrote `if(path_is_absolute)` instead of `if(path_is_absolute(p))` and got an LLVM assertion error instead of a rust type error. This doesn't seem right to me. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_514", "text": "equal_type_structures should just be == | But last time I tried that, it exposed a bug in translation of cmp glue. So we should fix that.", "label": "medium", "label_id": 2} {"id": "rust_515", "text": "Figure out and implement task lifetime rules. | Originally tasks were going to be lexically scoped, so they die as soon as the task variable goes out of scope on the parent task. This is counter-intuitive to a lot of people, so we might have a list of child tasks and refer to them by handles instead. This also would let us rep", "label": "medium", "label_id": 2} {"id": "rust_516", "text": "Incorrect type in 'mismatched types' error | ``` fn main() { auto x = true; auto y = 1; auto z = x + y; } ``` reports \"error: mismatched types: expected bool but found bool (types differ)\". Should be \"bool but found int\". Also, the reported span encompasses the entire binop when it should probably just cover the y variable. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_517", "text": "Cache results of type_has_pointers | At least 16.1% of translation time is spent in that function.", "label": "medium", "label_id": 2} {"id": "rust_518", "text": "Change \"mutable?\" to something else (\"const\"?) and fix covariance/invariance | AIUI the general consensus was that we should implement a mutable \"slot\" type. This is basically equivalent to an interior record with one mutable field. This allows us to remove the `mutable?` botch. | labels: C-cleanup, A-type-system", "label": "low", "label_id": 3} {"id": "rust_519", "text": "Tagged union typechecking regression | Checkout 612f447e698ad127f57af1900e82923b8f5fee9b in my fork and try to build. I see the following error: ../src/lib/aio.rs:50:8:50:17: error: mismatched types: expected port[iorequest] but found port[iorequest](types differ) This used to work a few days ago but I've lost track o", "label": "high", "label_id": 1} {"id": "rust_520", "text": "Cannot spawn task with channel and string | :0:0:0:0: error: internal compiler error unexpected type in trans::deep_copy: str Testcase: type ctx = chan[int]; fn iotask(ctx cx, str ip) { } fn main() { let port[int] p = port(); spawn iotask(chan(p), \"localhost\"); }", "label": "high", "label_id": 1} {"id": "rust_521", "text": "Valueless ret expression in block tail position doesn't parse | ``` fn f() { auto x = alt (true) { case (true) { 10 } case (false) { ret } }; } ``` Parser expects ret to be followed by a semicolon. Using `ret ()` works as expected.", "label": "medium", "label_id": 2} {"id": "rust_522", "text": "Build NSIS installer for rust toolchain on windows | The NSIS ( http://nsis.sourceforge.net ) installer is probably the best bet for deployment on windows. Make a basic package that installs rustc and the docs and libs to C:\\Program Files\\Rust or such.", "label": "low", "label_id": 3} {"id": "rust_523", "text": "Instantiating the type parameters of a function without calling it fails in LLVM | ``` fn f1[T](int x) { log x; } fn main() { auto f2 = f1[str]; } ``` results in rustc: Instructions.cpp:962: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && \"Ptr must be a pointer to Val type", "label": "medium", "label_id": 2} {"id": "rust_524", "text": "Insert yield checks at appropriate places | labels: A-runtime, E-hard, A-concurrency, P-medium", "label": "medium", "label_id": 2} {"id": "rust_526", "text": "native types should not all be the same type | Currently all types declared as 'native' wind up as the same type in the type checker. This is wrong. They should be considered nominal types. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_527", "text": "Experiment with interpreted glue | We spend lots of time generating glue, even for stuff like cmp glue that is cold. We could emit a declarative description of the type and have a generic \"cmp\" function that uses that description.", "label": "medium", "label_id": 2} {"id": "rust_528", "text": "Bake in default sysroots appropriately | We should bake in a default sysroot into the binary where rustc looks for all of its stuff (stdlib, glue, etc). | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_529", "text": "Make rustc installable with `make install` | This depends on issue #528. `make install` should do the right thing.", "label": "medium", "label_id": 2} {"id": "rust_530", "text": "Use fastisel at -O0 | Clang does this and it should buy us some compile perf for debugging.", "label": "medium", "label_id": 2} {"id": "rust_531", "text": "move entire communication system into library | Ports, channels and tasks are going to sink into library features. This includes send and receive operators, as well as communication-alt expressions. | labels: A-runtime, A-type-system", "label": "medium", "label_id": 2} {"id": "rust_532", "text": "Assert failure with 1-argument #fmt call | `#fmt(\"test\")` results in \"upcall fail 'Assertion start <= end failed\" | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_533", "text": "Convert rustc over to interior vectors and remove exterior vectors | We should convert rustc over to interior vectors and remove exterior vectors.", "label": "medium", "label_id": 2} {"id": "rust_534", "text": "improve make performance | Make appears slow to start, and per-target execution is slow. Speed this up.", "label": "medium", "label_id": 2} {"id": "rust_535", "text": "Implement overloading | Synopsis: ``` mod foo { overload fn f(int x) { log x; } } mod bar { overload fn f(str s) { log s; } } import foo::f; import bar::f; fn main() { f(3); f(\"hello world\"); } ``` Result: ``` 3 hello world ``` | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_536", "text": "Investigate LLVM ARC optimizations | LLVM now has optimizations for reference counting (yay!). We should look into this. | labels: A-LLVM, I-slow, E-hard", "label": "medium", "label_id": 2} {"id": "rust_537", "text": "Implement a copy operator and make it mandatory in some cases | For what cases, we aren't sure at the moment.", "label": "medium", "label_id": 2} {"id": "rust_538", "text": "Adding support for extending objects with new fields | This will be a pretty big feature, involving the parser and, importantly, the resolver as well as the typechecking and translation passes. Currently xfail'd test: src/test/run-pass/anon-objs-with-fields.rs.", "label": "question", "label_id": 4} {"id": "rust_539", "text": "Adding support for 'degenerate' anonymous objects | We want to add support for 'degenerate' anonymous objects that don't add any new methods or fields. This might seem trivial, but part of making it work is ensuring that calls to anonymous objects \"fall through\" appropriately, so that calls to methods that were on the original obj", "label": "question", "label_id": 4} {"id": "rust_540", "text": "Adding support for extending objects with methods that contain simple self-calls | By \"simple self-calls\", we mean that no method overloading is involved. I think the place this is currently failing is in typechecking, although I need to make sure. Currently xfail'd test: src/test/run-pass/anon-obj-with-self-call.rs.", "label": "question", "label_id": 4} {"id": "rust_541", "text": "Alias analysis should take move ops into account | The rhs of a move gets clobbered/invalidated, so you shouldn't be able to move stuff that's aliased.", "label": "medium", "label_id": 2} {"id": "rust_542", "text": "Use move semantics for function and block returns | (Where block return is the thing that happens with semicolon-less last expressions.) Both guarantee that the returned value is no longer live after the return, so there doesn't seem to be a reason to copy. | labels: I-slow", "label": "medium", "label_id": 2} {"id": "rust_543", "text": "Adding support for extending objects with methods that override existing methods in the presence of self-calls | This is tricky because we have to make sure that the meaning of 'self' is also overridden. Currently xfail'd test: src/test/run-pass/anon-obj-overriding.rs.", "label": "question", "label_id": 4} {"id": "rust_544", "text": "Implement dropping predicates in typestate | Typestate doesn't handle move correctly -- any predicates mentioning the thing being de-initialized should be dropped. Also, assignment to a local should invalidate any predicates on the LHS variable. Implement this,", "label": "medium", "label_id": 2} {"id": "rust_546", "text": "Wrong types reported in some let binding type errors | Trying to compile the program fn main() { auto b = \"hi\"; let int i = b; } Results in the error: error: mismatched types: expected str but found str (types differ) | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_547", "text": "Replace some native module syntax with attributes | Native mod declarations have some optional syntax (abi, native name) which can be turned into attributes. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_548", "text": "Write swap in assembly instead of C++ | Right now, C++ compilers like to make set_registers into a tail call, which causes problems when get_registers returns the second time. To get around this, we should write the swap context function in assembly instead of disabling compiler optimizations.", "label": "medium", "label_id": 2} {"id": "rust_550", "text": "Type inference not working in anonymous functions | ``` auto f = fn() { auto i = 10; }; ``` Cannot determine type for `i`. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_551", "text": "Duplicate alt patterns ignored | fn main() { auto a = 5; alt (a) { case (_) { } case (_) { fail; } } } The program happily compiles and runs to completion.", "label": "medium", "label_id": 2} {"id": "rust_552", "text": "Support static linking crates | Currently a crate is always compiled to a shared library. We should support both regular static linking and LTO. I think we should rename --shared to --lib. This is what it would look at: *) rustc --lib --shared foo.rc -o foo.so *) rustc --lib --static foo.rc -o foo.lib (really j | labels: A-linkage, A-LLVM, A-driver, E-hard, C-enhancement, P-medium", "label": "question", "label_id": 4} {"id": "rust_553", "text": "Add global variables to unsafe | We should support simple global variables. No before main constructors, just plain variables. | labels: C-enhancement, A-codegen", "label": "question", "label_id": 4} {"id": "rust_554", "text": "Implement log in rust | With global variables implemented, we can probably implement log in rust itself. | labels: A-runtime, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_555", "text": "Add support for slices | LLVM uses a lot of StringRef and ArrayRef. They are really handy and efficient, being implemented with just a pointer and size. Some uses of it are safe (call a function with StringRef to a string that outlives the call), some unsafe (StringMap return a StringRef). Go makes this | labels: C-enhancement", "label": "question", "label_id": 4} {"id": "rust_556", "text": "figure out what to do with iterators | We would like to keep the ability of using yield instead of creating iterator \"objects\". One way to implement it with llvm that we discussed is that --- iter f() { yield 1; yield 2; } ... for I in f() } if I == 1 { ret 42; } } ## ... Gets compiled to (pseudo code) {act, i32} the_", "label": "medium", "label_id": 2} {"id": "rust_557", "text": "GEP instead of pointer-to-int and add and back | GEP is a better way to do pointer-to-int. | labels: C-cleanup", "label": "low", "label_id": 3} {"id": "rust_558", "text": "Tool to detect/display function dependencies in Rust crates | This would be useful for many things: - Figuring out which functions are dead and can be removed. - Visualize function dependencies (with `dot`). - Be the basis for a Rust `ccache` workalike. - On-demand, lazy unit tests.", "label": "medium", "label_id": 2} {"id": "rust_559", "text": "Pull glue out of trans | middle::trans is huge. An easy way to make it smaller is pull out the glue-related stuff. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_560", "text": "Split rustc into libraries | Parts of rustc will need to be used outside of the compiler and splitting it up will help improve the design. One possible division: - front - ast, parser, pretty-printer - middle - resolver, typechecker, typestate - back - trans, link, etc. creader needs to be somewhere as well. | labels: C-cleanup", "label": "question", "label_id": 4} {"id": "rust_561", "text": "Better error when types differ only by their boxiness | Instead of having to figure out what is meant by `error: mismatched types: expected block but found @rec(rec(vec[@stmt] stmts,[@expr] expr,node_id id) node,span span) (types differ) ` rustc should just tell me that I don't need the box, maybe by using a span_note. | labels: E-easy, A-type-system", "label": "low", "label_id": 3} {"id": "rust_562", "text": "lib-sha1 segfaults only at -O0 | This seems bad. | labels: I-crash", "label": "high", "label_id": 1} {"id": "rust_563", "text": "Reformat under the major agreed syntax changes | There's a bunch of syntax changes pending. Teach pp and parser to do it, then snapshot, reformat, and resnap. | labels: A-frontend, C-cleanup, A-pretty", "label": "low", "label_id": 3} {"id": "rust_564", "text": "Interior vector syntax should be [T] | Instead of `T[]`, we should use `[T]`. This makes `@int[]` unambiguous: `[@int]` vs. `@[int]`. | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_565", "text": "Add ternary operator | labels: A-frontend, E-easy, A-type-system", "label": "low", "label_id": 3} {"id": "rust_568", "text": "Typechecking doesn't enforce communication immutability requirements | It looks like we'll still attempt to compile attempts to send mutable data on channels or in spawn arguments. This should be disallowed. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_569", "text": "Merge rust_kernel and rust_domain", "label": "medium", "label_id": 2} {"id": "rust_570", "text": "Allow arbitrary constant expressions to be assigned to const items | Right now constants have to be literals and this is getting pretty painful. | labels: A-frontend, A-codegen", "label": "medium", "label_id": 2} {"id": "rust_571", "text": "Allow vector constants | labels: C-enhancement, A-codegen", "label": "low", "label_id": 3} {"id": "rust_574", "text": "Poor error when iterator name missing in for loop | Currently, if you write a loop like this: for (type in named_list) {} you get this message: error: expecting in, found named_list which is really obtuse. An easy heuristic to show a more informative message would be to check whether the iterator is named \"in\", possibly. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_575", "text": "Some forms of float literal don't parse | I expect the following things to parse as float literals but they don't: ``` 12E+99_f32; 12E+99f64; 10f; ``` The last form (without the decimal) isn't mentioned in the Rust documentation, but since it's explicitly marked as a float i would expect it to work. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_576", "text": "Relational binops on unit type are nonsensical | The following is currently what holds for relational binops on () ``` assert (() < ()); assert (() <= ()); assert (!(() > ())); assert (!(() >= ())); ``` Now, because we have relational binops over structural types, we have to either have relational binops over all types, or make", "label": "medium", "label_id": 2} {"id": "rust_577", "text": "Crash comparing ports, channels, tasks | rustc will compile comparisons between ports and comparisons between channels but the code crashes at runtime. Also tasks. | labels: A-runtime, I-crash", "label": "high", "label_id": 1} {"id": "rust_578", "text": "rustc happily compiles non-boolean branch expressions which assert at runtime | auto a = 0u; if (a) { fail } This should be caught at compile time.", "label": "medium", "label_id": 2} {"id": "rust_579", "text": "Implement something like copy & move analysis | Some pass should check whether code doesn't move from locations that should never be moved from (data structure fields can be swapped, if mutable, but never moved out, I think). The same pass can probably verify that no non-copyable values (currently only ty_res) are being copied | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_580", "text": "rust_task::kill appears to just wake the task | In some of the aio code, I would like to kill a task from another task in native code. I have a task which does the following: `while (true) { log \"about to sleep\"; p |> evt; }` however nothing is ever sent to `p`. What I expect to see is one log message however I see a second af", "label": "medium", "label_id": 2} {"id": "rust_581", "text": "Current LLVM trunk incompatible with librustrt. | On 32-bit Linux and LLVM trunk revision 133904 (tip at the time of filing), rustc fails to build (in particular, librustrt fails to link) `rustllvm/MachOObjectFile.o`. This appears to be due to a change in the interface of LLVM's `ObjectFile` probably introduced by revisions 1338 | labels: A-LLVM", "label": "medium", "label_id": 2} {"id": "rust_582", "text": "switch from rand to isaac | There's a cprng that auto-initializes from system entropy in rt. Use that in the scheduler (and anywhere else in rt or std) instead of rand(), please. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_583", "text": "perf bot | We need a part of the website / tinderbox setup that measures \"performance\" in a general sense, so we can see regressions and have a target to try to press downwards. Recommend measuring with linux 'perf' tool on the rustc and libstd builds as well as the contents of the 'bench' ", "label": "high", "label_id": 1} {"id": "rust_584", "text": "Start running runtime test suite again | We have a set of runtime tests written in C++ that are not currently being run. We should be running these. | labels: A-runtime, A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_585", "text": "Replace common::new_seq_hash with std::smallintmap | These do the same thing | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_586", "text": "Postconditions on function return types | I want to be able to write a function with a constraint on its return type. For example: ``` fn add(int x, int y) -> int : * >= x, * >= y { x + y } ``` Here, the \\* refers to the return value. I can't just do this with constraint types, because in this case, add would have to ret | labels: A-runtime, E-easy", "label": "low", "label_id": 3} {"id": "rust_588", "text": "port constructors with types don't parse correctly. | The following snippet doesn't parse and it should. ``` auto p1; p1 = port[int](); ```", "label": "medium", "label_id": 2} {"id": "rust_591", "text": "Require that the RHS of a move be a local variable | This is a bit trickier than just making sure that it is a path of length 1, since it could also be an object field or (soon) an upvar. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_593", "text": "Deadlock in upcall_vec_append/upcall_malloc | `upcall_vec_append` can call copy glue, which can call `upcall_malloc`. `upcall_malloc` tries to grab the scheduler lock too and deadlocks. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_594", "text": "Add warning when return is used | I frequently type return instead of ret, and always end up puzzling over the resulting error for longer than should be necessary. An explicit warning would be nice. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_595", "text": "Add 1:1 Scheduling Mode | Add a way to make each task run in its own thread. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_596", "text": "Worker threads shouldn't busy wait | If there are no tasks available to run, the worker thread should go to sleep and wait for `rust_kernel` to wake them. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_597", "text": "\"Instruction does not dominate all uses\" when translating fixed point combinator | Trying to translate the function
 fn fix[A,B](fn (fn (&A) -> B, &A) -> B f, &A x) -> B { ret f(bind fix(f, _), x); } 
produces the LLVM messages:
 Instruction does not dominate all uses! %19 = load %tydesc** %18 store %tydesc* %19, %tydesc** %6 Instruction does no", "label": "medium", "label_id": 2}
{"id": "rust_598", "text": "Add support for pinning tasks to a certain worker thread | Add a `pinned_on` field to `rust_task`. Add runtime support for setting and unsetting this. Make the scheduler respect it.", "label": "question", "label_id": 4}
{"id": "rust_599", "text": "Add task wakeup callback | Add a callback that fires when a task blocking on a port becomes ready to run again. To do this right, it should require moving the `message_queue` into `rust_task` and doing something with that.", "label": "medium", "label_id": 2}
{"id": "rust_600", "text": "Eliminate copies when initializing a local from a temporary | I don't think we need to copy the data when initializing a local from a temporary; we can just say the local _is_ the temporary. This is analogous to constructor elision in clang: see http://clang.llvm.org/doxygen/CGExprCXX_8cpp_source.html#l00354 | labels: I-slow", "label": "medium", "label_id": 2}
{"id": "rust_601", "text": "Can't define types as resources | The following doesn't work: ``` type rtype = resource(int i); ``` Then I would expect to be able to: ``` resource r1(int i) {}; resource r2(int i) {}; let rtype i1 <- r1(0); let rtype i2 <- r2(0); ``` Currently I don't see any way to make polymorphic resources.", "label": "medium", "label_id": 2}
{"id": "rust_602", "text": "typecheck segfault on failure to unify | The type error makes this segfault: ``` use std; import std::option::*; fn main() { let t[int] x = none; x = 5; } ``` Looks like stack overflow. The interesting part of the backtrace: #1019 0x080df952 in middle::ty::fold_ty () #1020 0x080f985f in middle::ty::unify::fixup_vars::su | labels: A-type-system, I-crash", "label": "high", "label_id": 1}
{"id": "rust_603", "text": "Remove rc_base | Make the ref count fields and methods interior to each ref counted object. The current `rc_base` class causes problems with MSVC, since it makes the vtable layout different from GCC's.", "label": "medium", "label_id": 2}
{"id": "rust_604", "text": "Remove much of the crate file evaluation infrastructure | Having a mini scripting language inside the parser is rather undesirable, and some of it's use case will be replaced with the new conditional compilation attributes. Try to remove much of the front::eval code for parsing crate files. Graydon suggests that leaving const definition | labels: A-frontend, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_607", "text": "Allow crate link attributes to contain nested meta items | It's currently impossible to define a link attribute that has nested meta items, `#[link(foo(bar))];`, even though this is a valid way to write an attribute. There are unfinished branches in two methods, link::build_link_meta (that prevents translation), and attr::eq (that preven | labels: A-linkage", "label": "medium", "label_id": 2}
{"id": "rust_608", "text": "Restore or remove the --depend flag | rustc claims to support a --depend flag that lists the .rs files in a crate. There is support in front::eval for this, but it is not wired up to the driver. Either finish the implementation or remove its vestiges. | labels: A-frontend, E-easy, C-cleanup, A-driver", "label": "question", "label_id": 4}
{"id": "rust_609", "text": "Attributes for native items | Attributes can be applied to native modules but not the items in those modules. For completeness, this seems like it should be allowed. | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_610", "text": "Conditional compilation for native items | Pending completion of #609, native items should support conditional compilation with the #[cfg(...)] attribute. | labels: A-frontend, E-easy", "label": "question", "label_id": 4}
{"id": "rust_611", "text": "Support all literal types in ast::meta_item | Right now they only hold strings, and thus attributes only support strings. | labels: A-frontend, A-linkage", "label": "question", "label_id": 4}
{"id": "rust_612", "text": "Create a mechanism to merge config files into the crate compilation environment | We need some mechanism to provide configuration information to the compiler via a file that, e.g. is produced by the build system. The intent is - at least partially - to remove the need for the long, arcane command lines that plague C compilers. I would like to, at minimum, be a | labels: A-frontend, A-driver, C-enhancement, A-attributes", "label": "question", "label_id": 4}
{"id": "rust_614", "text": "Add warnings and errors when the crate 'link' attribute looks malformed | The link attribute has special meaning on crates, and certain rules should be enforced like: - Warn if there is no 'name' or 'vers' item for shared libraries - Error if there are two items with the same identifier Some of this used to exist until I lost it. | labels: E-easy, A-linkage", "label": "low", "label_id": 3}
{"id": "rust_618", "text": "fail #fmt(\"%s\", str_var) causes an LLVM assertion | Specifically, when trying to build a GEP we end up triggering the !*terminated assertion in llvm.rs, since terminated is presumably set when we mark the post-failure block as being unreachable.", "label": "medium", "label_id": 2}
{"id": "rust_619", "text": "Passing a type parameter to a tag constructor that doesn't expect one isn't checked | Instead, you get an index out of bounds error in typeck. This should probably be checked and properly reported. (I didn't check with non-tag-constructor functions, the same problem probably exists there)", "label": "medium", "label_id": 2}
{"id": "rust_620", "text": "Remove rust_scheduler parameter from rust_vec contructor | This is not used, so there's no point having it there. | labels: A-runtime, E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_621", "text": "\"cannot determine a type for this expression\" should be non-fatal | Generally, when we can't determine a type for an expression due to `structure_of` failing, we're kinda stuck when it comes to typechecking that function, but we can back out and typecheck the other functions. | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_622", "text": "Nil literal doesn't parse in some situations | `()` doesn't parse as a nil literal in some situations that I would expect it to, in particular as meta_item values and in patterns ``` #[x = ()] fn main() { auto x = (); alt (x) { case (()) { } } } ``` | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_623", "text": "Encode/decode meta_name_values with non-string values | ast::meta_item supports any literal as a value but the crate metadata encoder and decoder only knows how to deal with string values. This currently just means that crate attributes with non-string literal values, e.g. `#[revision = 100u]`, will be silently lost. | labels: A-metadata", "label": "question", "label_id": 4}
{"id": "rust_624", "text": "\"error: cyclic import\" | This gives an error and maybe it shouldn't: import rustc::driver::rustc; ../src/fuzzer/fuzzer.rs:10:12:14:4: error: cyclic import ../src/fuzzer/fuzzer.rs:9:12:10:6: error: unresolved modulename: syntax Workaround: import driver = rustc::driver::rustc;", "label": "medium", "label_id": 2}
{"id": "rust_625", "text": "The \"log\" does not output anything to the console, but the \"log_err\" outputs. | OS: Linux/Ubuntu. The `log` does not output anything to the console, but the `log_err` outputs. Following [the documentation](https://github.com/graydon/rust/wiki/Logging-vision), I set the RUST_LOG environment variable as: ``` $ export RUST_LOG=main,std::io ``` But `log` does no", "label": "medium", "label_id": 2}
{"id": "rust_626", "text": "Better error when main is not defined | When a main function is not defined we end up failing at link time with an error from ld. We could be failing much earlier with a simpler error message. | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_627", "text": "Windows does not respect RUST_SEED environment variable | labels: A-runtime, O-windows", "label": "medium", "label_id": 2}
{"id": "rust_628", "text": "Incorrect span for mismatched type error during FRU | In the following example, foo is bool when it's expected to be int. ``` auto a = rec(foo = 0); auto b = rec(foo = true with a); ``` The mismatched type error spans the entire rec being assigned to variable b, instead of just the incorrect expression, 'true'. For errors that occur | labels: E-easy, A-type-system", "label": "low", "label_id": 3}
{"id": "rust_631", "text": "Compound assignment between boxed types results in LLVM assertion failure | The following code ``` auto x = @10; x += @20; ``` fails with \"rustc: Instructions.cpp:1567: void llvm::BinaryOperator::init(llvm::Instruction::BinaryOps): Assertion `getType()->isIntOrIntVectorTy() && \"Tried to create an integer operation on a non-integer type!\"' failed.\" This i | labels: E-easy, A-type-system", "label": "low", "label_id": 3}
{"id": "rust_632", "text": "Transitive dependencies between crates don't work in the metadata reader | Reduced test case (thanks, jruderman): ``` use rustc; import driver = rustc::driver:rustc; fn main() { driver::parse_input; } ```", "label": "medium", "label_id": 2}
{"id": "rust_633", "text": "type-parameterized functions not specialized when passed as argument | Ran into this while trying to make an ivec_equal function. Here's a testcase without any vectors. ``` fn builtin_equal_int(&int a, &int b) -> bool { ret a == b; } fn builtin_equal[T](&T a, &T b) -> bool { ret a == b; } fn apply_equal[T](fn (&T, &T) -> bool f, &T a, &T b) -> bool  | labels: I-crash", "label": "high", "label_id": 1}
{"id": "rust_635", "text": "Add a configure flag to force using gcc instead of clang | I had to comment out this line in configure to make rust compile with gcc instead of the wrong-version-of-clang I happen to have lying around. ``` probe CFG_CLANG clang++ ``` Seems like there should be a configure flag for this. Or it could just automatically fall back to gcc whe", "label": "medium", "label_id": 2}
{"id": "rust_637", "text": "Add environment variable to set stack size | Some programs need a big stack, others need lots of small stacks. Since we don't have stack growth working yet, we should have an environment variable to switch stack sizes without having to recompile the runtime. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_638", "text": "\"Calling a function with a bad signature!\" when I forget to specify iter's out type | Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && \"Calling a function with a bad signature!\"), function init, file /Users/graydon/src/llvm/lib/VMCore/Instructions.cpp, line 191. ``` iter z() { put 0u; } ```", "label": "medium", "label_id": 2}
{"id": "rust_639", "text": "trans_put - 'non-exhaustive match failure' | rt: 9736:main:main: upcall fail 'non-exhaustive match failure', ../src/comp/middle/trans.rs:6572 ``` iter under(uint hi) -> uint { let uint y = 0u; while (y < hi) { put y; y += 1u; } } iter several_zeroes() { for each (uint i in under(3u)) { put 0u; } } ```", "label": "medium", "label_id": 2}
{"id": "rust_640", "text": "Type-parameterized 'vec_omit' produces incorrect result | The function ``` fn vec_omit_T[T] (&T [] v, uint i) -> T[] { slice(v, 0u, i) + slice(v, i+1u, len(v)) } ``` produces an array with bogus values in it. In contrast, an int-specialized function produces correct results. ``` use std; import std::ivec; import std::ivec::slice; import", "label": "medium", "label_id": 2}
{"id": "rust_641", "text": "Import pattern alternatives | The pipe character between case patterns will mean 'match either of these', as a way associate put multiple patterns with a single body. The types and bound variables of the combined patterns should agree.", "label": "medium", "label_id": 2}
{"id": "rust_642", "text": "Binding bare function arguments with type parameters fails in llvm | Trying to bind a bare function argument with type parameters will trip an LLVM assert. The extent to which is this is a bug depends on what our final decision about bare fns winds up being.", "label": "medium", "label_id": 2}
{"id": "rust_643", "text": "Improve error message for unexpected EOF | ``` fn x() { } fn y() { fn z() { } ``` Result: ``` a.rs:3:9:3:10: error: unexpected token:  ``` Expected: something like of \"missing } after function body which begins on line 2\". | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_644", "text": "record update should auto-dereference | ``` fn main() { auto a = @rec(x=1, y=2); auto b = @rec(x=3 with a); assert b.x == 3; assert b.y == 2; } ``` Result: ``` /Users/jruderman/Desktop/b.rs:3:14:3:29: error: record update non-record base ``` It wants me to change `a` to `*a`. I think it should auto-dereference, since t | labels: E-easy, A-type-system", "label": "low", "label_id": 3}
{"id": "rust_646", "text": "Race condition in port shutdown | Now that ports have a lock, there is a race condition in the shutdown process. One task may call the port destructor while another task is still holding the lock. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_647", "text": "Only autoderef through one box | Right now we can autoderef through multiple boxes (and we can do things like \"(@@@@7) + (@@2)\". This seems a little silly. I think we might want to restrict it to just go through one box? What do people think of this? (Relatedly, I think could use a \"bikeshed\" label and a \"langua | labels: C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_648", "text": "bounds check failure in trans | The following code causes a bounds check failure in trans. I'm not sure what it should do instead. ``` fn foo[T] (&T x) { fn bar(fn (&T) -> T f) { }; } ```", "label": "medium", "label_id": 2}
{"id": "rust_649", "text": "Variable shadowing behaves weirdly | 
 fn wrong(int a) -> int { let int b = a; let str a = \"something\"; ret b; } fn main() {} 
fails in typechecking with the message
 shadowing-bug.rs:2:16:2:18: error: mismatched types: expected int but found str (types differ) 
I think this is because we treat | labels: A-frontend, A-type-system", "label": "medium", "label_id": 2} {"id": "rust_650", "text": "Spans for view items are fairly inaccurate | In this test case: ``` // xfail-stage0 // error-pattern:'swap' is glob-imported from multiple different modules // issue #482 use std; // expecting swap to be defined in vec import std::vec::*; import alternate_supplier::*; mod alternate_supplier { fn swap() {} } fn main() { swap | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_651", "text": "syntax::fold::make_fold leaks | ``` use rustc; import rustc::syntax::fold; fn main() { auto afp = fold::default_ast_fold(); auto af = fold::make_fold(*afp); } ``` rt: fatal, 'leaked memory in rust main loop (23 objects)' failed, ../src/rt/memory_region.cpp:156 23 objects", "label": "medium", "label_id": 2} {"id": "rust_652", "text": "pprust::print_if does not anticipate evil | If my fuzzer replaces the 'els' node with something other than an expr_if or expr_block, I get: upcall fail 'non-exhaustive match failure', ../src/comp/syntax/print/pprust.rs:636", "label": "medium", "label_id": 2} {"id": "rust_653", "text": "constrained-type.rs fails to parse again | Comment in the test indicates that it's supposed to parse but not run. It doesn't parse. (Again. It was fixed once in #141.) /Users/jruderman/code/rust/src/test/run-pass/constrained-type.rs:18:57:18:58: error: expecting ,, found .", "label": "medium", "label_id": 2} {"id": "rust_654", "text": "'Assertion i == total failed' in str::char_len | rt: 9736:main:main: upcall fail 'Assertion i == total failed', ../src/lib/str.rs:279 ``` use std; use rustc; import std::fs; import std::io; import std::vec; import rustc::back::link; import rustc::syntax::ast; import rustc::syntax::print::pprust; import driver = rustc::driver::r", "label": "medium", "label_id": 2} {"id": "rust_656", "text": "Ambiguity in proposed pattern syntax | Colons will allow specifying the types of pattern elements (`let x: int = 6`), but are also used as separators between field names and sub-patterns in record patterns (`{x: ?binding}`). Since we allow the sub-pattern to be omitted (`{x}` is interpreted as `{x: ?x}`) this introduc", "label": "medium", "label_id": 2} {"id": "rust_657", "text": "Warning for vecname(0) could be more helpful | I find it easy to leave out the indexing operator. It would be nice if we could use a heuristic to detect this and display a better warning than the current \"mismatched types: expected function or native function but found vec[uint]\".", "label": "low", "label_id": 3} {"id": "rust_658", "text": "Export consts across crates | rustc still does not have the ability to read constants from external crates. Trying results in the following error: \"upcall fail 'Assertion ccx.consts.contains_key(did._1) failed', /media/src/rust-tinderbox/srcdir-snap-stage3-x86_64-unknown-linux-gnu/src/comp/middle/trans.rs:508", "label": "medium", "label_id": 2} {"id": "rust_661", "text": "Matching a struct pattern should autoderef | Either that, or we need a syntax for dereferencing in a pattern.", "label": "medium", "label_id": 2} {"id": "rust_662", "text": "Cannot infer a type for this case | The typechecker does not infer a type for the following parameter. It should determine that `ctrl` has type `port[command[K,V]]`. ``` fn cache_server[K, V] (chan[chan[command[K,V]]] c) { auto ctrl = port(); c <| chan(ctrl); } ``` | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_664", "text": "Internal compiler error in instantiate | It seems like this ought to compile... ``` fn echo[T](chan[T] c, chan[chan[T]] oc) { auto p = port[T](); oc <| chan(p); auto x; p |> x; c <| x; } ```", "label": "high", "label_id": 1} {"id": "rust_665", "text": "Assertion failure: out_arg.mode != ty::mo_val | I'm guessing this should be caught earlier in the compiler. ``` fn main() { fn echo[T](chan[T] c, chan[chan[T]] oc) { let port[T] p = port(); oc <| chan(p); auto x; p |> x; c <| x; } auto p = port[int](); auto p2 = port[chan[int]](); spawn echo(chan(p), chan(p2)); } ```", "label": "medium", "label_id": 2} {"id": "rust_666", "text": "\"unsafe\" doesn't sound unsafe enough | The compiler should accept both \"unsafe\" and \"☢\" as synonyms, and the pretty-printer should canonicalize to ☢. Implement this. | labels: A-Unicode", "label": "medium", "label_id": 2} {"id": "rust_667", "text": "Destination-passing style | We should use destination-passing style throughout trans, to implement copy constructor elision. | labels: I-slow", "label": "medium", "label_id": 2} {"id": "rust_668", "text": "Typestate isn't working for bind | This compiles and shouldn't. ``` fn foo() { auto bar; fn baz(int x) { } bind baz(bar); } ```", "label": "medium", "label_id": 2} {"id": "rust_669", "text": "type \"(option[int])[]\" does not round-trip | Reduced from src/test/run-pass/alloca-from-derived-tydesc.rs ``` type r = (option[int])[]; ``` rustc --pretty normal ~/Desktop/a.rs > ~/Desktop/ap.rs ``` type r = option[int][]; ``` rustc ~/Desktop/ap.rs ``` ap.rs:1:21:1:22: error: expecting ;, found [ ``` Which is wrong, the pre | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_670", "text": "expr \"(@1).x\" does not round-trip | ``` fn main() { (@1).x; } ``` pretty-prints as ``` fn main() { @).x; } ``` which is obviously wrong. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_671", "text": "pretty-printer turns #macro(...) into tup() | ``` fn main() { #macro(\"mylambda\", x, body, {fn f(int x) -> int {ret body}; f}); assert(#mylambda(y,y*2)(8) == 16); } ``` becomes ``` fn main() { tup(); assert (#mylambda(y, y * 2)(8) == 16); } ``` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_672", "text": "pretty-printer screws up recs | ``` fn main() { rec(x=1234); } ``` becomes ``` fn main() { rec(x=234)); } ``` IOW \"1234\" becomes \"234)\".", "label": "medium", "label_id": 2} {"id": "rust_673", "text": "Matching on a str should compare content, not identity | Either that, or we should disallow it altogether. The current behaviour, where you can put a str in a case pattern, but there's no way to guarantee that any other str will equal the literal you put in there, seems bogus.", "label": "medium", "label_id": 2} {"id": "rust_674", "text": "pretty-printer omits semicolon needed to disambiguate unary op | ``` rustc --pretty normal src/test/run-pass/block-expr-precedence.rs ``` The last line, ``` if (true) { 12 };;; -num; ``` is pretty-printed as ``` if (true) { 12 } -num; ``` which, when parsed, hits the precedence issue described in the test's comment. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_675", "text": "parser rejects \"fail []\" | ``` fn main() { fail []; } ``` /Users/jruderman/Desktop/a.rs:2:9:2:10: error: expected ';' or '}' after expression but found [ The parser should accept this, leaving it for the type-checker to complain about. Found through AST fuzzing. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_676", "text": "Parser rejects \"if (ret) { }\" | ``` fn main() { if (ret) { } } ``` /Users/jruderman/Desktop/a.rs:2:15:2:16: error: unexpected token: ) This should be accepted by both the parser and the type-checker (but perhaps trigger a warning). Found through AST fuzzing. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_677", "text": "Compiler crashes displaying error line when compiling .rc files | When compiling a .rc file and there is an error in one of the .rs files. The compiler will crash when trying to use the codemap to display which line the error was on. Example: ``` ../src/lib/test.rs:82:23:82:52: error: unknown type in conversion: rt: d76f:main:main: upcall fail | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_678", "text": "Move semantics for cross-task operations | Channel operations (mainly sending) should have move semantics and only be allowed for unique things. This also applies to arguments to spawned functions, and probably the spawned function itself.", "label": "medium", "label_id": 2} {"id": "rust_679", "text": "pretty-printer moves comments from inside array literal to outside | (e.g. near the top of src/test/bench/shootout/nbody.rs) | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_680", "text": "Type of function tail expressions not inferred correctly | This doesn't typecheck: ``` fn f() -> int[] { ~[] } ``` This does: ``` fn f() -> int[] { ret ~[]; } ``` | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_682", "text": "Per-thread Task Lists | We should use per-thread task lists. This means there will be a lot less contention on the scheduler lock, but it also makes load balancing harder. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_683", "text": "Move mode arguments | We want to be able to write functions like this: ``` fn foo(move int x) { } ``` | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_684", "text": "Cannot build while offline | I pulled a few days ago, then tried to build while offline and got the following error: determined most recent snapshot: rust-stage0-2011-07-11-a84310a-macos-i386-e775077d87e508020d8e0282f944d66c89cae630.tar.bz2 curl: (6) Couldn't resolve host 'dl.rust-lang.org' Traceback (most r | labels: C-enhancement", "label": "low", "label_id": 3} {"id": "rust_685", "text": "Use a single memory region | The current memory accounting stuff is going to have a lot of problems when we start moving heap-allocated values between tasks. We should simplify it by sharing the same memory region everywhere. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_687", "text": "rt: fatal, 'chan->task == task' failed in upcall_del_chan | Was trying to reproduce my mysterious double-free, found this instead. Single-threaded scheduler. Testcase: https://gist.github.com/1082006", "label": "medium", "label_id": 2} {"id": "rust_688", "text": "main can't return int | When main is declared to return int, it always returns 0.", "label": "medium", "label_id": 2} {"id": "rust_689", "text": "Add source level debugging info to LLVM output | In addition to being useful for debugging, this seems to be a prerequisite for generating gcov output.", "label": "medium", "label_id": 2} {"id": "rust_690", "text": "Generate gcov coverage data | It would be nice to know what our test coverage looks like. I believe this depends on #689. | labels: A-testsuite, A-debuginfo, A-code-coverage", "label": "medium", "label_id": 2} {"id": "rust_691", "text": "\"typed\" pretty printing mode fails with \"unresolved name\" for macros with variables | For example, in
 fn main() { #macro([#mylambda(x,body), {fn f(int x) -> int { ret body }; f}]); assert(#mylambda(y,y*2)(8) == 16); } 
It will produce \"unresolved name\" errors for x, body, and y. I'm not really sure if there is a good way to fix this. Typechecking depen", "label": "medium", "label_id": 2} {"id": "rust_693", "text": "Remove distinction between pred and fn | Writing pure predicates is pretty difficult and a pretty convincing argument was made recently that typestate predicates don't need to be pure. Removing the pred concept would simplify things a lot.", "label": "medium", "label_id": 2} {"id": "rust_694", "text": "Preconditions on arguments don't satisfy subsequent calls with the same precondition | ``` pred p(int i) -> bool { true } fn f(int i) : p(i) -> int { i } fn g(int i) : p(i) -> int { f(i) } ``` Function g doesn't typecheck because the precondition on f isn't satisfied. I would expect this to work, otherwise I can't push the responsibility for satisfying precondition", "label": "medium", "label_id": 2} {"id": "rust_696", "text": "Accessing an upvar in a for-each loop in an iterator triggers bounds check failure in trans |
 iter thing() -> uint {} iter thing2(uint j) -> uint { for each (uint i in thing()) { put j; } } fn main(){} 
Apparently we never do this? I tripped over it because a bug in some of my capture code introduced a bogus upvar which triggered it.", "label": "medium", "label_id": 2} {"id": "rust_697", "text": "Defining a function that takes arguments inside a for-each loop fails during trans |
 iter thing() -> uint {} fn main() { for each (uint i in thing()) { fn foo(int x) -> int { ret x; } } } 
This is because collect_upvars thinks that x is an upvar of the for each body.", "label": "medium", "label_id": 2} {"id": "rust_698", "text": "Double-free of ivecs when sending across channel | Finally found a minimal-ish testcase! This is blocking me from getting reading working for my async-io work https://gist.github.com/1083866", "label": "medium", "label_id": 2} {"id": "rust_699", "text": "\"quick start\" wiki pages for the 3 major platforms | The \"Getting started\" page is getting too long and confusing. It would be nice to have separate instructions for Mac/Linux/Windows. We can still have a more detailed page for when the quick start page for one's own platform doesn't suffice. | labels: E-easy, A-LLVM", "label": "low", "label_id": 3} {"id": "rust_700", "text": "This compiles and shouldn't. | ``` fn trans_send(&@block_ctxt cx, &@ast::expr lhs, &@ast::expr rhs, ast::node_id id) -> result { auto bcx = cx; auto chn = trans_expr(bcx, lhs); bcx = chn.bcx; auto data = trans_lval(bcx, rhs); bcx = data.res.bcx; auto chan_ty = node_id_type(cx.fcx.lcx.ccx, id); auto unit_ty; al | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_701", "text": "LLVM generates an undefined instruction for this test | ``` fn start() { } fn main() { child = spawn start(); auto child; } ``` | labels: A-LLVM", "label": "medium", "label_id": 2} {"id": "rust_702", "text": "Correct \"backwarding\" behavior for self-calls in extended objects | See src/tests/run-pass/anon-obj-backwarding.rs for an example/description of this bug.", "label": "medium", "label_id": 2} {"id": "rust_703", "text": "Overriding a method with one of a different type compiles and shouldn't | See src/comp/test/compile-fail/anon-obj-overloading-wrong-type.rs.", "label": "medium", "label_id": 2} {"id": "rust_705", "text": "quick_sort returns incorrect results | std::sort::quick_sort sorts [2, 1, 3] as [1, 3, 2], for both the vec and ivec versions. ``` fn test_qsort() { auto names = ~[mutable 2, 1, 3]; auto expected = ~[1, 2, 3]; fn lteq(&int a, &int b) -> bool { int::le(a, b) } iqsort(lteq, names); auto pairs = ivec::zip(expected, ivec:", "label": "medium", "label_id": 2} {"id": "rust_707", "text": "Self-calls in non-object context should fail with a helpful error message | This program fails with an uninformative explicit fail during typechecking. ``` fn main() { fn foo() -> int { ret 3(); } self.foo(); } ``` Fix on the way...", "label": "medium", "label_id": 2} {"id": "rust_708", "text": "Report unresolved identifiers only once per function | GCC reports undeclared identifiers only once per function. IMHO we should do the same.", "label": "medium", "label_id": 2} {"id": "rust_711", "text": "Bad type error message with parameterized types | This code: ``` use std; import std::option; fn bad() { let @option::t[int] rz = foo[uint](); } fn foo[ZZZ]() -> @option::t[ZZZ] { fail; } ``` fails with a type error: `error: mismatched types: expected @option::t[int] but found @option::t[ZZZ] (types differ)` This is a bad error | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_712", "text": "Invalid memory access in fs::list_dir | Under valgrind `fs::list_dir(\".\")` says ``` ==16608== Invalid read of size 4 ==16608== at 0x495C205: os_fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so) ==16608== by 0x495F038: fs::list_dir (in /home/banderson/Dev/rust/build/stage1/lib/libstd.so) ==16608== by", "label": "medium", "label_id": 2} {"id": "rust_713", "text": "Use millisecond resolution for --time-passes | So many of our passes are 0 seconds now that it would be more useful if --time-passes reported the milleseconds as well. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_714", "text": "Test run-pass/lib-run does not work on windows | I'm going to disable it on win32 because it keeps burning the tinderbox. Figure out what the deal is.", "label": "medium", "label_id": 2} {"id": "rust_717", "text": "task-comm-11.rs doesn't work | This is a really simple test for sending channels over channels. It should work. It currently fails with valgrind errors, which seem to be caused by a double drop_glue on the channel that main receives from start. This test should be re-enabled once this functionality is fixed.", "label": "medium", "label_id": 2} {"id": "rust_718", "text": "Segfault when wrapping an anon obj in more than one layer | The call to `my_c.foo()` in this program segfaults: ``` fn main() { obj a() { fn foo() -> int { ret 2; } } auto my_a = a(); auto my_b = obj() { with my_a }; assert (my_b.foo() == 2); auto my_c = obj() { with my_b }; assert (my_c.foo() == 2); } ``` | labels: I-crash", "label": "high", "label_id": 1} {"id": "rust_719", "text": "Not all paths return a value | ``` fn clone_chan[T](chan[T] c) -> chan[T] { unsafe::reinterpret_cast(rustrt::clone_chan(unsafe::reinterpret_cast(c))) } ``` There is only one path, and it returns, however, the compiler doesn't believe me. You can work around this by adding `ret`.", "label": "medium", "label_id": 2} {"id": "rust_721", "text": "Test runner needs to be able to run unexported tests | Currently, tests have to be visible at the top level of the crate to be run, observing the normal rules for item visibility. In Rust we can have layers and layers of unexported modules - modules that still need to be tested. There are a few ways to allow these to be tested: - Wit | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_722", "text": "Build bots need a 'try' branch | Several people have desired to push an experimental branch to the build servers lately, and right now the only way to do that is to create a snapshot.", "label": "medium", "label_id": 2} {"id": "rust_723", "text": "Add support for #[deprecated] attribute | Usage of items tagged with `#[deprecated]` should generate a warning at compile time. To make this really work correctly we'll need to write item attributes to the crate metadata. | labels: A-frontend, E-easy, T-rustdoc", "label": "question", "label_id": 4} {"id": "rust_724", "text": "Enforce correct types for channels | This should fail to compile but currently doesn't. ``` fn start(chan[@int] c) { c <| @42; } fn main() { auto p = port(); auto child = spawn start(chan(p)); auto c; p |> c; log_err *c; } ``` This will probably be fixed when #568 is fixed. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_725", "text": "alias pass crashes when it needs to autoderef through multiple boxes |
 type quux = rec(int bar); fn g(&int i) { } fn f(@@quux foo) { g(foo.bar); } fn main() {} 
Yields
 rt: 8994:main:main: upcall fail 'non-exhaustive match failure', ../src/comp/middle/alias.rs:546 
It is hitting a non-exhaustive match because only one of the b", "label": "medium", "label_id": 2} {"id": "rust_726", "text": "Test run-pass/lib-io doesn't work on mac | Please fix | labels: O-macos", "label": "medium", "label_id": 2} {"id": "rust_727", "text": "_|_ (bottom) in an expression alt or if doesn't typecheck | ``` fn foo() -> int { ret alt true { true { 1 } false { fail; } }; } ``` ... produces `mismatched types: expected int but found () (types differ)` | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_728", "text": "Loop constructs without parens | Now that we have if and alts without parens I find myself wanting to write loops without them as well. Is this possible?", "label": "medium", "label_id": 2} {"id": "rust_729", "text": "Memory leak when declaring chans at the bottom of functions | The following program leaks `c` from `main`. ``` fn start(chan[chan[str]] c) { let port[str] p; p = port(); c <| chan(p); } fn main() { let port[chan[str]] p = port(); spawn start(chan(p)); p |> c; auto c; } ``` Interestingly, if you move the `auto c;` line above `p |> c` then th", "label": "medium", "label_id": 2} {"id": "rust_731", "text": "Names of function types shouldn't allow parameter names | `let fn(int x) a = f` is a valid declaration but the x is useless.", "label": "medium", "label_id": 2} {"id": "rust_732", "text": "Test suite picks up too many files. | I had a `.#` file left over in my test directory from an old test I was working on in Emacs. When I did make check, I got an \"error opening\" error, instead of just ignoring this file and having the tests succeed. | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_733", "text": "Restore the ability to build run-pass/run-fail/bench tests without running them | Some of our tests have a default mode for running from the test suite, and an interactive mode for experimenting with (all the benchmarks). The conversion to a Rust-based test runner lost the ability to just compile the tests without running them. | labels: E-easy, A-testsuite", "label": "low", "label_id": 3} {"id": "rust_734", "text": "Test runner should run tests in parallel | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_735", "text": "run-pass/compile-fail, etc test runners no longer obey CFG_RUSTC_FLAGS | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_736", "text": "Investigate running tests under helgrind | I don't know much about this tool, but it might be useful for exercising our task system. | labels: A-testsuite, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_737", "text": "task-comm-15 fails when run with multiple threads | With RUST_THREADS=16, task-comm-15 occasionally produces valgrind errors like ``` ==8944== Thread 3: ==8944== Invalid read of size 4 ==8944== at 0x4AC73CD: pthread_mutex_lock (pthread_mutex_lock.c:50) ==8944== by 0x4A2E415: pthread_mutex_lock (forward.c:182) ==8944== by 0x48E0D27", "label": "medium", "label_id": 2} {"id": "rust_738", "text": "Add a build option to run compiler tests under gdb | The idea is that when a test fails you are immediately dumped into the debugger. | labels: A-testsuite, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_739", "text": "Automatically determine the number of CPU Cores | Instead of getting parallelism via `RUST_THREADS`, we should, by default, find the number of CPU cores and use that. We should keep `RUST_THREADS` around though, in case we want to run sequentially in some cases. This discussion seems to list how to do it on each of the platforms | labels: E-easy, I-slow", "label": "question", "label_id": 4} {"id": "rust_741", "text": "Compile tests race on environment variables when run in parallel | This sucks. Running \"RUST_THREADS=16 make check\" will occasionally cause run-pass, etc. tests to fail because they received the wrong LD_LIBRARY_PATH variable. | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_742", "text": "crash: \"Out of stack space, sorry\" with structural recursive type | The following program is sufficient to crash rustc: ``` tag expr { app(expr); } fn main() { } ``` This yields the following stack trace: ``` #0 0xf7fce5a1 in check_stack (task=0x87239e4) at ./src/rt/rust_upcall.cpp:30 #1 0xf7fce5d5 in upcall_get_type_desc (task=0x87239e4, curr_cr | labels: A-type-system, I-crash", "label": "high", "label_id": 1} {"id": "rust_743", "text": "crash: \"UNREACHABLE executed at ObjectFile.cpp:52\" | If you accidentally feed rustc --ls a non-object file (as I just did), you get this assertion failure: Unknown Object File Type UNREACHABLE executed at ObjectFile.cpp:52! Aborted (core dumped) You may also just get a plain segfault. For example, try an empty file :). | labels: E-easy, I-crash, A-LLVM", "label": "high", "label_id": 1} {"id": "rust_744", "text": "--lib should produce reasonable output file names | Right now, if you do \"rustc --lib foo.rc\", it will produce a library named \"foo\". It should produce a library named \"libfoo.so\" on linux and the equivalents on other platforms. | labels: E-easy, A-linkage", "label": "low", "label_id": 3} {"id": "rust_745", "text": "Resolve resolves loop collection expr in wrong context | You can't currently do something like ``` for (int x in x) { ... } ``` because the loop variable will shadow the outer x.", "label": "medium", "label_id": 2} {"id": "rust_746", "text": "Stop allowing duplicate label names in record types | ``` type x = rec(int x, int x); ``` This currently compiles. It shouldn't.", "label": "medium", "label_id": 2} {"id": "rust_747", "text": "Nullary tags can be passed by mutable alias |
 use std; import std::option::*; fn mutator(&mutable t[@int] x) { x = some(@0); } fn main() { mutator(none); } 
passes the alias checker, but shouldn't. When the program is run, it leaks memory.", "label": "medium", "label_id": 2} {"id": "rust_748", "text": "crash: upcall fail 'non-exhaustive match failure', src/comp/middle/resolve.rs:1148 | This tarball kills rustc with the above error: www.leptoquark.net/~elly/rustsocket-nematch.tar The stack trace is: #0 upcall_fail (task=0x87239e4, expr=0x86e3630 \"non-exhaustive match failure\", ``` file=0x86e3650 \"src/comp/middle/resolve.rs\", line=1148) at ./src/rt/rust_upcall.cp", "label": "medium", "label_id": 2} {"id": "rust_749", "text": "Investigate running tests under Address Sanitizer | http://code.google.com/p/address-sanitizer/wiki/AddressSanitizer It finds use-after-free and out-of-bounds errors with very little overhead. Could be useful. | labels: A-testsuite, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_750", "text": "rustc segfaults when fed an empty file | labels: I-crash", "label": "high", "label_id": 1} {"id": "rust_751", "text": "Beginning-of-line detection in pretty-printer isn't reliable | It only recognizes 'hard' line breaks. Spaces might also cause lines to be broken. This program ends up with an extra blank line above the comment because of this: ``` rust fn main() { let x = Foo {x: 10, y: 10000000000, // This a comment z: 45000000000000000, q: 2444444444444444 | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_752", "text": "Bring the runtime tests up to date and start running them | The tests in src/rt/test are compiled but never run. It's almost certain that they are completely broken. Right now all they are accomplishing is making it difficult to change parts of the runtime. Replace it with a standard C++ unit testing framework and start running the tests. | labels: A-runtime, E-easy, A-testsuite", "label": "low", "label_id": 3} {"id": "rust_754", "text": "bind can't rebind an already bound function | It currently fails with an unimplemented error. The only snag is that the generated closures tydesc didn't include it. But I've fixed that, so there should be no reason I can't just remove the check.", "label": "medium", "label_id": 2} {"id": "rust_755", "text": "Compile tests need to capture stderr | LLVM reports on stderr and right now those errors seem to be disappearing. | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_756", "text": "Typechecker overly restrictive on binding functions with type parametric arguments | The typechecker currently does not allow you to bind a function if one of the unbound arguments contains type parameters that are not passed by alias. There is no real reason for this restriction other than that the translator couldn't handle it (but that is a bug to be fixed and | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_757", "text": "Spawn of type inferred variable trips error in typechecker |
 fn main() { let f = fn(){}; spawn f(); } 
Causes
 :0:0:0:0: error: internal compiler error ret_ty_of_fn_ty() called on non-function type:  
| labels: A-type-system", "label": "high", "label_id": 1} {"id": "rust_758", "text": "Using methods in a first-class manner doesn't work | ``` obj foo() { fn f() { } } fn main() { let my_foo = foo(); let f = my_foo.f; } ``` triggers ``` rustc: Instructions.cpp:968: void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && \"Ptr must be a ", "label": "medium", "label_id": 2} {"id": "rust_759", "text": "pp non-convergence: empty line becomes two empty lines | ``` fn a() -> uint { 1u } ``` becomes ``` fn a() -> uint { 1u } ``` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_760", "text": "pp screws up typestate assertions | ``` fn f(x: uint) : nonzero(x) { } ``` becomes ``` fn f(x: uint) : nonzero(0) { } ``` caught by running the fuzzer's convergence test on an unmodified ivec.rs", "label": "medium", "label_id": 2} {"id": "rust_761", "text": "anonymous obj expression-statement is rejected | ``` fn main() { (obj () { }); } ``` pretty-prints as ``` fn main() { obj () { } } ``` which is rejected with the message \"expecting ident\", pointing at the \"()\" after \"obj\". I'm guessing this is a parser bug rather than a pretty-printer bug, since rust is mostly an expression lan", "label": "medium", "label_id": 2} {"id": "rust_762", "text": "parser rejects \"ret ::f()\" | ``` fn f() { } fn main() { ret ::f(); } ``` Is incorrectly rejected: ``` z.rs:2:16:2:18: error: expected ';' or '}' after expression but found :: z.rs:2 fn main() { ret ::f(); } ^~ ``` fwiw, if I put parens around the call, it's accepted. But the pretty-printer takes out the pare | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_763", "text": "Channels leak when sent over channels | Minimal-ish test case: https://gist.github.com/1110969 If I reduce it further, it seems to either not reproduce or it will deadlock or it will crash. Hopefully all the same cause!", "label": "medium", "label_id": 2} {"id": "rust_764", "text": "pp+parser disagree about parens around \"fail\" in callee position | This silly code fails with a type error: ``` fn main() { (fail)(1, 2); } z.rs:1:12:1:18: error: mismatched types: expected function or native function but found _|_ z.rs:1 fn main() { (fail)(1, 2); } ^~~~~~ ``` but if i pretty-print it, the parens around fail are removed, and it | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_766", "text": "This code takes suspciously long to converge | ``` fn main() { ret (ret m) as int + 1; } fn main() { ret (ret m as int) + 1; } fn main() { ret ret m as int + 1; } fn main() { ret ret (m as int) + 1; } ``` The last one is finally stable, but it clearly doesn't do the same thing as the first line. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_768", "text": "\"let f = @f;\" causes iloop/irecurse | ``` fn main() { let f = @f; f(); } ``` Causes the compiler to iloop ``` fn main() { let f = @f; } ``` Causes the compiler to output \"Out of stack space, sorry\" Expected: \"unresolved name: f\" or \"use before definition: f\" or \"cannot determine a type local variable: f\". | labels: A-type-system, I-crash", "label": "high", "label_id": 1} {"id": "rust_769", "text": "\"alt ret\" hits an error in llvm: \"cast() argument of incompatible type!\" | ``` fn a() -> int { alt ret 1 { 2 { 3 } } } fn main() { a(); } ``` Assertion failed: (isa(Val) && \"cast() argument of incompatible type!\"), function cast, file llvm/include/llvm/Support/Casting.h, line 194.", "label": "question", "label_id": 4} {"id": "rust_770", "text": "\"i + ret i\" hits assertion \"Cannot create binary operator with two operands of differing type!\" | ``` fn f(i: int) -> int { i + ret i; } fn main() { f(2); } ``` Assertion failed: (S1->getType() == S2->getType() && \"Cannot create binary operator with two operands of differing type!\"), function Create, file Instructions.cpp, line 1580. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_771", "text": "Calling an iter (as if it were a function) hits llvm assert | ``` iter i() { } fn main() { i(); } ``` Assertion failed: ((NumParams == FTy->getNumParams() || (FTy->isVarArg() && NumParams > FTy->getNumParams())) && \"Calling a function with bad signature!\"), function init, file Instructions.cpp, line 187. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_772", "text": "non-exhaustive match failure in alias::check_for_each | ``` fn main() { for each p in 1 {} } ``` rt: b1ff:main:main: upcall fail 'non-exhaustive match failure', ../src/comp/middle/alias.rs:336 rt: b1ff:main: domain main @0x200b40c root task failed The proximate cause is that in comp::middle::alias::check_for_each, \"alt call.node\" has ", "label": "medium", "label_id": 2} {"id": "rust_773", "text": "\"put put ()\" hits llvm assert \"Invalid type for pointer element!\" | ``` iter i() { put put (); } fn main() { } ``` Assertion failed: (isValidElementType(EltTy) && \"Invalid type for pointer element!\"), function get, file Type.cpp, line 664. Seems like valid rust code to me, which puts () twice.", "label": "medium", "label_id": 2} {"id": "rust_774", "text": "trans_put 'non-exhaustive match failure' in non-iter fn | ``` fn foo() { put() } fn main() { foo(); } ``` rt: 0790:main:main: upcall fail 'non-exhaustive match failure', ../src/comp/middle/trans.rs:5523 rt: 0790:main: domain main @0x2008c0c root task failed Should have been rejected prior to trans, I think. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_775", "text": "\"Calling a function with a bad signature!\" with uncalled type-parameteric function | ``` fn empty[T]() -> vec[T] { ret []; } fn main() { empty[int]; } ``` Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Params[i]->getType()) && \"Calling a function with a bad signature!\"), function init, file Instructions.cpp, line 191. Which is strange, be", "label": "medium", "label_id": 2} {"id": "rust_776", "text": "LLVM assert \"May only branch on boolean predicates!\" with bang predicate | ``` fn my_err(s: str) -> ! { log_err s; fail; } fn main() { if my_err(\"bye\") { } } ``` Assertion failed: (getCondition()->getType()->isIntegerTy(1) && \"May only branch on boolean predicates!\"), function AssertOK, file Instructions.cpp, line 669.", "label": "medium", "label_id": 2} {"id": "rust_777", "text": "ret-bang variant trips llvm assert \"Invalid constantexpr cast!\" | ``` fn my_err(s: str) -> ! { log_err s; fail; } fn main() { my_err(\"bye\") == 3u; } ``` Assertion failed: (CastInst::castIsValid(opc, C, Ty) && \"Invalid constantexpr cast!\"), function getCast, file Constants.cpp, line 1217.", "label": "medium", "label_id": 2} {"id": "rust_778", "text": "\"pointer being freed was not allocated\" when triggering out-of-stack-space compiler bug | ``` tag clam[T] { a(T); } fn main() { let c = a(c); alt c { a[int](_) { } } } ``` Compiling it gives \"Out of stack space, sorry\" (which is probably the same problem as #768). Compiling it ALSO triggers \"rustc(21383,0xb0509000) malloc: **\\* error for object 0x2900450: pointer bein", "label": "medium", "label_id": 2} {"id": "rust_779", "text": "implicit ret is incorrectly allowed in bang function | ``` fn f() -> ! { 3 } fn main(){} ``` should be rejected with \"In non-returning function f, some control paths may return to the caller\" but instead it gets through until llvm complains: Assertion failed: (getOperand(0)->getType() == cast(getOperand(1)->getType())->g", "label": "medium", "label_id": 2} {"id": "rust_782", "text": "When running tests in parallel, test runner does not display colors | The control characters seem to cause strange artifacts so colors are disabled. | labels: E-easy, A-testsuite", "label": "low", "label_id": 3} {"id": "rust_783", "text": "Conflict between ports and tasks wanting to destroy channels | Test case: ``` use std; import std::task; fn a() { fn doit() { fn b(c: chan[chan[int]]) { let p = port[int](); task::send(c, chan(p)); } let p = port[chan[int]](); spawn b(chan(p)); task::recv(p); } let i = 0; while i < 100 { doit(); i += 1; } } fn main() { while (true) { let t =", "label": "medium", "label_id": 2} {"id": "rust_784", "text": "\"this function takes x arguments but y arguments were supplied\" shouldn't be fatal | Instead it should go on and typecheck the rest of the function. | labels: E-easy, A-type-system", "label": "low", "label_id": 3} {"id": "rust_785", "text": "Temporaries generated in alt expression have longer lifetime than expected | ``` { alt gimmeboxes() { _ { } } // The thing returned from gimmeboxes is still refed here } ``` I would not expect it to outlive the alt expression. Will produce a better test case later.", "label": "medium", "label_id": 2} {"id": "rust_787", "text": "Loops try to clean up uninitialized variables | ``` while true { let x = alt true { true { break } _ { \"whatever\" } }; } ``` Under valgrind results in: ``` ==18230== Thread 10: ==18230== Conditional jump or move depends on uninitialised value(s) ==18230== at 0x8048858: glue_drop2 (in /home/banderson/Dev/rust/build/test/run-pas", "label": "medium", "label_id": 2} {"id": "rust_788", "text": "Dynamic size check calculation should be exhaustive. | It currently misses resources, probably among other things.", "label": "medium", "label_id": 2} {"id": "rust_789", "text": "Add pretty-printer tests to the test suite | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_790", "text": "Typechecker doesn't propagate collection item type in for [each] | Both of these loops don't typecheck, although it should be deducable what the type of `u` is: ``` iter x() -> int { put 1; put 2; } fn main() { for each u in x() { log_err u == 1; } for u in ~[1, 2, 3] { log_err u == 2; } } ```", "label": "medium", "label_id": 2} {"id": "rust_791", "text": "LLVM module verifier breakage for loop in alt in iter | This code produces: ``` Stored value type does not match pointer operand type! store i1 false, i32* %0 i32Broken module found, compilation aborted! Stack dump: 0. Running pass 'Function Pass Manager' on module 'rust_out'. 1. Running pass 'Module Verifier' on function '@_ZN1xE' Ab", "label": "medium", "label_id": 2} {"id": "rust_792", "text": "Tags with more than one variant are always 4 byte aligned | Because of this code: ``` fn T_tag(&type_names tn, uint size) -> TypeRef { auto s = \"tag_\" + uint::to_str(size, 10u); if (tn.name_has_type(s)) { ret tn.get_type(s); } auto t = T_struct(~[T_int(), T_array(T_i8(), size)]); tn.associate(s, t); ret t; } ``` Tags always end up 4 byte ", "label": "medium", "label_id": 2} {"id": "rust_793", "text": "Functions should be able to initialize their arguments | This came up in the course of writing comms as a library. I want to be able to write this: ``` fn recv_into(v : &T) { rustrt::port_recv(unsafe::reinterpret_cast(ptr::addr_of(v)), **raw_port); } fn recv() -> T { let x : T; self.recv_into(x); ret x; } ``` `recv_into` has the form i | labels: A-type-system, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_794", "text": "alt discriminant of type bang -> \"Ptr must be a pointer to Val type!\" | ``` fn f() -> ! { fail } fn g() -> int { alt f() { true { 1 } false { 0 } }; } fn main() { g(); } ``` Assertion failed: (getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && \"Ptr must be a pointer to Val type!\"), function AssertOK, file Ins", "label": "medium", "label_id": 2} {"id": "rust_795", "text": "Box contents are always 4 byte aligned | Because the ref count is 4 bytes, we misalign 8 byte aligned box structures.", "label": "medium", "label_id": 2} {"id": "rust_796", "text": "Calling a function in for-each position triggers llvm assertion | ``` fn f() -> int { ret 4; } fn main() { for each i in f() { } } ``` This should fail in the typechecker. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_797", "text": "test/run-pass/if-ret.rs passes only with optimization turned on | Without -O, you get ``` Basic Block in function '_ZN3fooE' does not have terminator! label %5 LLVM ERROR: Broken module, no Basic Block terminator! ```", "label": "medium", "label_id": 2} {"id": "rust_798", "text": "rustc requires executable stack | Trying to build on a fedora system I got: stage0/rustc: error while loading shared libraries: librustrt.so: cannot enable executable stack as shared object requires: Permission denied | labels: O-linux", "label": "medium", "label_id": 2} {"id": "rust_799", "text": "Combine xfail-stage1/2/3 into just 'xfail' | xfail-stage0 is no longer used, and in practice xfail-stage1, 2, and 3 are always used together | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_800", "text": "configure script doesn't fall back to gcc if a bad version of clang is available | The configure script prefers to use clang over gcc, but if it finds the wrong version of clang it just fails. It should instead print a warning and fall back to gcc. | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_802", "text": "Typechecker should stop this | ``` tag foo = int; fn main() { let x = foo(1); if x == -1 { } } ``` This program should not compile, but it does. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_803", "text": "Type inference for capturing nested functions requires type variables to be resolved prematurely | The following program ought to typecheck: ``` fn main() { let e = @{mutable refs: ~[], n: 0}; lambda() { log_err e.n; }; e.refs += ~[1]; } ``` but is rejected with: ```nubs/lambda-infer-fail.rs:5:16:5:17: error: cannot determine a type for this expression nubs/lambda-infer-fail.r | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_804", "text": "Lambdas sometimes leak |
fn main() { let x = @0; lambda() { log_err *x; }; } 
leaks memory. Interestingly,
 fn main() { let x = @0; let f = lambda() { log_err *x; }; } 
does not.", "label": "medium", "label_id": 2} {"id": "rust_805", "text": "Upvars in lambdas can be written to, with silly results | Right now, if you write to an upvar in a copying closure, the value in the closure will be changed. This means that subsequent invocations of the function will see that value but the enclosing scope will not. This kind of sucks. We should disallow writes to variables closed over | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_807", "text": "Can't build with clang on Ubuntu | Clang doesn't know how to link on Ubuntu (and aparently other Linuxes), erroring with ``` /usr/bin/ld: cannot find crtbeginS.o: No such file or directory ``` | labels: O-linux", "label": "medium", "label_id": 2} {"id": "rust_808", "text": "nil values takes up space | Right now we represent the () type as a one bit integer. () shouldn't take up any space. In theory we should be able to use an empty llvm struct type, but there are some issues that come up. Making that change doesn't actually just work. Compiling with optimization, LLVM decides | labels: I-slow, A-codegen", "label": "medium", "label_id": 2} {"id": "rust_809", "text": "Pretty printer adds newlines after comments in tag declarations |
 tag foo { foo; // a foo. bar; } fn main() { } 
will becomes
 tag foo { foo; // a foo. bar; } fn main() { } 
This will happen every time, increasing the amount of whitespace each time the pretty printer is run. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_810", "text": "Testing randomly hanging for long periods of time | I think it might be sio-ctx.rs, but I'm not sure. Around the hang I see this output: ``` ... test [run-pass] ../src/test/run-pass/simple-obj.rs ... ok test [run-pass] ../src/test/run-pass/sio-client.rs ... ignored test [run-pass] ../src/test/run-pass/sio-ctx.rs ... ``` It ends up", "label": "medium", "label_id": 2} {"id": "rust_811", "text": "bounds check failure in trans (again) | This snippet of code fails to compile due to a bounds check failure in trans. In my version, it's at line 998. It's the `some(id)` alt case in `get_tydesc`. ``` fn test00_start(ch: chan_t[int], message: int) { send(ch, message); } ``` `chan_t` is defined as follows, where `task_i", "label": "medium", "label_id": 2} {"id": "rust_812", "text": "Anonymous objects from nothing | Is there a reason why we'd want to be able to create an anonymous object from nothing, rather than extending an existing one? For example, should we support being able to do this: ``` fn main() { // Anonymous object that doesn't extend an existing one. let my_obj = obj () { fn fo", "label": "question", "label_id": 4} {"id": "rust_813", "text": "Unary negation not properly typechecked |
 fn main() { -\"foo\"; } 
produces
 rustc: Constants.cpp:1747: static llvm::Constant* llvm::ConstantExpr::getNeg(llvm::Constant*, bool, bool): Assertion `C->getType()->isIntOrIntVectorTy() && \"Cannot NEG a nonintegral value!\"' failed. 
| labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_814", "text": "trans trips assertion when using result of bottom-typed do-while |
 fn main() { let x: int = do { fail } while (true); } 
results in
 rt: 439d:main:main: upcall fail 'Assertion !*terminated failed', ../src/comp/lib/llvm.rs:927 
Tim, you've fixed this for a bunch of other cases; do you have time to take this one?", "label": "medium", "label_id": 2} {"id": "rust_815", "text": "Object equality behaves weird on linux | This works on mac and windows, not linux: ``` let o1 = obj () { }; let o2 = obj () { }; assert (o1 != o2); assert (!(o1 == o2)); ``` | labels: O-linux", "label": "medium", "label_id": 2} {"id": "rust_816", "text": "ivec self-append has illegal memory access | This conversion of run-pass/vec-self-append fails to valgrind: ``` use std; import std::ivec; fn main() { // Make sure we properly handle repeated self-appends. let a: [int] = ~[0]; let i = 20; let expected_len = 1u; while i > 0 { log_err ivec::len(a); assert (ivec::len(a) == exp", "label": "medium", "label_id": 2} {"id": "rust_817", "text": "Allow multiple imports and exports per statement | For example, allow something like \"export foo, bar, baz;\" and \"import foo, bar, baz from quux;\" I don't really care about the syntax. | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_818", "text": "Dereference on single element tags ignores visibility of constructor | Exporting a tag type but not the constructors for it is a simple way to construct abstract data types. (This is how it is done in Haskell.) This works in rust as well, but only for tags with multiple constructors. If the tag has only a single constructor, \\* will see through it r | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_819", "text": "Typestate apparently doesn't handle loops... | ``` fn test00_start(ch: _chan[int], message: int, count: int) { log \"Starting test00_start\"; let i: int = 0; while i < count { log \"Sending Message\"; send(ch, message); i = i + 1; } log \"Ending test00_start\"; } ``` `send` uses move-mode for the second argument, which means that `", "label": "medium", "label_id": 2} {"id": "rust_820", "text": "Cannot bind native functions | ``` native \"rust\" mod rustrt { fn task_yield(); } fn main() { bind rustrt::task_yield(); } ``` This fails with the error message `upcall fail 'LHS of bind expr didn't have a function type?!', ../src/comp/middle/typeck.rs:2065`.", "label": "medium", "label_id": 2} {"id": "rust_821", "text": "rustc fails whlie linking files if the source file path begins with ./ or ../ |
 sully@anansi:~/src/rust/build [master]$ s1 ./stage1/rustc ./test.rs gcc: .o: No such file or directory :0:0:0:0: error: linking with gcc failed with code 256 :0:0:0:0: note: gcc arguments: -L./stage1/lib -Lrt -lrustrt ./stage1/lib/glue.o -m32 -o .o -lm ./stage | labels: A-driver", "label": "medium", "label_id": 2}
{"id": "rust_822", "text": "Methods that are added to an object at the same time should be able to refer to each other | In general, it doesn't work to have a method A referring to another method B that is being added to an object at the same time as A is. Fix this.", "label": "medium", "label_id": 2}
{"id": "rust_823", "text": "Bind glue should make a direct call if the target is statically known | Right now it always puts it in the closure and does an indirect call. LLVM can't see through it. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_824", "text": "Typestate too strict for multi-var let | I'd like this to work: ``` let x = 10, y = x; ``` Currently, the initializer for y is checked in an environment where neither variable has been defined, so typestate rejects this line.", "label": "medium", "label_id": 2}
{"id": "rust_825", "text": "`cont` in `while` continues without re-checking the loop condition | ``` fn main() { let i = 1; while i > 0 { log_err i; i -= 1; cont; } } ```", "label": "medium", "label_id": 2}
{"id": "rust_826", "text": "Test runner fails to report failures | Probably because of the race condition on task join. Fortunately the runtime seems abort after detecting a memory leak, so you do get an indication that something failed. | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_828", "text": "Typechecker error messages don't use type abbreviations | Since we got rid of cnames (for good reason, as I understand it), typechecker error messages always use the full structural types, which is sucky. Patrick says he has a plan for fixing this that isn't high priority right now. Creating this bug to track. We probably want this fixe | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_829", "text": "Iterators don't seem to work for polymorphic types | 
 iter iter2<@T>() -> T { } fn main() { for each i: int in iter2() { } } 
fails with
 rustc: Instructions.cpp:192: void llvm::CallInst::init(llvm::Value*, llvm::ArrayRef, const llvm::Twine&): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i", "label": "medium", "label_id": 2}
{"id": "rust_831", "text": "Typechecker should be able to infer these types | ``` fn send_recv_fn() { let p = comm::port::(); let c = comm::chan::(p); comm::send(c, 42); assert(comm::recv(p) == 42); } ``` `comm::port` has the type `fn<~T> () -> port` and `comm::chan` has the type `fn<~T> fn(port) -> chan`. This program fails to typecheck | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_832", "text": "Add a way to suppress unused-variable warnings | Sometimes, a function needs to have an argument that it doesn't use (for example, if it's passed to `foldl` or another higher-order function). In this case, it would be good to have a naming convention for unused arguments that would suppress the \"unused variable\" warning on a ca | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_833", "text": "Typechecker is too conservative in determining whether a tag type is dynamically sized | It considers a tag to be dynamically sized if any of its type parameters are dynamically sized, even if none of the arms of the tag directly include the type. Probably what we should do is check the arms of the datatype to see which type parameters it directly includes. 
 tag | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_834", "text": "Type error messages lose tag names | Typechecker error messages don't contain the name of tags but instead things like \"tag:0:2r45334232\". This is a relative of #828 but should be able to be fixed without it. It's really annoying. | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_835", "text": "Type error messages lose tag names | Tag names aren't included in type error messages. This is similar to #828 but should be much easier to fix. | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_836", "text": "Build is broken when optimization is turned off | While building stage1/lib/libstd.so: ``` rustc: /home/marijn/prog/llvm/include/llvm/Support/Casting.h:194: typename llvm::cast_retty::ret_type llvm::cast(const Y&) [with X = llvm::FrameIndexSDNode, Y = llvm::SDNode*, typename llvm::cast_retty::ret_type = llvm:", "label": "question", "label_id": 4}
{"id": "rust_837", "text": "Support ranges in patterns | `1 ... 3` (numeric literal followed by three dots and a numeric literal) indicates a pattern that matches any literal in the given range. I hope the use of `...` here doesn't conflict with macro syntax.", "label": "question", "label_id": 4}
{"id": "rust_838", "text": "Binding patterns with sub-patterns | Implement `x@{y, _}` to mean 'bind x to the whole record, y to the content of field y'. Any pattern can be prefixed with `var@` to bind the whole thing.", "label": "medium", "label_id": 2}
{"id": "rust_839", "text": "Add an environment to the type context that records inited-ness information from typestate | Add an environment that maps the node ID for each call site to a map from each local variable in the stack frame to its inited-ness as computed by typestate. Then, the back-end can use this for GC root computing purposes.", "label": "medium", "label_id": 2}
{"id": "rust_840", "text": "Pretty-printer can't disambiguate alts followed by ( from function calls | From std::lib::task: ``` alt notify { some(c) { (**task_ptr).notify_enabled = 1u8; (**task_ptr).notify_chan = *c; } none {} }; (*regs).esp = align_down((*regs).esp - 12u32) - 4u32; ``` Without the trailing semi, the parens are interpreted as a function call. The pretty-printer ca", "label": "medium", "label_id": 2}
{"id": "rust_841", "text": "type_kind missing case for tuples | 
 fn foo[A](x: &A) {} fn main() { foo((0, 2)); } 
results in :0:0:0:0: error: internal compiler error missed case: (int,int) | labels: A-type-system", "label": "high", "label_id": 1} {"id": "rust_842", "text": "Pretty-printer doesn't preserve blank lines | I think it used to but it must have broke. The following turns into a wall of code: ``` let cfilename = cinfo.ident; let cdata = cinfo.data; // Claim this crate number and cache it let cnum = e.next_crate_num; e.crate_cache.insert(ident, cnum); e.next_crate_num += 1; // Now resol | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_843", "text": "zero_alloca outputs invalid bitcode in some cases | The following program results in an error like this when compiled: ``` alignment argument of memory intrinsics must be a constant int call void @llvm.memset.p0i8.i32(i8* %25, i8 0, i32 %92, i32 select (i1 icmp ult (i32 ptrtoint (i32* getelementptr ({ i1, i32 }* null, i64 0, i32 1", "label": "medium", "label_id": 2} {"id": "rust_844", "text": "Output TIME_PASSES info in a format that doesn't confuse emacs | Currently, it tries to interpret the timing messages as errors and gets upset. I'd like to turn on TIME_PASSES as a kind of progress bar, but that does not currently work as it makes navigating the errors very painful. | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_845", "text": "Figure out why emacs sometimes can't parse file/line/char error info | Sometimes, it considers the `:line` part or even the whole `:line:char` part as part of the filename, and fails to find the file. I haven't been able to recognize a pattern in the messages that go wrong. The way emacs parses error messages is quite obscure and full of hairy regex | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_846", "text": "Task cleanup code needs to know more about closure env to clean it up | This program currently leaks because the function env containing a pointer is freed simply with free, without iterating over its contents. Which also raises the question of whether `migrate_alloc` should recursively migrate all sub-allocs. ``` use std; fn x(_f: [int]) {} fn main(", "label": "question", "label_id": 4} {"id": "rust_847", "text": "Experiment with annotating args as \"noalias\" if we can prove it | LLVM arguments accept \"noalias\", which is nice. We can do type-based alias analysis to set it. | labels: C-enhancement, A-codegen", "label": "low", "label_id": 3} {"id": "rust_848", "text": "Mark functions as \"readnone\" or \"readonly\" | LLVM can reason about purity and do nice things like CSE… if we give it the information. | labels: E-easy, A-codegen", "label": "low", "label_id": 3} {"id": "rust_850", "text": "Pretty-printer is still adding extra whitespace in places | Diffs from a recent reformat: ``` item_obj(_obj, [ty_param], /* constructor id */node_id); item_res(_fn, - /* dtor */ + + /* dtor */ node_id, - /* dtor id */ + + /* dtor id */ [ty_param], ``` ``` noreturn; // functions with return type _|_ that always // raise an error or exit (i | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_851", "text": "Restrict lambda-blocks to occuring as function call arguments | Right now they are permitted anywhere.", "label": "medium", "label_id": 2} {"id": "rust_852", "text": "Implement named (item) closures | We should probably be able to have named functions that can close over their environments. I think we definitely want named copying closures. There shouldn't be anything fundamentally difficult about this, although these are items that behave differently that other items, and thu | labels: A-type-system, C-enhancement", "label": "low", "label_id": 3} {"id": "rust_853", "text": "Resolve a bunch of interactions between closures and typestate | The interaction between closures and typestate has a bunch of missing pieces. Blocks can deinitialize upvars and can close over things with constraints on them, which is problematic. Tim knows better than I do what the potential issues are.", "label": "medium", "label_id": 2} {"id": "rust_854", "text": "Test runner periodically deadlocks on linux | labels: A-testsuite, O-linux", "label": "medium", "label_id": 2} {"id": "rust_855", "text": "Interior strings | We should have interior strings so that we can send strings over channels with a minimum of fuss. Most of the infrastructure for interior vectors can be reused.", "label": "medium", "label_id": 2} {"id": "rust_856", "text": "Introduce slots; remove mutable boxes/vectors/record fields/object fields | IIRC we agreed upon the notion of a \"slot\", which is a simple way to create a mutable interior value. This lets us abstract over the mutable and immutable vectors without the subtyping relation that \"mutable?\" introduces, which is painful (and which we never got right in the pres", "label": "critical_bug", "label_id": 0} {"id": "rust_857", "text": "Introduce pattern guards | Probably with syntax something like: ``` alt (some 5) { some y when y > 3 { ... } some y { ... } none { ... } } ```", "label": "medium", "label_id": 2} {"id": "rust_858", "text": "Correctly handle closing over variables in alias analysis | It currently ignores the possibility of closing functions assigning to (or taking the value of) local variables.", "label": "medium", "label_id": 2} {"id": "rust_859", "text": "Switch from SHA-1 to MD4 or something else cheap | SHA-1 is high in the profiles (4.8%). We don't need the strong cryptographic properties AFAICT. | labels: E-easy, A-linkage, I-slow", "label": "low", "label_id": 3} {"id": "rust_860", "text": "Numeric literals allow trailing underscores | ``` let i = 0_______; ``` Works just fine. Likewise: ``` let i = 0_______i; ``` | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_861", "text": "fail in plain block doesn't translate | ``` fn main() { { fail; } } ``` ``` upcall fail 'Assertion !*terminated failed', ../src/comp/lib/llvm.rs:936 ```", "label": "medium", "label_id": 2} {"id": "rust_862", "text": "Function precondition not maintained for subsequent calls | Similar to #694: ``` pred p(j: int) -> bool { true } fn f(i: int, j: int) : p(j) -> int { j } fn g(i: int, j: int) : p(j) -> int { f(i, j) } ``` ``` ../src/test/run-pass/typestate.rs:8:37:8:44: error: Unsatisfied precondition constraint (for example, p(j)[../src/test/run-pass/typ", "label": "medium", "label_id": 2} {"id": "rust_863", "text": "Make ivecs heap-only | As discussed on IRC I think it'd make sense to make ivecs heap-only. This makes the mental model (not to mention the generated code) simpler. This also makes sense for C++ folks; they can just think of ivecs as `std::vector`. The \"SmallVector\" optimization (where some elements go", "label": "medium", "label_id": 2} {"id": "rust_864", "text": "Dinstinguish between within-crate export, and crate-external export | Sometimes we'll have modules within a library/crate that needs to refer to \"private\" things from other modules, but we may not want to export as part of the public API. We should have a way to support this. | labels: C-enhancement", "label": "question", "label_id": 4} {"id": "rust_865", "text": "Rustc should at the very least warn you if you export something that doesn't exist.", "label": "medium", "label_id": 2} {"id": "rust_866", "text": "package management system | Having a package management system like Perl CPAN, [Ruby gems](http://rubygems.org), and [Python's PyPI](http://pypi.python.org/pypi) would really simplify developing programs with rust. Ruby even has a couple other useful libraries built on top of gems, such as [bundler](http://", "label": "medium", "label_id": 2} {"id": "rust_868", "text": "Return type isn't inferred for nil-type blocks | ``` fn f(g: block() -> T) -> T { g() } fn main() { let x = f({ | | 10 }); // No-worky - cannot determine a type for this expression f({ | | }); // Also no-worky f({ | | ()}); // Yeah-worky let _: () = f({ | | }); } ``` | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_869", "text": "Implement nominal records | We should have nominal records at least as an option, in addition to structural records, whether or not we get rid of structural records. A nominal record could be declared with `record` instead of `type`, like, for example: ``` record path_ = {global: bool, idents: [ident], type", "label": "medium", "label_id": 2} {"id": "rust_871", "text": "Typechecker should not check argument types after it finds incorrect # of params | Right now, if you forget a parameter, you first get an error about the wrong number of parameters, and then more errors about the mismatched types of the parameters you provided. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_872", "text": "Implement purity inference | As per what I wrote in [Proposal for predicate language](https://github.com/graydon/rust/wiki/Proposal-for-predicate-language), the compiler should be able to infer that some functions declared with `fn` are pure (that is, they satisfy the rules used for checking `pure fn`-declar | labels: C-enhancement", "label": "low", "label_id": 3} {"id": "rust_873", "text": "std::unreachable | We need a function in the standard library that indicates unreachable code, specifically for the following case: ``` fn f() -> int { while true { ... } std::unreachable() } ``` Typestate can't prove that the while loop terminates, so the user has to do it themselves. Implement un | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_874", "text": "blocks not checked for all paths returning | ``` fn force(f: &block() -> int) -> int { f() } fn main() { force({| | }); } ``` compiles, but shouldn't.", "label": "medium", "label_id": 2} {"id": "rust_876", "text": "Bad error message when using a type that wasn't imported | Compiling this program: ``` use std; import std::vec::*; fn main() { let y; let x : char = last(y); } ``` yields a compiler internal error: `'get_id_ident: can't find item in ext_map'`. The error arises when trying to print out a unification error (`char` doesn't unify with `opti | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_877", "text": "Implement or remove literals as constraint arguments | Right now, I can't write: ``` fn f(x:int) : int::le(0, x) -> ... ``` because even though the AST supports literals as constraint args, the source and metadata parsers don't. I could work around this by writing: ``` fn f(x:int) : nonnegative(x) -> ... pure fn nonnegative(x:int) ->", "label": "question", "label_id": 4} {"id": "rust_878", "text": "Test stdtest::os::test_getenv_big is not valgrind clean on mac | labels: E-easy, A-testsuite, O-macos", "label": "low", "label_id": 3} {"id": "rust_879", "text": "String literals should be constant | Currently string literals are allocated and copied from constant C strings on instantiation, which is quite wasteful.", "label": "medium", "label_id": 2} {"id": "rust_880", "text": "Lambda blocks with no arguments are not pretty-printed correctly | `{ | | }` is pretty-printed without a space between the bars, which is subsequently interpreted as logical or. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_881", "text": "Allow record fields to be constraint arguments | Seems harmless to me, and would save some code clutter. Example: ``` check type_has_static_size(cx.ccx, m.output); ```", "label": "medium", "label_id": 2} {"id": "rust_882", "text": "Pretty printer could use heuristics to detect pointless line breaks | The most glaring example is ``` r = {some long expression that did not fit on a line}; ``` ... where the line break doesn't even create any space. But there are other situations, like ``` let foo = {multiline: record, literal: 100}; ``` Here the literal would have fit just fine w | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_883", "text": "Destructuring let can cause 'illegal instruction' | See patch 1339d0543407d653842503704642fb34f8e6a82d , which was needed to work around this issue. Only happens when optimization is turned on.", "label": "medium", "label_id": 2} {"id": "rust_884", "text": "make getenv/setenv safe | These functions are not threadsafe (maybe the Windows ones are - not sure), so we need to figure out a way to expose them in a safe way.", "label": "medium", "label_id": 2} {"id": "rust_885", "text": "Alt arm variant names are resolved in the wrong scope | ``` tag u { myvariant(int); } fn main() { alt myvariant(10) { myvariant(myvariant) { } } } ``` The binding called `myvariant` will shadow the tag variant by that name. It shouldn't.", "label": "medium", "label_id": 2} {"id": "rust_886", "text": "`for` is copying the vector elements, should alias them | The alias analysis already assumes this, and it seems a better approach anyway (copying every single element can be very expensive)", "label": "medium", "label_id": 2} {"id": "rust_887", "text": "Mystery windows bug (potential memory corruption) is still there | Patch 985ef59efd971f1d6b9bf4b5e484b75733e00444 makes the windows build (and only the windows build) fail with a bunch of bogus alias errors. The compiler somehow decides that `some` (the constructor of `option::t`) takes its argument by _mutable_ alias. We saw a similar, though n", "label": "medium", "label_id": 2} {"id": "rust_888", "text": "Track record fields in typestate | It seems harmless to also allow typestate constraints to mention immutable fields of records -- for example, letting you write: ``` check type_has_static_size(cx.tcx, t); ``` instead of ``` let tcx = cx.tcx; check type_has_static_size(tcx, t); ```", "label": "medium", "label_id": 2} {"id": "rust_889", "text": "Warn about unused imports | I don't see a bug for this already, but it would be nice to have a warning for unused imports. | labels: E-easy, A-type-system", "label": "low", "label_id": 3} {"id": "rust_890", "text": "pretty-printer does not preserve parens in (10).x | ``` fn main() { (10).x; } ``` becomes ``` fn main() { 10.x; } ``` which does not parse. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_891", "text": "pretty-printer does not parenthesize ret expr in callee position | ``` (ret g)(41) ``` becomes ``` ret g(41) ``` Here's an invalid program that gets transformed into a program that prints 42. ``` fn f(g: fn(int) -> int) -> int { (ret g)(41) } fn succ(x: int) -> int { x + 1 } fn main() { log_err f(succ); } ``` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_892", "text": "LLVM error with \"break\" in loop condition | ``` fn int_id(x: int) -> int { x } fn main() { while int_id(break) { } } ``` Result: ``` Assertion failed: (getCondition()->getType()->isIntegerTy(1) && \"May only branch on boolean predicates!\"), function AssertOK, file Instructions.cpp, line 730. ``` Expected: ``` error: Break o", "label": "medium", "label_id": 2} {"id": "rust_893", "text": "'Assertion !cx.terminated failed' involving obj/with | ``` fn main() { obj a() {} obj () { with a() }; } ``` Results in an assertion in a function called \"Br\": ``` upcall fail 'Assertion !cx.terminated failed', ../src/comp/middle/trans_build.rs:34 ```", "label": "medium", "label_id": 2} {"id": "rust_894", "text": "'Assertion !cx.terminated failed' involving nested rets | ``` fn f() -> int { ret (ret 2) + 3; } fn main() { } ``` Results in an assertion in a function called \"Br\": ``` upcall fail 'Assertion !cx.terminated failed', ../src/comp/middle/trans_build.rs:34 ``` Same error message as in #893, but a very different testcase.", "label": "medium", "label_id": 2} {"id": "rust_895", "text": "\"Invalid cast\" on some uses of bottom | ``` fn main() { log_err fail; } ``` gives ``` Assertion failed: (S->getType()->isPointerTy() && \"Invalid cast\"), function getPointerCast, file Constants.cpp, line 1275. ```", "label": "medium", "label_id": 2} {"id": "rust_896", "text": "src/run-pass/task-comm-5.rs occasionally segfaults | If I run it repeatedly from the command-line, it'll segfault about 1 in 10 times. (This is on Linux.) | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_897", "text": "Missing error \"some control paths may return to the caller\" in this case | ``` fn f() -> ! { ret 42; fail; } fn main() { } ``` Result: ``` Assertion failed: (getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && \"Ptr must be a pointer to Val type!\"), function AssertOK, file Instructions.cpp, line 1065. ``` If I rem", "label": "medium", "label_id": 2} {"id": "rust_898", "text": "Can't bind type-parametric functions to function arguments | Ran into this while trying to generalize the \"steal_exprs\" part of my fuzzer. ``` fn safe_to_steal(e: &@ast::expr) -> bool { alt e.node { _ { true } } } fn stash_if(c: fn(&@T)->bool, es: @mutable [T], e: &@T) { if c(e) { *es += [*e]; } } fn steal_exprs(crate: &ast::crate) -> [", "label": "medium", "label_id": 2} {"id": "rust_899", "text": "Const declarations aren't typechecked | ``` const i: str = 10; fn main() { log i; } ``` Should give an error in typeck, but instead it gets to LLVM, which says ``` Assertion failed: (InitVal->getType() == getType()->getElementType() && \"Initializer type must match GlobalVariable type\"), function setInitializer, file Gl | labels: E-easy, A-type-system", "label": "low", "label_id": 3} {"id": "rust_900", "text": "typeck hang with structural recursive type | ``` tag noption { some(noption); } fn main() { let nop2: noption = \"x\"; alt nop2 { some(t) { log t.x; } } } ``` Hangs the compiler in typeck. sully, will your planned fix for #742 take care of this?", "label": "medium", "label_id": 2} {"id": "rust_901", "text": "nil in native hits LLVM assert \"Invalid cast!\" | ``` native \"cdecl\" mod libc = \"\" { fn f(x: ()); } fn main() { } ``` fails in LLVM: ``` Assertion failed: (castIsValid(op, S, Ty) && \"Invalid cast!\"), function Create, file Instructions.cpp, line 2226. ```", "label": "medium", "label_id": 2} {"id": "rust_902", "text": "bind crash | Hit this crash while trying to type-parametrize another part of the fuzzer (check_variants_of_ast). I was able to work around it by sprinkling ampersands around the fuzzer. ``` type e = {node: uint}; fn nop(_e: e) {} fn bind_nop(my_e: e) { bind nop(my_e); } fn for_first_T(thin | labels: I-crash", "label": "high", "label_id": 1} {"id": "rust_903", "text": "Build failed with \"undefined reference\" GCC 4.6.1 | $ make cfg: building on Linux x86_64 cfg: unix-y environment cfg: using gcc compile_and_link: stage1/rustc /usr/bin/ld: stage1/rustc.o: undefined reference to symbol 'upcall_get_type_desc' /usr/bin/ld: note: 'upcall_get_type_desc' is defined in DSO stage0/lib/librustrt.so so try | labels: A-linkage, O-linux", "label": "medium", "label_id": 2} {"id": "rust_904", "text": "Indentation of pretty-printed blocks is terrible | It indents the body deeper than the opening brace, and runs off the right margin. I think something like this would preferable: ``` callsomethingwithablock({ | x | { // Indent one unit beyond the line that opened the block body_here(); }); ``` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_905", "text": "Native function link name isn't used | Native functions may specify an optional 'link name', which is intended to be the actual native name of the function: ``` fn close(fd: int) -> int = \"_close\"; ``` The compiler doesn't appear to actually do anything with this information, just generating a call to `close` as if th | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_906", "text": "Native function link name should be an attribute | Instead of ``` fn close(fd: int) -> int = \"_close\"; ``` we should write ``` #[link_name = \"_close\"] fn close(fd: int) -> int; ``` | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_907", "text": "Native \"llvm\" modules don't work | There is some support for modules of the form ``` native \"llvm\" mod llvm { fn sqrt(n: float) -> float = \"sqrt.f64\"; } ``` which are intended to generate calls to llvm intrinsics. In the one case we're actually using this (the above example from shootout-nbody) we are actually jus", "label": "question", "label_id": 4} {"id": "rust_908", "text": "Implement unwinding for Windows | Windows can't unwind on task failure because LLVM exception handling doesn't work there. | labels: A-runtime, A-LLVM, O-windows, A-codegen", "label": "medium", "label_id": 2} {"id": "rust_909", "text": "Make unwinding more efficient | We generate much more unwind code than is necessary, the full set of in-scope cleanups for every single function call. This could be more efficient by reusing landing pads and chaining scope unwind cleanup blocks together. Ideally we would have zero or one unwind block per scope. | labels: I-slow", "label": "low", "label_id": 3} {"id": "rust_910", "text": "Decide what to do when on task double-failure | Currently there are no landing pads generated for resource destructors so they are leaky when they fail. We don't have the same tricky situation that C++ has with throwing destructors but I haven't thought through how it should work yet. Edit: This issue has changed into what to | labels: A-runtime, A-type-system, A-destructors", "label": "medium", "label_id": 2} {"id": "rust_911", "text": "Can't instantiate an object while extending it | ``` obj a() { } let b = obj() { with a() }; ``` ``` rt: 4d8e:main:main: upcall fail 'Assertion !cx.terminated failed', ../src/comp/middle/trans_build.rs:34 rt: 4d8e:main: domain main @0x8999640 root task failed ``` As opposed to this: ``` obj a() { } let c = a(); let b = obj() { ", "label": "medium", "label_id": 2} {"id": "rust_912", "text": "Block type-inference sometimes fails | The follow code fails with ``` foo.rs:5:14: 5:18 error: the type of this value must be known in this context foo.rs:5 find({|f| f.id == x}, arr); ^~~~ ``` If I move the `+=` statement above the call to find, it typechecks. Maybe this is a fundamental limitation of our typechecker | labels: A-type-system, E-hard", "label": "medium", "label_id": 2} {"id": "rust_913", "text": "Typestate crashes on this program | ``` fn main() { let _a = 1, _b = 2, _c = 3; for d in [1] { {|x| x == 10 }; } } ``` The error is: ``` rt: b8e9:main:main: upcall fail 'Assertion i < v.nbits failed', src/lib/bitv.rs:75 rt: b8e9:main: domain main @0xa858148 root task failed ```", "label": "medium", "label_id": 2} {"id": "rust_914", "text": "Leave off block cleanups when the end of the block is unreachable | This'll be less of an issue once we stop generating multiple copies of clean up sequences, but will still make a difference in pointless bitcode. Right now, this is responsible for a _lot_ of dead code.", "label": "low", "label_id": 3} {"id": "rust_917", "text": "Maybe move should be a unary op? | If I have ``` let x = []; // build up a big vector somehow ret {a: x, b: something}; ``` I'd want to move the vector into the record, rather than copy it. The move-temporary-value optimization already ensures that, if the given expression is a temporary, it would be moved into th", "label": "medium", "label_id": 2} {"id": "rust_918", "text": "Implement return-by-reference | See https://mail.mozilla.org/pipermail/rust-dev/2011-July/000634.html for context. Opening this to track progress on the feature.", "label": "medium", "label_id": 2} {"id": "rust_919", "text": "pretty-printer does not preserve parens in (a = 10).x; | Issue #890 took care of the simple case, but this more complex case is still broken. ``` fn g() { (a = 10).x; } ``` becomes ``` fn g() { a = 10.x; } ``` which does not parse. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_920", "text": "pretty-printer loses parens in \"alt (fail) { ... }\" | ``` tag c { a; b; } fn nyan() { alt (fail) { _ { fail } }; } fn main() { } ``` Loses the parens around \"fail\", taking it from a nonsensical run-pass program to a compile-fail program, thanks to the fun syntactic ambiguity of fail. ``` d.rs:2:23: 2:24 error: unexpected token: _ d. | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_921", "text": "pretty-printer changes meaning of assert expr in callee position | ``` fn f() { (assert a)(1); } ``` becomes ``` fn f() { assert (a)(1); } ``` which becomes ``` fn f() { assert (a(1)); } ``` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_922", "text": "Can't spawn a temporary closure | This doesn't valgrind: ``` fn f() { } fn main() { task::spawn(bind f()); } ``` This does: ``` fn f() { } fn main() { let g = f; task::spawn(g); } ```", "label": "medium", "label_id": 2} {"id": "rust_923", "text": "pretty-printer loses disambiguation semi before \"(0).x\" | ``` fn f() { alt true { true { } }; (0).x = 1; } ``` loses a semicolon: ``` fn f() { alt true { true { } } (0).x = 1; } ``` causing it to become a call: ``` fn f() { alt true { true { } }(0).x = 1; } ``` I guess pprust::maybe_protect_block needs to know about the fix for #890, wh | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_924", "text": "non-exhaustive match failure in trans_rec | ``` fn main() { {c: ret}; } ``` gives me ``` upcall fail 'non-exhaustive match failure', ../src/comp/middle/trans.rs:3855 ```", "label": "medium", "label_id": 2} {"id": "rust_925", "text": "Detect last use of a local, move out of it if possible | This supersedes the 'return local variable' kludge we currently have. If a local variable is last used in a way that involves copying it (return, store to a data structure, etc), we can move it instead of copying.", "label": "medium", "label_id": 2} {"id": "rust_926", "text": "Change fail to unreachable() in compiler and libraries | See #873 -- I added a std::util::unreachable() function; the next thing to do is to look for instances of 'fail \"entered unreachable code\"', or some such, in the compiler (like after a while (true) {... ret ...} loop) and replace them with calls to unreachable(). | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_927", "text": "pretty-printer should parenthesize this expr_assert | ``` fn f() { (assert (10 == 10)) = 10 } ``` becomes ``` fn f() { assert (10 == 10) = 10 } ``` which becomes ``` fn f() { assert (10 == 10 = 10) } ``` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_928", "text": "pretty-printer should parenthesize expr_cast in callee position | ``` fn main() { (3 as int)(3); } ``` becomes ``` fn main() { 3 as int(3); } ``` which doesn't parse | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_929", "text": "pretty-printer loses parens in \"if (1 == fail) { }\" | ``` fn f() { if (1 == fail) { } else { } } ``` and ``` fn f() { if 1 == (fail) { } else { } } ``` lose their parens, becoming something that fails to parse: ``` fn f() { if 1 == fail { } else { } } ``` This could be solved by parenthesizing the whole discriminant, parenthesizing | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_930", "text": "\"fail fail\" hangs in trans | ``` fn f() -> ! { fail fail } fn main() { } ``` test.rs:1:19: 1:23 error: internal compiler error fail called with unsupported type _|_ followed by a hang ``` (gdb) thread 9 [Switching to thread 9 (process 4284)] 0xffff027d in __spin_lock () (gdb) bt #0 0xffff027d in __spin_lock ", "label": "question", "label_id": 4} {"id": "rust_931", "text": "\"error: internal compiler error sequence_element_type called on non-sequence value\" | ``` fn main() { [ret, 2, 3]; } ``` error: internal compiler error sequence_element_type called on non-sequence value", "label": "high", "label_id": 1} {"id": "rust_932", "text": "\"internal compiler error Translating unsupported cast.\" | ``` fn main() { let u = (assert true) as u32; } ``` error: internal compiler error Translating unsupported cast. | labels: E-easy, A-type-system", "label": "question", "label_id": 4} {"id": "rust_933", "text": "recursive check breaks typestate's mind | ``` pure fn c() -> bool { check c(); true } fn main() {} ``` error: internal compiler error bit_num: asked for pred constraint, found an init constraint", "label": "high", "label_id": 1} {"id": "rust_934", "text": "\"Assertion failed: (alloc->magic == MAGIC)\" | ``` fn wsucc() -> int { { ret { ret 0 } + 0 }; } fn main() { } ``` triggers #894 ``` upcall fail 'Assertion !cx.terminated failed', ../src/comp/middle/trans_build.rs:34 ``` and then dies terribly (unwinding?) ``` Assertion failed: (alloc->magic == MAGIC), function free, file ../s", "label": "medium", "label_id": 2} {"id": "rust_935", "text": "\"Invalid cast\" with log ret | ``` fn f() { log ret; } fn main() { } ``` Assertion failed: (S->getType()->isPointerTy() && \"Invalid cast\"), function getPointerCast, file Constants.cpp, line 1275.", "label": "medium", "label_id": 2} {"id": "rust_936", "text": "Compiler segfaults after printing error in some tests | I observed this in `src/test/compile-fail/extft-non-literal.rs` and `src/test/compile-fail/extft-non-literal2.rs` , might be happening in others. This is probably an unwinding bug. With some changes to our generated code (I was working on making calls simpler), it hangs instead o | labels: I-crash", "label": "high", "label_id": 1} {"id": "rust_937", "text": "Wierd segfault in compiler when certain tests are included in check-fast | If I uncomment the xfail-fast line in either linked-failure or lots-a-fail the compiler will fail to build librun_pass_stage2.so with backtraces like ``` #0 0x08637d5d in glue_take531 () #1 0x086621cf in glue_take2656 () #2 0xf7f309ba in map::mk_hashmap::hashmap::method::items () | labels: I-crash", "label": "high", "label_id": 1} {"id": "rust_938", "text": "compiletest needs to check error code for compile-fail tests | Like run-fail tests, we need to make sure the compiler not only fails, but fails correctly. Currently the following tests all fail by segfaulting: ``` [compile-fail] ../src/test/compile-fail/break-outside-loop.rs [compile-fail] ../src/test/compile-fail/dup-link-name.rs [compile-f | labels: A-testsuite", "label": "medium", "label_id": 2} {"id": "rust_939", "text": "Move-mode arguments are not unwound correctly | ``` fn f(-a: @int) { fail; } fn main() { let a = @0; f(a); } ``` a is double-freed because the cleanup revocations don't take effect until after the function is called", "label": "low", "label_id": 3} {"id": "rust_940", "text": "Unexplained alt + expression block failure | See patch 43b219dbec5a3fa0ded5c02c95149d8517343087 . The code before the patch runs fine with optimization turned off, but corrupts the result of the alt (when the third, bottom branch was taken) when optimization is on. This simple transformation -- assigning to a variable inste", "label": "medium", "label_id": 2} {"id": "rust_941", "text": "warn about unused variables from patterns | ``` use std; tag t { alpha; beta; } fn f(x : t) { alt x { alfa { } }; } fn main() { } ``` Should warn that \"alfa\" is an unused variable. (I misspelled the tag name and forgot a period; the warning could help me notice that I didn't succeed in having it treated as a tag name.) | labels: E-easy, A-lints", "label": "low", "label_id": 3} {"id": "rust_942", "text": "\"fail fail\" internal compiler error | ``` fn f() -> ! { fail fail } fn main() { } ``` ``` test.rs:1:19: 1:23 error: internal compiler error fail called with unsupported type _|_ ```", "label": "question", "label_id": 4} {"id": "rust_943", "text": "LLVM asserts involving 'ret' as a function argument | ``` fn id(x: bool) -> bool { x } fn main() { id(true) && id(ret); } ``` Assertion failed: (getType() == V->getType() && \"All operands to PHI node must be the same type as the PHI node!\"), function addIncoming, file /Users/jruderman/code/llvm/include/llvm/Instructions.h, line 2046", "label": "medium", "label_id": 2} {"id": "rust_944", "text": "Rust programs crash when dividing by zero | ``` fn main() { let y = 0; assert 1 / y != 0; } ``` SIGFPE / Floating point exception Is this the intended behavior? | labels: A-runtime, E-easy, I-crash", "label": "high", "label_id": 1} {"id": "rust_945", "text": "double free on unwind | ``` // error-pattern:non-exhaustive match failure fn test_box() { @100; } fn test_str() { let res = alt false { true { \"happy\" } }; assert res == \"happy\"; } fn main() { test_box(); test_str(); } ``` About 80% of the time: ``` Assertion failed: (alloc->magic == MAGIC), function fr", "label": "medium", "label_id": 2} {"id": "rust_946", "text": "LLVM assert with \"put break\" | ``` iter x() -> int { while true { put break; } } fn main() {} ``` Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && \"Invoking a function with a bad signature!\"), function init, file Instructions.cpp, line 531.", "label": "medium", "label_id": 2} {"id": "rust_947", "text": "LLVM assert with plain \"put;\" | In generic-iter-frame.rs, replacing \"put ();\" with \"put;\" results in an LLVM assertion. Reduced testcase: ``` iter i() { put; } fn main() { for each j in i() { } } ``` Assertion failed: (((Args.size() == FTy->getNumParams()) || (FTy->isVarArg() && Args.size() > FTy->getNumParams(", "label": "medium", "label_id": 2} {"id": "rust_948", "text": "typestate hang: record update with \"fail\" | ``` fn main() { let origin = {x: 0, y: 0}; let f = {x: (fail) with origin}; } ``` Hangs rustc: ``` (gdb) bt #0 memory_region::malloc (this=0x1c00ea0, size=12, tag=0x8bf3cd \"tdesc\", zero=true) at ../src/rt/memory_region.cpp:85 #1 0x00898731 in upcall_malloc (task=0x1c00df0, nbytes", "label": "medium", "label_id": 2} {"id": "rust_949", "text": "LLVM assert with \"let c <- fail;\" | ``` fn id(x: uint) -> uint { x } fn main() { let c <- fail; id(c); } ``` Assertion failed: (getOperand(0)->getType() == cast(getOperand(1)->getType())->getElementType() && \"Ptr must be a pointer to Val type!\"), function AssertOK, file Instructions.cpp, line 1065.", "label": "medium", "label_id": 2} {"id": "rust_950", "text": "rustc should delete the source file on a type error | This feature was added to GHC; we should support it for feature parity. See https://twitter.com/bos31337/status/116372971509121025 for more information. Note that when a type error occurs during macro expansion, we should probably delete the file that called the macro, not the ma | labels: E-easy", "label": "question", "label_id": 4} {"id": "rust_952", "text": "type_is_pod is missing an arm for ty_uniq | ``` fn main() { [~100]; } ``` upcall fail 'non-exhaustive match failure', ../src/comp/middle/ty.rs:1210", "label": "medium", "label_id": 2} {"id": "rust_953", "text": "pretty-printer loses parens around expr_fail in cast | ``` fn f() { (fail \"boo\") as float / 2.0; } ``` becomes ``` fn f() { (fail \"boo\" as float) / 2.0; } ``` which becomes ``` fn f() { fail \"boo\" as float / 2.0; } ``` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_954", "text": "Lexer is too eager to treat - as unary negation | ``` fn main() { log 3-2; } ``` b.rs:2:9: 2:11 error: expected ';' or '}' after expression but found -2 | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_955", "text": "parser or pretty-printer problem with do-while loop as lvalue | ``` fn main() { let x = 0; (do { } while x) = 1; } ``` is correctly rejected by the type checker as assigning to a non-lvalue. But the pretty-printer turns it into ``` fn main() { let x = 0; do { } while x = 1; } ``` and then into ``` fn main() { let x = 0; do { } while x = 1 } ` | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_956", "text": "do..while conditions are not type-checked | The type checker ensures that \"while\" conditions are bools, but it does not do the same for \"do..while\" conditions. ``` fn main() { do {} while 1; } ``` Result: ``` Assertion failed: (getCondition()->getType()->isIntegerTy(1) && \"May only branch on boolean predicates!\"), function | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_957", "text": "unreachable str concat causes llvm assert | ``` fn main() { fail; \"good\" + \"bye\"; } ``` Assertion failed: (isa(Val) && \"cast() argument of incompatible type!\"), function cast, file /Users/jruderman/code/llvm/include/llvm/Support/Casting.h, line 194.", "label": "question", "label_id": 4} {"id": "rust_958", "text": "ret guard makes the LLVM verifier sad | ``` fn main() { alt 2 { x when (ret) { x; } } } ``` LLVM dies saying: ``` PHINode should have one entry for each predecessor of its parent basic block! %6 = phi i32* [ %3, %9 ] Broken module found, compilation aborted! Stack dump: 0. Running pass 'Function Pass Manager' on module", "label": "medium", "label_id": 2} {"id": "rust_959", "text": "Windows build is broken when optimization is turned off | (And has been for quite a while.) Building the stag1 stdlib segfaults. | labels: O-windows", "label": "medium", "label_id": 2} {"id": "rust_960", "text": "Emacs does not like typestate error messages | An example: ``` ../src/comp/middle/trans_uniq.rs:38:27: 38:51 error: Unsatisfied precondition constraint (for example, type_is_unique_box(bcx, uniq_ty)[../src/comp/middle/tra\\ ns_uniq.rs:82:6: 82:32]) for expression: content_ty(bcx, uniq_ty) Precondition: type_is_unique_box(bcx, | labels: E-easy", "label": "low", "label_id": 3} {"id": "rust_961", "text": "maybe_auto_unbox hang with uniq | ``` fn altsimple() { alt ~true { _ { } } } fn main() { } ``` Hangs in the alias pass: ``` #0 upcall_malloc (task=0x1c00df0, nbytes=16, td=0x0) at ../src/rt/rust_upcall.cpp:57 #1 0x002c5563 in middle::mut::expr_root::maybe_auto_unbox () #2 0x002c8d16 in middle::mut::expr_root () #", "label": "medium", "label_id": 2} {"id": "rust_962", "text": "generic function mishandles unique pointer | (Based on test/run-pass/generic-drop-glue.rs) ``` fn f(t: T) { let _t1 = t; } fn main() { let x = ~1; f(x); } ``` Compiles to a program that double-frees (and leaks?): ``` g(10978,0xb0101000) malloc: *** error for object 0x1000000: pointer being freed was not allocated *** set", "label": "medium", "label_id": 2} {"id": "rust_963", "text": "Incorrect kind checking for local initializer | ``` fn f(t: T) { let _t1 = t; } ``` _t1 is a pinned kind so can't be copied from t. As a comparison, the following generates the correct kind error: ``` fn f(t: T) { let _t1; _t1 = t; } ``` | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_964", "text": "Mutable keyword on reference arguments is redundant | These two are the same now I believe ``` fn f<@T>(&o: mutable option::t) { assert o == option::none; } ``` ``` fn f<@T>(&o: option::t) { assert o == option::none; } ```", "label": "medium", "label_id": 2} {"id": "rust_965", "text": "Assignment to generic argument doesn't validate | ``` fn g<@T>(o: T) { o = o; } ``` ``` Instruction does not dominate all uses! %15 = call i8* @upcall_dynastack_alloc_2(%task* %1, i32 %14, %tydesc* %3) call void @llvm.memmove.p0i8.p0i8.i32(i8* %15, i8* %4, i32 %6, i32 1, i1 false) Instruction does not dominate all uses! %15 = ca", "label": "medium", "label_id": 2} {"id": "rust_966", "text": "Remove 'deprecated mutable type constructors' | If you sprinkle the mutable keyword in the wrong place you'll get a warning that says \"ignoring deprecated 'mutable' type constructor\". I imagine we can remove this support now. | labels: E-easy, C-cleanup", "label": "question", "label_id": 4} {"id": "rust_967", "text": "Remove unused fields from rust_tydesc | rust_tydesc has two fields that are no longer used. I imagine removing them is tricky, but it's got to be done eventually. | labels: A-runtime, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_968", "text": "'Predicate type_is_unique_box(bcx, uniq_ty) failed' | ``` fn main() { ~fail; } ``` upcall fail 'Predicate type_is_unique_box(bcx, uniq_ty) failed', ../src/comp/middle/trans_uniq.rs:35", "label": "medium", "label_id": 2} {"id": "rust_969", "text": "invalid free with uniq-by-ref | ``` fn f(&i: ~int) { i = ~2; } fn main() { f(~1); } ``` unique-fn-arg-mut_expr_8_12(66672,0xb060b000) malloc: **\\* error for object 0x1000000: pointer being freed was not allocated (Based on src/test/run-pass/unique-fn-arg-mut.rs. The important change is not assigning ~1 to a loc", "label": "medium", "label_id": 2} {"id": "rust_970", "text": "'non-exhaustive match failure' in fold_ty (inner constraint) | ``` tag maybe_ordered_pair { yes({low: int, high: int} : less_than(*.low, *.high)); no; } pure fn less_than(x: int, y: int) -> bool { ret x < y; } fn main() { } ``` upcall fail 'non-exhaustive match failure', ../src/comp/middle/ty.rs:671 I guess the alt in fold_ty is missing ty_c", "label": "medium", "label_id": 2} {"id": "rust_971", "text": "Parser rejects some uses of inner constraints | ``` tag ordered_pair_list { cons({low: int, high: int} : lt(*.low, *.high), @ordered_pair_list); nil; } pure fn lt(x: int, y: int) -> bool { ret x < y; } fn main() { } ``` Gives me ``` tmp.rs:2:52: 2:53 error: expecting (, found @ tmp.rs:2 cons({low: int, high: int} : lt(*.low, * | labels: A-frontend", "label": "medium", "label_id": 2} {"id": "rust_972", "text": "Return-by-reference round-trip failure | ``` fn getx(a: {x: int}, _b: int) -> &!1 int { ret a.x; } fn main() { assert getx({x:3}, 4) == 3; } ``` The first line is pretty-printed without a space: ``` fn getx(a: {x: int}, _b: int) -> &!1int { ret a.x; } ``` And then the \"i\" in \"int\" gets eaten: ``` fn getx(a: {x: int}, _b | labels: A-pretty", "label": "medium", "label_id": 2} {"id": "rust_973", "text": "LLVM assert with \"bind id(fail)\" | ``` fn id(n: int) -> int { n } fn main() { bind id(fail); } ``` Assertion failed: (isa(Val) && \"cast() argument of incompatible type!\"), function cast, file /Users/jruderman/code/llvm/include/llvm/Support/Casting.h, line 194.", "label": "question", "label_id": 4} {"id": "rust_974", "text": "Lexer truncates u64 literals outside u32 range | Consider this: ``` rust use std; fn main() { let x : u64 = 2000000000u64 * 4u64; log_err x; let y : u64 = 8000000000u64; log_err y; } ``` The output is: ``` rt: f462:main:main: 8000000000 rt: f462:main:main: 3705032704 ``` It looks like the lexer uses 32-bit integers in scan_numb | labels: A-frontend, E-easy", "label": "low", "label_id": 3} {"id": "rust_975", "text": "mutable fields subvert purity | This program fails the assert in verify_sanity. I think this program should fail to compile with a message like \"pure functions cannot read mutable fields of records\". ``` type holder = { mutable x : int }; pure fn holds_two(h: holder) -> bool { h.x == 2 } fn verify_sanity(h: hol", "label": "medium", "label_id": 2} {"id": "rust_976", "text": "LLVM assert with generic uniq assign | ``` fn f<@T>(x: ~T) { let _x2 = x; } fn main() { } ``` Assertion failed: (S->getType()->isPointerTy() && \"Invalid cast\"), function CreatePointerCast, file Instructions.cpp, line 2337.", "label": "medium", "label_id": 2} {"id": "rust_977", "text": "Unique boxes containing pinned kinds should be shared kinds | Currently unique boxes containing pinned kinds are pinned kinds but Graydon says they are supposed to be shared. To make this change we have to make sure that unique boxes containing pinned kinds can't be copied. I don't fully understand yet. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_979", "text": "temporary unique boxes and vectors should be moved into tags | It looks like tag(~thing) and tag([thing]) make a copy of the item in the tag when they should be moving", "label": "medium", "label_id": 2} {"id": "rust_980", "text": "glue_drop crash | ``` tag maybe_pointy { no_pointy; yes_pointy(@pointy); } type pointy = { mutable x : maybe_pointy }; fn main() { let m = @{ mutable x : no_pointy }; m.x = yes_pointy(m); } ```", "label": "medium", "label_id": 2} {"id": "rust_981", "text": "Leak with cycle through closure | ``` type foo = { mutable z : fn() }; fn nop() { } fn nop_foo(_x : @foo) { } fn main() { let w = @{ mutable z: nop }; w.z = bind nop_foo(w); } ``` | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_982", "text": "cycle collection crash | ``` tag maybe_pointy { no_pointy; yes_pointy(@pointy); } type pointy = { mutable x : maybe_pointy }; iter allunder(n: uint) -> uint { let i: uint = 0u; while i < n { put i; i += 1u; } } fn main() { const max : uint = 10u; let v : [mutable @pointy] = [mutable]; for each i in allun | labels: A-runtime, I-crash, A-LLVM", "label": "high", "label_id": 1} {"id": "rust_983", "text": "RUST_CC_ZEAL crashes the compiler | rustc crashes when run with RUST_CC_ZEAL, even with an empty input file: ``` Thread 6 Crashed: 0 cc::irc::compute_ircs(rust_task*, std::map, std::allocator > >&) + 325 (rust_shape.h:327) 1 cc::do_cc(rust", "label": "medium", "label_id": 2} {"id": "rust_984", "text": "Shared-kind typarams shouldn't be copyable | Because ~resource is shared kind it is not safe to copy shared kinds for which we don't know the type. This means that the ty param `@T` must not be copied. On first blush this seems quite restrictive since shared boxes may not be used as ty params when they need to be copied. | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_985", "text": "Implicit copy of pinned kind runs destructor twice | ``` resource r(i: @mutable int) { *i = *i + 1; } fn movearg(i: r) { // Implicit copy to mutate reference i let j <- i; } fn main() { let i = @mutable 0; { let j <- r(i); movearg(j); } log_err *i; // nooooooo. destructor ran twice assert *i == 2; } ``` | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_986", "text": "Make sure implicit copies don't copy non-copyable types | Find the places where we're doing an implicit copy and make sure they follow the rules from kind.rs | labels: A-type-system", "label": "medium", "label_id": 2} {"id": "rust_988", "text": "Move compiletest from test/ to src/ | compiletest is not a test, it's a test runner | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_989", "text": "Don't allow record extension from resource types | Something like the following shouldn't be possible ``` let a = {x: 0, y: my_resource(0}; let b = {x: 2 with a}; ``` Don't actually know what the compiler does currently, but I'm guessing it does the copy. | labels: E-easy, A-type-system", "label": "low", "label_id": 3} {"id": "rust_990", "text": "Get rid of glue.o | I don't know what it's for and it would simplify the way rust programs are built if it didn't exist. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_991", "text": "Implement C stacks | We need C stacks before stack growth will be feasible. We statically know whenever we're calling a C function; this allows us to get away with not having linker support, as the LLVM `__morestack` stuff requires. There will be one C stack per Rust thread. Calling a C function swit | labels: A-runtime", "label": "question", "label_id": 4} {"id": "rust_992", "text": "Get rid of main.ll | This can easily be generated by rustc | labels: E-easy, C-cleanup", "label": "low", "label_id": 3} {"id": "rust_993", "text": "Resources can't be put into tags | ``` tag t { t0(r); } let i = @mutable 0; { let a <- t0(r(i)); } assert *i == 1; ``` This performs a copy of r(i). With other types, e.g. `{a: r(i)}` trans optimizes this to a move, so kind analysis allows it.", "label": "medium", "label_id": 2} {"id": "rust_994", "text": "Update development policy to relax rules on committer agreements | There has been discussion lately about whether our development policy is too strict regarding committer agreements. Specifically, we require them for all patches, which is not the norm for Mozilla. There seems to be agreement that the committer agreement only applies to those wit", "label": "question", "label_id": 4} {"id": "rust_995", "text": "Function return does not always perform a move | This is a problem for unique pointers ``` use std; import std::unsafe; fn f(addr: @mutable int) -> ~int { let i = ~100; let a: int = unsafe::reinterpret_cast(i); log a; *addr = a; // Since i is not a temporary it gets copied, which is not what you expect ret i; } fn main() { let ", "label": "medium", "label_id": 2} {"id": "rust_996", "text": "test/run-pass/alt-range is still wonky on windows | I could have sworn this worked, but now I get the following ``` ../src/test/run-pass/alt-range.rs:25:6: 25:9 error: lower range bound must be le ss than upper ../src/test/run-pass/alt-range.rs:25 1.0 to 5.0 {} ``` | labels: A-testsuite, O-windows", "label": "medium", "label_id": 2} {"id": "rust_997", "text": "Build directory structure doesn't support target executables | Our current layout for a stage looks like ``` bin - host executables lib - host libraries rustc ${target} - target libraries ``` This works for now because we don't actually cross-compile, but it also means that building host executables (rustc, fuzzer) is done in a different way", "label": "question", "label_id": 4} {"id": "rust_998", "text": "Cycle collector doesn't collect rustc::syntax::fold | The AST fold has to manually break a cycle. With the cycle collector we would expect that this is no longer necessary, but there is still a leak when we don't break the cycle. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_999", "text": "Rename libstd.so to libruststd.so | This is a file we will be installing in /usr/lib. Simply calling it 'std' is not very nice. The crate can still be named 'std' - it will just have a friendlier file name. | labels: C-cleanup", "label": "low", "label_id": 3} {"id": "rust_1000", "text": "Errors inside macros use unreliable line/column references | Example:
a2q2a.rs:5:41: 5:47 error: unresolved modulename: std a2q2a.rs:5 log_err #fmt(\"usage: %s infile\", args[0]); ^~~~~~
| labels: A-frontend, E-hard, A-syntaxext", "label": "medium", "label_id": 2} {"id": "rust_1001", "text": "obj methods can't be type polymorphic independently of the obj | ``` type filesearch = obj { fn sysroot() -> fs::path; fn lib_search_paths() -> [fs::path]; fn get_target_lib_path() -> fs::path; fn get_target_lib_file_path(file: fs::path) -> fs::path; fn search<@T>(pick: pick) -> option::t; }; ``` `fn search` doesn't parse. This should be", "label": "medium", "label_id": 2} {"id": "rust_1002", "text": "Detect when a record, tuple, or call can write in-place | If you do `x = rec(a=10 with x)` or `y = f(y)` or similar, the result has to be constructed in a scratch space, rather than directly into the local variable's memory, because the local is needed to build the result. The alias analysis could mark expressions where this is not need", "label": "medium", "label_id": 2} {"id": "rust_1003", "text": "make check dependencies are busted | test/rustctest.stageN doesn't build its dependencies", "label": "medium", "label_id": 2} {"id": "rust_1004", "text": "Valgrind doesn't understand writing arguments to another stack | We write arguments from the Rust stack to the C stack when doing stack switching. This confuses Valgrind, which thinks that it's a mistake. We need to work around this somehow. | labels: A-runtime", "label": "medium", "label_id": 2} {"id": "rust_1005", "text": "Segfault in rustc with --time-passes due to binding generically to unit | When we create a thunk via `bind` from a function that returns a unit type, and pass that thunk to a function that expects a generic thunk of type `fn() -> T`, we segfault when calling the thunks in DPS style. I'm going to add a `time_unit` hack that works around this for now Swi | labels: I-crash", "label": "high", "label_id": 1} {"id": "rust_1008", "text": "Pass immediates by value, rather than by reference", "label": "medium", "label_id": 2} {"id": "rust_1010", "text": "Windows installer license text doesn't fit in window | When running the windows installer the widget holding the license text doesn't fit into the window, the scrollbars are hidden, and the text wraps in an ugly way. | labels: O-windows", "label": "medium", "label_id": 2} {"id": "rust_1011", "text": "Figure out what we're going to do instead of rpath on windows | When we install rust on windows the files are arranged in such a way that rustc can't be run because the dll's aren't found. We need to either adjust the directory structure specifically for windows, make some sort of 'rust shell' batch file that sets up the environment and runs | labels: O-windows", "label": "medium", "label_id": 2} {"id": "rust_1012", "text": "Find a way to take or drop temporaries without spilling them | Currently, glue functions take a pointer to a value. This means we're spilling all temporary boxes and unique pointers to the stack just in order to drop them. This is rather wasteful. If we know the type (which we do for all immediates -- generic values are never treated as imme", "label": "medium", "label_id": 2} {"id": "rust_1013", "text": "Add permute to standard library | It's too much effort to create a branch and pull request at this point, so I'll paste the code I've been using inline:
iter permute(elts: [@T]) -> [@T] { if vec::is_not_empty(elts) { for each i in uint::range(0u, vec::len(elts)) { let rest = vec::slice(elts, 0u, i); rest  | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1014", "text": "Add float support to #fmt | It's missing. This is a reminder to clean up my hacky patches to fully support syntax like \"%3.5f\". The default precision in C is six digits, I believe. | labels: A-frontend, E-easy", "label": "question", "label_id": 4}
{"id": "rust_1015", "text": "str_to_float converts fractional values in reverse | The routine uses vec::pop_char instead of vec::shift_char. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1016", "text": "bump LLVM on rust-mac1 when it comes back online | rust-mac1 has been offline for weeks now. when server ops reboots it we need to catch it up to the correct llvm revision", "label": "medium", "label_id": 2}
{"id": "rust_1017", "text": "trans_eager_binop should use ty::type_is_float | The hand-rolled check for is_float doesn't take into account machine types. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1018", "text": "Add random float generation to stdlib | Easy way: take the result of rand::mk_rng().next() and divide it by 4294967296.0, yielding a float in the range [0.0,1.0] | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1019", "text": "dyld: Library not loaded: @rpath/libstd.dylib - when doing make check | - rust git version: aff536ec0e2f12336c86810f1558d50416d25394 - llvm svn version: 141079 - rust configure tags: --disable-valgrind --disable-optimizations - OS: MacOS X Lion Previously, compilation froze. With the latest version, I have the following trace: $ make check cfg: shell | labels: A-linkage, O-macos", "label": "medium", "label_id": 2}
{"id": "rust_1020", "text": "ld: symbol(s) not found for architecture i386 | Specs: - LLVM 3.0 SVN - Mac OS X 10.7.1 Lion $ ./configure ... $ make ... \"_LLVMWriteBitcodeToFile\", referenced from: -exported_symbol[s_list] command line option \"_LLVMWriteBitcodeToFileHandle\", referenced from: -exported_symbol[s_list] command line option \"_LLVMX86FP80Type\", re | labels: A-linkage, O-macos", "label": "medium", "label_id": 2}
{"id": "rust_1021", "text": "Make vectors and strings immediate again | The reasons for making them non-immediate have all become irrelevant.", "label": "medium", "label_id": 2}
{"id": "rust_1022", "text": "Implement bare functions | Per https://github.com/graydon/rust/wiki/Function-types | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1023", "text": "Implicit return double-frees in some situations | The function below (in trans.rs) works fine as long as the last clause contains `ret bcx;`. If this is changed to simply `bcx`, the compiler dies on a double free when compiling the standard lib. The form of the other clauses doesn't matter -- they work with or without the `ret`.", "label": "medium", "label_id": 2}
{"id": "rust_1027", "text": "crash: upcall fail 'non-exhaustive match failure', ../src/comp/middle/resolve.rs:528 | Test case at http://www.leptoquark.net/~elly/ncurses-upcall.tar - run 'make' with RUSTC set to the path to rustc. Stack: (gdb) bt #0 upcall_fail (task=0x8378c10, expr=0x82ef0d0 \"non-exhaustive match failure\", ``` file=0x82ef0f0 \"../src/comp/middle/resolve.rs\", line=528) at ../src", "label": "medium", "label_id": 2}
{"id": "rust_1028", "text": "Failure parsing malformed crate directive | ``` #[link(name = \"ncurses\", vers = \"0.1\", uuid = \"2aae3bac-71d4-4cbf-9bc8-58951857c28a\", url = \"http://www.leptoquark.net/~elly/rust/\")]; #[comment = \"Rust ncurses bindings\"]; #[license = \"BSD\"]; mod ncurses = x; ``` ``` rt: 253a:main:main: upcall fail 'explicit failure', /home/ | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1029", "text": "baffling error: \"expected fn() -> native but found fn() -> native (types differ)\" | Test case at http://www.leptoquark.net/~elly/ncurses-question-t.tar produces the following output when compiled: ./ncurses.rs:33:37: 33:52 error: mismatched types: expected fn() -> native but found fn() -> native (types differ) ./ncurses.rs:33 fn keypad(v : int) { _native::keypad | labels: A-frontend", "label": "question", "label_id": 4}
{"id": "rust_1034", "text": "Binding a single-variant nullary tag does not work | ``` tag chan { chan_t; } fn wrapper3(i: chan) { log_err i; } fn main() { let wrapped = bind wrapper3(chan_t); wrapped(); } ``` ``` ==6782== Thread 5: ==6782== Use of uninitialised value of size 4 ==6782== at 0x6E9F24E: ??? (in /usr/lib32/libstdc++.so.6.0.14) ==6782== by 0x6E9F383", "label": "medium", "label_id": 2}
{"id": "rust_1035", "text": "Comparison of by-ref single-variant nullary tag does not work | ``` tag chan { chan_t; } fn wrapper3(i: chan) { log_err i; assert i == chan_t; } fn main() { wrapper3(chan_t); } ``` log displays a number that looks like garbage and the assert fails. Possibly the same issue as #1034", "label": "medium", "label_id": 2}
{"id": "rust_1037", "text": "Higher-order generic functions disobey kind system | ``` fn spawn2<@T>(x: T, f: fn(T)) { f(x); } fn main() { fn foo<~T>(x: T) { log_err x; } spawn2::<@int>(@10, foo); } ``` spawn2 is passing a shared kind to a function that only takes unique kinds. | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1038", "text": "Problem with generics and bare functions | ``` fn main() { fn# foo() { } // This wants to build a closure over type int, // but there's no way to do that while still being a bare function let f: fn#() = foo::; } ``` As a result we can't do bare-fn spawn for generic functions, which is pretty important: ``` #[test]", "label": "medium", "label_id": 2}
{"id": "rust_1042", "text": "Add math module to stdlib | We should get some common math implementations put together. First stop: move the definitions of min and max out of comp/util/common.rs and into the new module, and fix them to be templated on @T instead of T. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1043", "text": "Line numbers in stack traces | We get function names currently but not line numbers. | labels: A-debuginfo, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1046", "text": "Alt matching on float literals is broken | The compiler tries to use floats as the cases in an LLVM switch, which does not work.", "label": "medium", "label_id": 2}
{"id": "rust_1048", "text": "Non-boxed recursive tag constructor fails to compile with \"Out of stack space\" | If you try to compile `tag list { nil; cons(int, list); }` (note \"list\" instead of \"@list\" in the recursive constructor), then the compiler crashes with `rt: e2b5:0x00000000: Out of stack space, sorry`. It would be nice to detect this condition and provide a more useful err", "label": "medium", "label_id": 2}
{"id": "rust_1049", "text": "Allow tests to be ignored conditionally | Right now we can ignore a test like ``` #[test] #[ignore] fn test() { /* do something */ } ``` But to ignore it only on windows you've got to do ``` #[test] #[cfg(target_os = \"win32\")] #[ignore] fn test() { /* do nothing */ } #[test] #[cfg(target_os = \"macos\")] #[cfg(target_os =  | labels: A-frontend, E-easy, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1050", "text": "$PATH for running compiletest.exe is not correct on windows | This is the command being used to run compiletest.exe for stage1: ``` PATH=\"/usr/local/bin:$PATH:stage1/lib/rustc/i686-pc-mingw32/lib\" stage1/bin/comp iletest.exe --compile-lib-path stage1/lib --run-lib-path stage1/lib/rustc/i686-p c-mingw32/lib --rustc-path stage1/bin/rustc.exe  | labels: A-testsuite, O-windows", "label": "medium", "label_id": 2}
{"id": "rust_1052", "text": "Rewrite spawn again | Spawn is currently a safe wrapper around the old unsafe spawn that transfers a closure into the spawned task. Needs to be cleaned up to remove the hack that migrates the closure environment between tasks. | labels: A-runtime, E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1053", "text": "Make a decision about fn@/lambda and fn&/block | We currently have a type called `fn@` which can optionally be constructed with the `lambda` keyword. We also have a type `block` which was originally intended to be sugar for type `fn&`. We have a lot of options: - remove lambda - remove `fn@` - make `lambda` also work as a synon | labels: C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1054", "text": "Support Ruby-style block arguments | ``` uint::range(0, 10) {|x| ... }; mymap.each {|key, val| ...}; ``` A block (`{` followed by `|` or `||`) appearing after an expression is (with the same precedence as `x.y`, `x[y]`, `x()`, etc) treated as a block value passed to a function. If the expression was a call, the bloc", "label": "question", "label_id": 4}
{"id": "rust_1055", "text": "alias analysis does not recognize mutable object fields as unsafe roots | It is possible to cause corruption by passing a value rooted in a mutable object field to a closure that goes through the object to mutate that field. Object fields should not be treated like regular local variables—they have bigger scope.", "label": "medium", "label_id": 2}
{"id": "rust_1056", "text": "Get rid of iterators | We're going to use functions that take blocks instead. This'll reduce compiler and syntax complexity without losing any power.", "label": "medium", "label_id": 2}
{"id": "rust_1057", "text": "compiletest test runner doesn't always catch all of stdout | Sometimes lines get cut off, which can lead to quite a lot of confusion | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1058", "text": "fns using c-stack-cdecl native ABI cannot be used as values | this test (src/test/run-pass/c-stack-as-value.rs) yields a LLVM compilation error: ``` rust // xfail-test native \"c-stack-cdecl\" mod rustrt { fn unsupervise(); } fn main() { let _foo = rustrt::unsupervise; } ```", "label": "medium", "label_id": 2}
{"id": "rust_1059", "text": "fns using c-stack-cdecl native ABI cannot be called from outside crate | Calling a native function declared with \"c-stack-cdecl\" ABI from outside the create fails in LLVM. The type of the function includes the implicit parameters when it should not. The path through the code is: The code path is that when we look up the external identifier we go throu", "label": "medium", "label_id": 2}
{"id": "rust_1060", "text": "Change the bare fn calling convention and representation | Bare functions are supposed to not take an environment pointer and be represented as just a pointer.", "label": "medium", "label_id": 2}
{"id": "rust_1062", "text": "Cycle collector doesn't collect unique pointers | If you put a unique pointer into a cycle it will probably leak. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1063", "text": "Cycle collector doesn't run resource destructors | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1067", "text": "Change the syntax for type parameter kinds | [This was the relevant e-mail I sent to rust-dev. No one objected, several people agreed.] At least two people have confused @T with a boxed type in the past weeks. Even me, who really should know better at this point, occasionally misinterpret some code because of the similarity", "label": "question", "label_id": 4}
{"id": "rust_1070", "text": "Make LLVM a git submodule | We may soon end up carrying an LLVM patch for an indeterminate period of time. For this and other reasons, it would be nice to automate the LLVM build process. This will require a lot of changes to our automation.", "label": "medium", "label_id": 2}
{"id": "rust_1071", "text": "Allow referencing non-function symbols in native modules | For example, libncurses relies heavily on a global pointer called stdscr, which has to be passed to many functions (e.g. keypad(3)). In general, it should be possible to extract non-functions from C libraries. | labels: A-linkage, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1072", "text": "Allow items at the crate top level and in 'directory' modules | Currently, nothing lives in the top level of std, and directory modules like rustc::syntax can't contain code. We want especially for the standard library to define things like std::option::t as std::option. This is one way to achieve that goal. We add a convention that a .rs fil | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1074", "text": "Install man pages as part of make install | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1076", "text": "Warn when specifying a kind bound that's too narrow | Having unqualified type parameters be shared is convenient, as shared is usually what you want, but error-prone, since you're likely to specify a kind that's narrower than the most general kind that the function could take. To help with this, we'll allow shared-kind parameters to", "label": "medium", "label_id": 2}
{"id": "rust_1077", "text": "Write rustdoc | We probably want our own system to extract documentation from source code. Graydon has mentioned in the past an interest in using syntax extension for this, but a javadoc analogue seems fine. The two general-purpose systems I've looked into, doxygen and naturaldocs, both have sig", "label": "low", "label_id": 3}
{"id": "rust_1078", "text": "Move task notification out of the runtime | To enable joining with tasks, they have a 'notification' feature where the task will send a message when it exits, regardless of success or failure. This currently involves a lot of work in the runtime, but with unwinding can all be done in Rust. Depends on #908. | labels: A-runtime, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1079", "text": "Add operator 'as' (type cast) to documentation | The \"<value> as <type>\" operator for coercion does not appear in the Rust documentation.", "label": "medium", "label_id": 2}
{"id": "rust_1083", "text": "(NaN == x) and (NaN < x) and (x < NaN) are true for all x:float | NaN should not be less than, equal to, or greater than any number. But in Rust, `float::NaN < 0.0` evaluates to `true`. In fact, all of the following assertions pass: 
 assert(float::NaN() == float::infinity()); assert(float::NaN() == float::neg_infinity()); assert(float::NaN", "label": "medium", "label_id": 2}
{"id": "rust_1084", "text": "Floating point comparisons in Rust do not follow IEEE 754 | For example, (NaN == NaN) is true in Rust but false in IEEE 754. As explained in #1083, this is intentional and the goal is to make `==` and `<` act consistently so that NaN can be used as a key in ordered collections, for example. One downside of this is that programmers cannot ", "label": "medium", "label_id": 2}
{"id": "rust_1085", "text": "Add 'argument mode adapter' functions to std | So we have a bunch of higher order functions, that usually take functions with generic, by ref parameters; then we have a bunch of standard utility functions in std::int etc that take their arguments by value. Both those are the correct decisions individually, but they can't be c | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1086", "text": "Rename list's \"car\"/\"cdr\" to \"head\"/\"tail\" | I think the meaning of \"head\" and \"tail\" would be easier to guess and remember. Also recent languages such as Haskell (\"head\", \"tail\"), OCaml (\"hd\", \"tl\") and F# (\"Head\", \"Tail\") tend to prefer those more literal names. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1087", "text": "Rename log_err to print | log_err is the most common way to get console output, and is usually used in a way that doesn't reflect it's name. For convenience and to make a better impression for 0.1 we should just rename it to 'print'. | labels: A-frontend, E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1088", "text": "Clean up logging output | Logging output is pretty messy right now, with some mostly useless hex numbers and lots of extra space. Since it's probably the first things new users will see we should make sure it looks nice. | labels: A-runtime, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1089", "text": "float::from_str returns 0 for one space, and NaN for multiple spaces | `float::from_str(\" \")` (the input is a string of two space characters) returns NaN in Rust. It should return 0.0. `float::from_str(\" \")` (with just one space character) returns 0.0. There is a test in stdtest/float.rs that should have caught this bug, but it is falsely passing be | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1091", "text": "Document RUST_LOG | Put it in both the FAQ and the language documentation", "label": "medium", "label_id": 2}
{"id": "rust_1094", "text": "Simplify attribute parsing | There may be enough lookahead in the parser to simplify attribute parsing, which is quite intricate. | labels: A-frontend, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1096", "text": "Libcore and libstd split, with linking to core by default. | It would be nice for developer ergonomics (not to mention marketing) to include a `std::pervasives` that's imported by default. Obvious things to go in there are print and option. We'll need to have `rustc` figure out where the stdlib is and add a `--nostdlib` option for bootstra | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1097", "text": "Add 'companion mods' to the language docs", "label": "low", "label_id": 3}
{"id": "rust_1098", "text": "Add pattern guards to the language docs", "label": "low", "label_id": 3}
{"id": "rust_1100", "text": "Better documentation for building on Windows | I'd love to contribute, but I find that the docs on building (particularly for Windows) is lacking. - It doesn't say whether to use MSYS or Cygwin - Cygwin doesn't seem to be supported (is there any reason for this?)", "label": "question", "label_id": 4}
{"id": "rust_1101", "text": "Document resource types | Implemented in #411. Currently they are mentioned briefly in the documentation but not described. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1102", "text": "int::from_str(\"-1\") == -253 and other bugs | int::from_str returns bad results for strings that start with \"-\" signs, because it adjust its character position in the wrong direction. Examples: ``` assert(int::from_str(\"-1\") == -253); assert(int::from_str(\"-3\") == -253); assert(int::from_str(\"-10\") == -2531); assert(int::fro", "label": "medium", "label_id": 2}
{"id": "rust_1104", "text": "Two io tests fail when running as root | io::buffered_file_buf_writer_bad_name io::file_buf_writer_bad_name They rely on not being able to open a file called \"/?\" which is a perfectly valid file in a directory usually owned by root. | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1105", "text": "List: make head/tail's expectation of a non-empty list visible in the type system | Currently list::head/tail call \"fail\" when the list is empty. Haskell's head/tail do the same and it causes a lot of grief: http://www.reddit.com/r/haskell/comments/lf71l/deprecate_preludehead_and_partial_functions/ I suggest to either a) make the return type an \"option\" b) add a", "label": "medium", "label_id": 2}
{"id": "rust_1107", "text": "Document pattern ranges | I don't believe they're document anywhere. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1109", "text": "Is there a way to specify crate attributes in a single .rs file? | If so, I couldn't find it. Just putting a `#[link(...)]` in it didn't help. What I'm trying to do is compile a `.rs` file with `--lib`. I think there's no reason to not support that. But having the compiler complain about missing crate link meta attributes makes it kind of awkwar", "label": "question", "label_id": 4}
{"id": "rust_1110", "text": "Make type annotation for consts optional | In `const x: int = 10;` the compiler can figure out that `x` is an `int` perfectly well on its own.", "label": "medium", "label_id": 2}
{"id": "rust_1111", "text": "Add sort to stdlib | It's nice to have. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1112", "text": "Record field is corrupted when passing from fn(x) to fn(x) | The following program fails: ``` type x = { a: T, b: bool, c: bool }; fn main() { let x: x = { a: 3, b: false, c: true }; foo(x); } fn foo(x: x) { assert x.c; // passes bar(x) } fn bar(x: x) { assert x.c; // fails } ``` This is a minimal test case based on a fa", "label": "medium", "label_id": 2}
{"id": "rust_1114", "text": "mod std can't import option::t as option then re-export it | I've just tried this in std: ``` import option = option::t; export option; ``` and it gets this error ``` ../src/lib/std.rs:2:0: 2:25 error: unresolved modulename: option ../src/lib/std.rs:2 import option = option::t; ``` There's a workaround, but I think this is probably the pat", "label": "medium", "label_id": 2}
{"id": "rust_1115", "text": "Re-exports do not work across crates | If I add std.rs with these contents ``` import option = hack::option; export option; mod hack { import option = option::t; export option; } ``` I can't access the std::option type from outside the crate.", "label": "medium", "label_id": 2}
{"id": "rust_1116", "text": "Is there any reason to allow 'import name;' | Where `name` is a single identifier without module path. If the import can see it, it was already visible, so importing doesn't help. Thus, we can simply ignore such directives. Or we can disallow them for being bogus. Thoughts?", "label": "medium", "label_id": 2}
{"id": "rust_1117", "text": "Tutorial unclear regarding backslash preceeding newlines in string literals | In syntax.md, the setence \"When a newline is preceded by a backslash, it, and all white space following it, will not appear in the resulting string literal.\" is not clear to me at all. Could an example be provided?", "label": "medium", "label_id": 2}
{"id": "rust_1118", "text": "Make function arguments immutable again | Currently, when you assign to an argument, the compiler magically inserts a local value that's a copy of the argument (which is still owned by the caller). This is probably too magical, and should be removed.", "label": "medium", "label_id": 2}
{"id": "rust_1119", "text": "Tutorial unclear regarding attributes/annotations | In syntax.md under the Attributes heading: The part \"or a name followed by a comma-separated list of nested attributes, as in the cfg example above.\" Well, the cfg example doesn't have any commas in it, so I'm left confused as to what that looks like.", "label": "medium", "label_id": 2}
{"id": "rust_1120", "text": "Implement a Rust REPL | REPLs are great. | labels: A-runtime, E-hard", "label": "medium", "label_id": 2}
{"id": "rust_1122", "text": "Make configure script accept --prefix | Right now you have to use CFG_PREFIX to set the install location | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1126", "text": "#[test] items are not being configured out in a non-test build | They probably should. They could refer to things configured with #[cfg(test)], and will cause resolve errors when those are configured out. | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1127", "text": "More informative error messages when using #[test] or #fmt without std | Currently, you'll get an unexplained ``` error: unresolved modulename: std ``` Which is bound to confuse people. | labels: A-frontend, A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1128", "text": "Task system is embarrassingly unexpressive | The primitives provided in `task` and `comm` are _very_ primitive. Too primitive to write a tutorial chapter about without sounding completely lame. So I tried to write a helper function which helps create a channel back from a child task to its parent. None of the existing tests", "label": "medium", "label_id": 2}
{"id": "rust_1130", "text": "Rust needs ropes | (entering this issue in the system in the hope that nobody else will start working on ropes in the meantime) Ropes are good for concatenation-heavy computing, such as is often the case for I/O. I'm working on a patch atm.", "label": "medium", "label_id": 2}
{"id": "rust_1134", "text": "rust.pdf fails to build when src directory is absolute | When configuring the build with an absolute source directory, and tex and texi2pdf are installed, this error happens: ``` version-stamp: doc/version.texi makeinfo: doc/rust.html texi2pdf: doc/rust.pdf egrep: Invalid range end /usr/bin/texi2dvi: cannot read .//home/banderson/Dev/r", "label": "medium", "label_id": 2}
{"id": "rust_1135", "text": "crash: recursive tag with vector -> out of stack space, sorry | The following code crashes rustc with either an \"out of stack space\" message or a segmentation fault: tag x { y([x]); } Distressingly, attaching gdb to rustc during this event causes gdb itself to dump core if rustc segfaults (!!). Full stack from the \"out of stack space, sorry\" ", "label": "medium", "label_id": 2}
{"id": "rust_1137", "text": "\"missing crate link meta 'name'\" warning seems to be saying the wrong thing | I see this warning ``` missing crate link meta 'name', using 'libhello.so' as default ``` 'libhello.so' is not the default value for name, 'hello' is. Should investigate what is really going on here. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1138", "text": "Remove --check-unsafe flag | I believe this is no longer needed. We should always be checking unsafe. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1139", "text": "Remove --no-typestate flag | Typestate is stable now. I don't think anybody ever uses this, nor should they. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1143", "text": "Make the code in the tutorial runnable somehow | It's going to be constantly out of date otherwise. With some magic annotations, it should be possible for a script to pull out the code, wrap it in suitable files, and try to run it.", "label": "medium", "label_id": 2}
{"id": "rust_1144", "text": "Alias checker seems to get confused by lib/rope.rs | At least, the warnings about copying it emits don't seem to make much sense.", "label": "medium", "label_id": 2}
{"id": "rust_1151", "text": "Something about make perf is broken | rustbot isn't showing the graphs and the linux bots show some errors. Probably happened during the LLVM changes.", "label": "medium", "label_id": 2}
{"id": "rust_1152", "text": "Make libuv a git submodule | Now that we have an LLVM git submodule and have some experience building libuv, I think the path is clear to turn libuv into a submodule. For this conversion I'd like to pull the libuv source out of the runtime directory, and put it in src/libuv. We'll probably have to include gy", "label": "medium", "label_id": 2}
{"id": "rust_1153", "text": "crash: \"Ptr must be a pointer to Val type!\" | The following program crashes rustc with an assert failure inside llvm: http://www.leptoquark.net/~elly/rustdoc-valtype.rs. #0 0xf7fdd430 in __kernel_vsyscall () No symbol table info available. #1 0xf6d17c4f in __GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 ``` ", "label": "medium", "label_id": 2}
{"id": "rust_1155", "text": "Basic 'Hello World' Port/Channel example causes abort/memory leak | I tried to run the example code from the top of lib/comm.rs (here, for your convenience: http://pastebin.com/kwhhMK3Z) Output of rustc --version: rustc prerelease (06d14f3 2011-11-07 15:46:00 -0800) host: i686-unknown-linux-gnu OS: Ubuntu 11.10, amd64 Error Message: rust: fatal,  | labels: A-runtime, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1156", "text": "Friendly error when submodules not expanded | When a user tries to configure or make without submodules expanded, we should issue a friendly / intuitive error and stop, rather than trying to proceed. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1157", "text": "Implement versioned library naming and rename libruststd back to libstd | In 16dad84f7b2f173db012dda2e77b08ccb423391f we made the crate search based purely on metadata, so that we could rename libstd to libruststd. As graydon pointed out, we are supposed to name our libraries `lib[name]-[hash]-[version].so`, so there's no way that libstd should cause a | labels: C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1158", "text": "Native \"c-stack-stdcall\" does not work", "label": "medium", "label_id": 2}
{"id": "rust_1159", "text": "Configure libuv in the configure script | Right now we're carrying pre-configured makefiles for libuv for every platform/arch combination. I think we have the ability now to do this as part of configure. We'll have to include gyp in our repo (or host a git mirror). | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1161", "text": "Native functions declared multiple times generate incorrect LLVM declarations | ``` native \"c-stack-cdecl\" mod rustrt1 = \"rustrt\" { fn pin_task(); } native \"c-stack-cdecl\" mod rustrt2 = \"rustrt\" { fn pin_task(); } fn main() { rustrt1::pin_task(); rustrt2::pin_task(); } ``` ``` error: linking with gcc failed with code 1 note: gcc arguments: -L/home/brian/Dev/ | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1162", "text": "Potential Typechecker issue when storing lambda in variable | The title may be misleading/incorrect altogether, but here is a gist with the relevant source/output: https://gist.github.com/1350608 Looks like the template type (I'm sure there's a better/different name for them in rust, but you know what I mean) isn't getting stored in the typ", "label": "medium", "label_id": 2}
{"id": "rust_1163", "text": "c-stack-cdecl assumes arguments are passed on stack | In the x86_64 architecture (and others as well), the first few integer arguments are passed in registers rather than being pushed on the stack. Currently, `c-stack-cdecl` works by allocating some space on the C stack and then writing the arguments into that space. A small shim (`", "label": "low", "label_id": 3}
{"id": "rust_1165", "text": "Replace the constant functions in std with actual constants | I'm thinking the numeric constants in std::float, for example. Our constants should be usable now. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1166", "text": "bot.rust-lang.org misconfiguration results in 404s | 19:02 < elly> bot.rust-lang.org 404? 19:02 < brson> i see it 19:03 < elly> bot.rust-lang.org is serving me github's \"Page does not exist!\" page 19:03 < brson> ha! 19:04 < brson> I get that all the time at the office 19:04 < brson> and have to use the IP 19:04 < brson> bot.rust-la", "label": "medium", "label_id": 2}
{"id": "rust_1167", "text": "Native pointer vectors | # Native pointer vectors This bug is a _request for comment_. I am but a novice Rust developer, but I suspect that this would be a strong addition to the language. The exact mechanics were fleshed out further in this bug; read down for more on what actually was implemented. ## Mo | labels: A-FFI", "label": "question", "label_id": 4}
{"id": "rust_1170", "text": "Bogus \"unreachable pattern\" error with ranges | This rust program: [str-escape] ~/s/rust$ cat test.rs use std; import std::str; fn escape_char(c: char) -> str { alt c { '\"' { \"\\\"\" } '\\' { \"\\\\\" } '\\n' { \"\\n\" } '\\t' { \"\\t\" } '\\r' { \"\\r\" } '\\x00' to '\\x1f' { #fmt[\"\\x%02x\", c as uint] } v { str::from_char(c) } } } fails to compile | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1172", "text": "test/bench/task-perf-word-count is broken | This test doesn't actually do anything when not provided command-line parameters. It needs to be fixed to work again and then given default behavior. | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1173", "text": "Pointer addition results in compiler crash | The following sample code causes Rust to crash: ``` fn die() -> *int { (0 as *int) + (0 as *int) } fn main() { } ``` This crash has the signature: (gdb) run Starting program: /usr/local/bin/rustc die.rs Reading symbols for shared libraries ..+..................................... | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1174", "text": "bind'ing a native function behaves incorrectly | The following code is miscompiled on my OS X laptop: ``` use std; native \"cdecl\" mod libc = \"\" { fn printf(s: *u8, a: int); /* A tenuous definition, indeed. Herp, derp. */ } fn main() { let b = std::str::bytes(\"%d\\n\"); let b8 = unsafe { std::vec::unsafe::to_ptr(b) }; libc::printf", "label": "medium", "label_id": 2}
{"id": "rust_1175", "text": "unsafe::reinterpret_cast can cause valgrind errors | Sorry for the vague summary, but I've reduced this testcase about as far as I can. ``` rust import std::{str, option, unsafe}; use std; type metadata = {node: int, data: @T}; type compile_unit_md = {path: str}; type metadata_cache = [@debug_metadata]; tag debug_metadata { comp", "label": "medium", "label_id": 2}
{"id": "rust_1176", "text": "Toplevel macros | At the moment, it seems that macros can only be defined inside a function and for the scope of this function. Among other things, this prevents from writing crate-wide macros or exported macros, which basically makes macros unusable. For instance, src/test/run-pass/macros.rs cont | labels: A-frontend, C-enhancement, A-syntaxext", "label": "low", "label_id": 3}
{"id": "rust_1177", "text": "Revise the kind system | Discussion in https://mail.mozilla.org/pipermail/rust-dev/2011-November/000922.html . In short, copyability, instead of moveability, will be the defining characteristic of the middle kind. Kinds are now `noncopyable` :> `copyable` :> `sendable`.", "label": "question", "label_id": 4}
{"id": "rust_1179", "text": "Use wrappers for native functions | Generating wrappers for native functions would make them easier to use, and remove the calling convention from their type. Right now I believe there are a few things that are complicated by making these look different than rust functions (we can't use them across crates for one).", "label": "question", "label_id": 4}
{"id": "rust_1181", "text": "#cfg conditional compilation does not work in object expressions | Likely, this also holds for non toplevel functions. It is inconvenient and probably should be fixed. Example from io.rs: obj FILE_writer(f: os::libc::FILE, res: option::t@FILE_res) { #cfg[target=\"macos\"] fn fsync() { ret macos_os::fsync(f); } } will not compile. | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1182", "text": "Two intrinsics call C functions on the Rust stack | rust_intrinsic_recv and rust_intrinsic_task_sleep both call functions in rustrt, which means they are calling functions on the Rust stack without doing the stack check. rust_intrinsic_recv can be rewritten as a regular builtin, and rust_intrinsic_task_sleep needs to do everything | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1184", "text": "Resource flag is larger than necessary | Currently resources have a flag of size \"int\", meaning 32 or 64 bits. This is pretty large for a 1-bit flag. Ideally, it would be a single bit and then allow the alignment code to ensure that the contents of the resource are properly aligned. After the port to x86_64 is running s | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1185", "text": "Predicate failure during translation of call to native returning generic type | ``` native mod m { fn cast() -> T; } type t = { t: T }; fn main() { let i: t = m::cast(); } ``` ``` rust: upcall fail 'Predicate type_has_static_size(ccx, ret_ty) failed', ../src/comp/middle/trans.rs:3851 rust: domain main @0x9745e38 root task failed ``` | labels: I-crash, A-codegen", "label": "high", "label_id": 1}
{"id": "rust_1186", "text": "lock_held_by_current_thread is probably not threadsafe | helgrind is suspicious of this function and I very infrequently see assertion failures involving it on codepaths that don't look like they could be failing. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1187", "text": "Error when forgetting a :: when specializing a generic is confusing | If there's no way to fix this, so be it, but it would be nice to have a heuristic that could help the user figure out what's going on. ``` ../src/comp/middle/debuginfo.rs:61:44: 61:52 error: unresolved name: ValueRef ../src/comp/middle/debuginfo.rs:61 unsafe::reinterpret_cast(std | labels: A-frontend, A-resolve", "label": "medium", "label_id": 2}
{"id": "rust_1188", "text": "Actually implement block scope safety checks | I described a way to do this in https://mail.mozilla.org/pipermail/rust-dev/2011-November/000922.html . Should be done soon, before people start accidentally writing unsafe block code.", "label": "medium", "label_id": 2}
{"id": "rust_1189", "text": "Implement the task tree and task killing using messages | Right now killing a task means setting a flag on it in the runtime and checking that flag before and after yielding. There is at least one race condition that could result in the task not being killed and never waking up. Seems like we should be able to maintain the relationships | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1190", "text": "Consolidate rt's three definitions of rust_fn | The runtime defines rust_fn in three places. This isn't necessary. | labels: A-runtime, E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1192", "text": "Optimize native wrappers | As of @b6af844, we generate Rust wrappers for native functions. These allow for easy interop with Rust code but introduce some performance inefficiencies. This could be improved in two ways: 1. Inline the calls to the wrapper functions. Ideally, this would be done at the LLVM lev | labels: I-slow, A-codegen", "label": "low", "label_id": 3}
{"id": "rust_1193", "text": "Prohibit in-scope consts from use as variable names in binders, like nullary tags | The following minimal example fails with \"unreachable pattern\" ``` rust mod foo { type t = u8; const a = 0u8; const b = 1u8; fn bar(v: t) -> bool { alt v { a { ret true; } b { ret false; } } } } ``` | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1194", "text": "Implicit return of last expression doesn't work | According to the tutorial, `fn foo()->int { 7 }` should be equivalent to `fn foo()->int { ret 7; }`. However, rustc right now rejects such function definitions.", "label": "medium", "label_id": 2}
{"id": "rust_1195", "text": "Add a note on incorrect trailing semicolon | Putting a trailing semi on statements that should be expressions is a common error: ``` ret if x { true; } else { false; }; ``` It shouldn't be too difficult to look at the types here and offer a suggestion of what the problem might be | labels: E-easy, A-type-system, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1196", "text": "configure should fail if subcommands fail | In particular, calls to git or to llvm's configure script | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1198", "text": "Write a pygments lexer so that we get syntax highlighting on github | Thought we should have an issue for that, to be done once the syntax has finally settled | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1200", "text": "The empty record type can be declared but not instantiated | This works: ``` type t = { }; ``` This doesn't ``` let t = { }; ``` | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1203", "text": "std: implement pow, floor, ceil | These are not in libc so the question is wether std should link against libmath or how to get them otherwise", "label": "question", "label_id": 4}
{"id": "rust_1204", "text": "Stop walking all of AST on every pass | Most passes aren't interested in, for example, types, yet the default visitor runs through all type nodes on every walk anyway. We could provide several variants of `default_visitor()`, which descend into different subsets of the AST, and make sure each pass uses the right varian", "label": "medium", "label_id": 2}
{"id": "rust_1208", "text": "Inner attributes must before any item | Compile the following code failed: ``` mod foo { #[attr]; fn test() {} #[attr1]; } fn main() {} ``` ``` c inner.rs:4:10: 4:11 error: expected item but found ; inner.rs:4 #[attr1]; ``` | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1209", "text": "ty::type_needs_drop is inaccurate | It doesn't understand that a resource inside some other type needs to be dropped.", "label": "medium", "label_id": 2}
{"id": "rust_1210", "text": "Unsafe blocks make their contents pure? | This came from a pull request recently: ``` pure fn ln(n: float) -> float { unsafe { libc::ln(n) } } ``` I would expect that 'unsafe' block to be an 'unchecked' block.", "label": "medium", "label_id": 2}
{"id": "rust_1211", "text": "Remove auth directives | The syntax is implemented but they don't do anything. Remove the two references from the language docs. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1212", "text": "Language ref sales pitch says that C functions are unsafe | This is not currently true. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1213", "text": "rustc crash: \"option none\" at src/lib/option.rs | When compiling this file: // cargo.rs - Rust package manager use rustc; use std; import rustc::syntax::{ast, codemap, visit}; import rustc::syntax::parse::parser; import std::io; import std::option; import std::option::{none, some}; import std::run; import std::str; import std::t", "label": "medium", "label_id": 2}
{"id": "rust_1215", "text": "foo(...)->f as b should be tail callable if both are aliases of the same type | Imagine a tail call `{ be foo() as int }` where `foo()` returns an `i32` and on the current arch it is known that integers are 32 bit wide. In this case, it should be ok to drop the cast and tail-call `foo()`. The idea for this came up when rewriting `std::math`, cf https://githu", "label": "medium", "label_id": 2}
{"id": "rust_1216", "text": "Keyword table in the manual uses a bizarre, change-hostile format | See https://github.com/graydon/rust/blob/master/doc/rust.texi#L618 . The table is sorted column-first, and written row-first. Unless there is some tool to reorganize these that I don't know about, changing this table seems to involve manually re-sorting the whole thing, manually ", "label": "medium", "label_id": 2}
{"id": "rust_1218", "text": "Cannot build on Fedora: wrong CPUTYPE? | make fails like this: ``` compile: rt/i686-unknown-linux-gnu/sync/timer.o In file included from /usr/include/features.h:387:0, from /usr/include/stdlib.h:25, from ../src/rt/sync/../globals.h:11, from ../src/rt/sync/timer.cpp:1: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stub", "label": "medium", "label_id": 2}
{"id": "rust_1220", "text": "Wiki \"Development policy\": Clarify sentence | What is \"ask if you want to be contributing quickly and regularly this way.\" meant to read? a) \"ask if you can contribute\" b) \"tell that you want to contribute\"", "label": "medium", "label_id": 2}
{"id": "rust_1222", "text": "Some floating point math functions produce different results on windows | Mostly dealing with NaN and infinity. See stdtest/math.rs. Some of the tests are commented out because they produce different results on windows. Since they are just wrappers around the C functions it's not clear whether we should tolerate the differences or try to be consistent. | labels: P-medium", "label": "medium", "label_id": 2}
{"id": "rust_1224", "text": "Standard library documentation is outdated | See for example: http://www.rust-lang.org/doc/std/files/list-rs.html The functions \"car\" and \"cdr\" were renamed to \"head\" and \"tail\" some time ago. I suggest the following: 1) add a update time-stamp or a version number to the created files 2) update the documentation regularily", "label": "medium", "label_id": 2}
{"id": "rust_1225", "text": "Build continually runs make on LLVM | After doing work on LLVM, the build dependencies get confused and everytime Rust's make is run, it also runs make on LLVM, even when there's nothing to do. This is probably because our rules for building LLVM are not very exact - we use llvm-config as our target, which is just a ", "label": "medium", "label_id": 2}
{"id": "rust_1226", "text": "Add support for no_split_stack attribute to LLVM. Use it on main | Currently our __morestack method has to do an ugly check to detect whether it is being called from main. gcc supports a no_split_stack attribute that can be used to suppress the split-stack prologue. We should add it to LLVM and use it. | labels: A-LLVM, I-slow", "label": "question", "label_id": 4}
{"id": "rust_1227", "text": "Typeclass/interface implementation | This is a stub bug, tracking @marijnh's efforts in implementing typeclasses. Created so that I could link to it from another bug. More detail: https://mail.mozilla.org/pipermail/rust-dev/2011-November/001010.html", "label": "medium", "label_id": 2}
{"id": "rust_1228", "text": "Compile error with ambiguous shortcut import resolving | ``` java mod foo { mod bar { mod foo { fn i() {} } } mod baz { fn x() { } } } fn main() { import foo::baz; import foo::bar::foo; } ``` ``` python imp.rs:14:4: 14:19 error: unresolved import: baz imp.rs:14 import foo::baz; ^~~~~~~~~~~~~~~ error: aborting due to previous errors rus", "label": "medium", "label_id": 2}
{"id": "rust_1229", "text": "OS X Lion's uname -m does not lie | The rust configure script does the following check to detect x86_64: ``` sh CFG_OSTYPE=$(uname -s) CFG_CPUTYPE=$(uname -m) if [ $CFG_OSTYPE = Darwin -a $CFG_CPUTYPE = i386 ] then if sysctl hw.optional.x86_64 | grep ': 1' ... ``` This makes the assumption that OS X is lying about ", "label": "medium", "label_id": 2}
{"id": "rust_1230", "text": "linux/mac bots fail on 64-bit run-pass/bind-native-printf | http://67.23.44.229/logs/2011/10/30/2011-11-30T19:28:06Z-b5dfb73e-bf33-45bf-bfd2-4da8cce1d4c3.html | labels: E-easy, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1231", "text": "make -j8 on the build bots | I think they can be more parallel than they are now", "label": "medium", "label_id": 2}
{"id": "rust_1232", "text": "Turn off the tinderbox scripts | they are pretty unmaintained at this point and just taking up precious cycles | labels: C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1233", "text": "Bots not collecting perf data | With the recent build changes it looks like the bots no longer know how to find the perf data: `````` perf compile: rustc-perf find: `test/perf': No such file or directory Performance counter stats for 'i686-unknown-linux-gnu/stage2/bin/rustc -O --target=i686-unknown-linux-gnu -o", "label": "medium", "label_id": 2}
{"id": "rust_1234", "text": "rust-mac1 bot has issues | Currently down. Has been down twice in the last two months. Not sure what's going on.", "label": "medium", "label_id": 2}
{"id": "rust_1236", "text": "rustc: 'option none' at src/lib/option.rs:34 | The following code crashes rustc @ b4c53627b17024a51b60243f6d27cd1d3a9a9724 (2011-11-30): ``` use rustc; import rustc::syntax::codemap; import rustc::syntax::parse::parser; fn load_pkg(filename: str) { let sess = @{cm: codemap::new_codemap(), mutable next_id: 0}; let c = parser::", "label": "medium", "label_id": 2}
{"id": "rust_1237", "text": "64-bit windows build. | Currently the windows build is 32-bit only. This is mostly a matter of figuring out the right build environment and editing the Makefiles, though there may be some changes needed to the x86_64 assembly as the windows calling convention is not the same as the one used on Mac and l | labels: O-windows, P-medium", "label": "medium", "label_id": 2}
{"id": "rust_1238", "text": "RFC: (export foo::*) re-export all contents of module | I would like to request a simple addition to the export syntax, which reexports everything in a module from the current module. For example, you might be in a file foo.rs, and want to define some types and export some native functions. You might do: ``` rust use std; export a, b; | labels: A-frontend, E-easy, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1239", "text": "Build doesn't work when target-triples does not contain host triple | On x86_64 linux, configure --target-triples=i686-unknown-linux-gnu, results in a build that quickly fails. Most of our build rules are generated from the target triples. Configuring like this will be useful for 32-bit debugging. Maybe we can a) add a --host-triple flag, and b) ad", "label": "medium", "label_id": 2}
{"id": "rust_1240", "text": "Review and update wiki FAQ pages for 0.1 release | These are prominent documentation and haven't received a lot of attention lately. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1241", "text": "Split Module Definitions | Within the same _file and module_, modules should be able to be split up and combined at compile-time. This would allow putting non-native functions in a native module, in turn allowing convenient use of opaque forms. For example: ``` rust mod objc { // Opaque type for objc objec | labels: A-frontend, E-easy, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1242", "text": "#[cfg_attr] | # [cfg_attr] is a theoretical tag for conditional use of an attribute based on target. For example: ``` rust #[cfg_attr(target_os=\"macos\", foo, bar(a, b), ...)] #[cfg_attr(target_os=\"linux\", baz(c, d), qux, ...)] ``` On OS X this expands to ``` rust #[foo] #[bar(a,b)] ``` On Linu | labels: A-frontend, C-enhancement, A-attributes", "label": "low", "label_id": 3}
{"id": "rust_1243", "text": "Last-use analysis does not handle blocks correctly | in a call like `f({|| foo(x);}, x)`, it will improperly mark the second `x` as a last use. The block will still use it when called from `f`.", "label": "medium", "label_id": 2}
{"id": "rust_1244", "text": "Test run-pass/send-iloop fails occasionally | http://67.23.44.229/logs/2011/11/01/2011-12-01T18:42:26Z-0ed1dd1a-6518-4768-8f7b-96b0fc803d08.html | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1245", "text": "Rust crashes when port queues are full | We crash when the port queue is filled: http://67.23.44.229/logs/2011/11/01/2011-12-01T18:42:26Z-0ed1dd1a-6518-4768-8f7b-96b0fc803d08.html | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1246", "text": "Typechecking is twice as slow on x86_64 | This accounts for the performance drop since x86_64 landed. nmatsakis has been investigating.", "label": "medium", "label_id": 2}
{"id": "rust_1251", "text": "Compiling to an output file with the same name as a native function hits LLVM assert | Compile the following with `rustc unsupervise.rs -o unsupervise` ``` native mod rustrt { fn unsupervise(); } fn main() { } ``` ``` rustc: /home/brian/Dev/rust/src/llvm/lib/MC/MCAssembler.cpp:132: uint64_t llvm::MCAsmLayout::getSymbolOffset(const llvm::MCSymbolData*) const: Assert | labels: A-LLVM, O-linux", "label": "medium", "label_id": 2}
{"id": "rust_1252", "text": "Compiler should take more care about literal representation | Literals should probably be represented in high-precision, with literal arithmetic evaluated outside of LLVM, and only the result used as an LLVM constant. Currently `lit_int` is represented by an `int`, making `-2147483648` (or the 64-bit equivalent) lossy. The machine ints are ", "label": "medium", "label_id": 2}
{"id": "rust_1253", "text": "fsync not implemented on windows | std contains an fsync function but the windows implementation is just fail. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1254", "text": "Merge stdtest with std | Tests for the standard library are part of their own crate, out of a vague notion that it would improve turnaround during development. I don't think it has really turned out to be true, and putting tests next to code is really the model we're promoting, so let's just merge the tw | labels: E-easy, C-cleanup, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1255", "text": "Implement more communication primitives | We are lacking at least one critical primitive: - `recv` on `port` with timeout that returns an `option` It may be desirable to `recv` from multiple ports at once, which may need - `recv` on `[port]` that returns `(uint, T)` - `recv` on `[port]` with timeout that retu | labels: A-runtime, C-enhancement, A-concurrency", "label": "low", "label_id": 3}
{"id": "rust_1256", "text": "str::bytes documentation should mention that the returned vec is not null-terminated | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1257", "text": "Leak with do loops | ``` fn main () { let line = \"\"; let i = 0; do { line = if i == 3 { \"exit\" } else { \"notexit\" }; i += 1; } while line != \"exit\"; } ``` This leaks the string.", "label": "medium", "label_id": 2}
{"id": "rust_1259", "text": "Typestate doesn't track initialization through closures | ``` rust fn foo(bl: block(int)) { let val = 5; bl(val); } fn main() { let val; foo({|new_val| val = new_val;}); log_err val; } ``` yields this error: ``` /Users/jdm/src/closure.rs:8:8: 8:34 error: Unsatisfied precondition constraint (for example, init(val [/Users/jdm/src/closure.", "label": "medium", "label_id": 2}
{"id": "rust_1260", "text": "Give std::task::task_notification a shorter name | I hate typing it. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1261", "text": "bind allows data to be moved multiple times | This code crashes today ``` // 'x' can have any mode but & or && fn foo(-x: ~int) { } fn main() { let b = bind foo(~3); b(); b(); } ``` The error is that bind needs to \"re-copy\" the ~3 each time `b()` is invoked, but it doesn't. In other words, that bind code is equivalent to `le", "label": "medium", "label_id": 2}
{"id": "rust_1263", "text": "ASM debugging still stringify's AST nodes even when it is disabled | When `-S` is used, the compiler inserts inline assembly comments that tell us which assembly came from which Rust statements. This is disable when `-S` is not used. But the stringify still occurs. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1264", "text": "Mark a few bytes at the end of every stack VALGRIND_MAKE_MEM_NOACCESS | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1265", "text": "Variables used in `when` still considered unused | The following code gets an error about an unused variable `b`: ``` use std; fn foo(a: int, b: int) { alt a { _ when a == b { log_err \"hi\"; } _ { log_err \"ho\"; } } } fn main() { foo(1,1); foo(1,2); } ```", "label": "medium", "label_id": 2}
{"id": "rust_1266", "text": "Avoid checking control paths that will never be reached | When a loop will never terminate (ie. is conditioned on a value that is statically guaranteed to be true and the body contains no break statements), it would be nice not to throw errors about control paths following the loop that do not return a value. | labels: E-easy, C-enhancement, A-lints", "label": "low", "label_id": 3}
{"id": "rust_1267", "text": "scrutinize hash functions: << precedence often misused | I found that many hash functions in rustc follow this template: ``` ret foo << 16u + bar; ``` but by the order of precedence this yields `foo << (16u + bar)`, almost certainly not what was intended. This interacts quite poorly with our hash tables which prefer low-order bits to n", "label": "medium", "label_id": 2}
{"id": "rust_1269", "text": "Tag constructors should be considered pure | Right now, I can't construct an `option::some` from within a pure function without wrapping it in `unsafe`.", "label": "medium", "label_id": 2}
{"id": "rust_1270", "text": "objects with floats crash on windows | The following test case: ``` type T = {x: int, y: int}; fn main() { obj o(b: @T, f: float) { fn dump() { log_err (b, f); } } let b = @{x: 22, y: 23}; let i = o(b, 0.75); i.dump(); } ``` crashes and prints garbage, but seemingly only on windows. | labels: I-crash, O-windows", "label": "high", "label_id": 1}
{"id": "rust_1271", "text": "Tags should be represented using null ptrs where possible | A tag with one nullary variant and one variant that accepts only a pointer should be implemented using a null pointer at runtime. This would save space and be generally nifty. | labels: I-slow, C-enhancement, A-codegen", "label": "low", "label_id": 3}
{"id": "rust_1272", "text": "Allow constant expressions to refer to other constants | ``` const tag_a: uint = 12u; const first_free_tag: uint = tag_a + 1u; ``` This'll require some resolution pass that complains about dependencies. It'll make implementing #1193 viable. | labels: A-frontend, A-linkage", "label": "medium", "label_id": 2}
{"id": "rust_1273", "text": "add special syntax for mutable variable declarations | we just discussed this on irc and everybody on seemed to like this idea: ``` let x = 7 // declaration of immutable variable x mut y = 7 // declaration of mutable variable y ``` This ticket serves as a way to track this idea and potentially implement it. | labels: E-easy, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1274", "text": "Cut features out of our LLVM build | We are building some features that we don't need, like JIT. I'm sure trimming down the LLVM build would be appreciated. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1275", "text": "lambdas and blocks should both have optional type decls | Right now, lambdas must declare types for their arguments and blocks must _not_. But both are represented in more-or-less the same way and seem to go through a similar inference path in `typeck.rs`; I think we ought to make parameter types optional in both cases. Naturally, if th | labels: A-frontend, A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1276", "text": "Implement crate_type attribute | Tells the compiler that the default output type is either an executable or library. | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1277", "text": "Figure out a different way to allow crate-level and directory-level modules | The solution implemented in #1072 causes lots of confusion. Let's revert it and implement something else. | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1281", "text": "Clarify story on native functions | Right now, native functions have a distinct type from normal functions but there is no way to write it! The reason that the type is distinct used to be because the ABI for native functions was different. This caused a lot of bugs (#1059, #1058, #1174, #1179) so I implemented wrap | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1282", "text": "Pretty-print in place | The pp currently prints to stdout. We should support a mode wherein it does an in-memory pp, compares with the input, and writes back to the input file if there was a change. This is done by hand in our makefile now but if we want our users to use the pp we should make it as easy | labels: E-easy, A-pretty, A-driver", "label": "question", "label_id": 4}
{"id": "rust_1283", "text": "Unresolvable names in other modules fail hard | ``` rust import std::json; use std; fn foo() { } fn main() { foo(); } ``` yields ``` godot:build jdm$ x86_64-apple-darwin/stage2/bin/rustc ~/src/resolve_test.rs rust: upcall fail 'option none', ../src/libstd/option.rs:34 rust: domain main @0x10202fa00 root task faile | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1284", "text": "Implement complex numbers | Complex numbers in C are implemented by passing real and imaginary part as two consecutive, unpadded floating point values via the stack (i.e. as length-2 array). This is similar for returned complex values - which is the catch, as tuples in rust are defined to have the same alig | labels: C-enhancement", "label": "question", "label_id": 4}
{"id": "rust_1285", "text": "make on windows - mingw 20111118 fails | I am trying to build rust on mingw - windows. make gives me this error: make: **\\* No rule to make target `src/llvm/test/CodeGen/X86/fastcc-sret.ll/toy.cpp', needed by`/c/Users/salil.wadnerkar/rust/llvm/i686-pc-mingw32/Release+Asserts/bin/llvm-config'. Stop. The complete log is h | labels: O-windows", "label": "low", "label_id": 3}
{"id": "rust_1286", "text": "crash: Assertion cx.fcx.llobjfields.contains_key(did.node) failed at src/comp/middle/trans.rs:2914 | The following code crashes rustc f05eaa4a650132174a43113e7bf1bce293515428 (2011-12-09): ``` use std; import std::option; import std::ptr; import std::str; import std::vec; #[link_name = \"pcre\"] native mod _native { type _pcre; type _pcre_extra; fn pcre_exec(re: *_pcre, extra: *_p", "label": "medium", "label_id": 2}
{"id": "rust_1287", "text": "Tutorial: please clarify \"mutable vector\" | http://www.rust-lang.org/doc/tutorial/syntax.html reads **\"[mutable T] Mutable vector type\"**, which i find confusing. - I would read \"[mutable T]\" as \"a vector of mutable T\". - But maybe i am wrong and it is meant to read \"a mutable vector of T\". I'd be happy if someone could cl | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1289", "text": "getopts should use result::t | getopts::getopts returns it's own internally defined type result. Instead, it should be changed to use the result::t type to be more consistent. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1290", "text": "'make all' only builds stage 1 | It's not obvious from the makefile why this is", "label": "medium", "label_id": 2}
{"id": "rust_1291", "text": "build broken on os x | It appears to me that the build is broken on os x lion 10.7.2 (with xcode 4.1 (4B110)) ``` cd build ../configure <..> configure: configure: CFG_SRC_DIR := ../ configure: CFG_BUILD_DIR := /opt/rust/src/rust/build configure: CFG_OSTYPE := apple-darwin configure: CFG_CPUTYPE := x86_ | labels: O-macos", "label": "medium", "label_id": 2}
{"id": "rust_1295", "text": "Decouple #[link_name = \"\"] and #[link_args] | When link_name == \"\" we don't try to link the native library, which we primarily use to link to libc. As a side-effect this causes any link_args to not be emitted. These two things should not be coupled, since one might want to suppress the automatic -L argument to the linker whi | labels: E-easy, A-linkage", "label": "low", "label_id": 3}
{"id": "rust_1296", "text": "Make a new attribute for the #[link_name = \"\"] special case | # [link_name = \"\"] is used to tell rustc not to issue the -L linker flag. This is a special case of the link_name flag so let's replace it with its own attribute, like #[nolink]. | labels: E-easy, C-cleanup, A-linkage", "label": "low", "label_id": 3}
{"id": "rust_1297", "text": "Investigate a segmentation fault in link::link_binary | Commit 76f13c95a0d1b1f33805719ccde9600b000e4418 worked around a segmentation fault. Investigate the root cause. | labels: I-crash", "label": "high", "label_id": 1}
{"id": "rust_1298", "text": "Add testing supports tests those need multiple compile commands | For example, I need to test the re-export issue (#1115). Steps are: - compile a crate as library, which re-exports a function. - call that re-exported function from another crate. - verify compile-pass or run-pass, etc. This requires executing rustc twice, and we don't have this  | labels: A-testsuite", "label": "question", "label_id": 4}
{"id": "rust_1299", "text": "invalid format string causes leaked memory in rust main loop | The following program; use std; import std::io; fn main(arg : [str]) { std::io::println(#fmt(\"%r\", \"Goat\")); } fails to compile with the following internal error: herugrim::~/code/markov2 $ rustc markov.rs markov.rs:6:26: 6:30 error: unknown type in conversion: r markov.rs:6 std: | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1300", "text": "Link with ld instead of gcc | It seems silly to have this runtime dependency on gcc just for calling the linker. Calling ld will make #[link_args] and --link_args more accurate. Right now they would be better described as gcc_args. | labels: A-linkage", "label": "medium", "label_id": 2}
{"id": "rust_1301", "text": "Allow link_args attributes on crates | Right now link_args attributes only apply to native modules. We are soon adding a --link_args command line option as well. A crate-level attribute makes sense too. | labels: E-easy, A-linkage", "label": "low", "label_id": 3}
{"id": "rust_1302", "text": "Disable locking in memory_region when RUSTRT_TRACK_ALLOCATIONS=0 | The exchange heap uses a lock around every malloc and free, i.e. every vector and string acquires at least two locks during its lifetime. It looks like when we are not tracking allocations (now the default) there should be no need for a lock here. | labels: A-runtime, E-easy, I-slow", "label": "low", "label_id": 3}
{"id": "rust_1303", "text": "Add #[link_type=\"object\"] to link against object files | I need to write some wrapper functions in C for my zeromq bindings. It seems a bit heavyweight to create a shared library just to link these functions in, so I'm cheating and putting my .o files in the link_args for the zmq native mod. I'd rather put these functions in their own  | labels: A-linkage, C-enhancement, A-attributes", "label": "low", "label_id": 3}
{"id": "rust_1304", "text": "Put all the trans_* modules under an umbrella trans module | Trans has slowly been divided up into smaller pieces, but the structure is a bit odd. Instead of a trans module that contains a bunch of smaller modules we have a bunch of smaller modules that are peers of each other and named trans_something. We should refactor these into a more | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1305", "text": "rustc crash with upcall fail \"option none\" | I'm getting this exception: ``` rust: upcall fail 'option none', ../src/libcore/option.rs:34 rust: domain main @0x102029600 root task failed ``` With this reduced (and invalid) code: ``` use std; import std::str; obj a() { fn b() { c({ |d| }); } } ```", "label": "medium", "label_id": 2}
{"id": "rust_1306", "text": "Should `5.f` parse as a float literal, or expr_field(int literal, \"f\")? | We can make the lexer not consider a dot part of a number when followed immediately by a letter. This makes `5.f`, `10.f64`, and similar invalid, but the dot is already redundant there anyway. This allows us to do `10.some_method_name()`. That'd be a relatively rare thing to writ", "label": "medium", "label_id": 2}
{"id": "rust_1308", "text": "OS X generates warning about compact debug info for __morestack | This is probably not a problem, since the unwinder falls back to dwarf for frames without compact info, but we should figure out a way to suppress it at least. Note that there are other errors in this output. ``` (stdcore=843d93) rustcrypto $ ls README.md crypto.rc hash.rs manife | labels: A-linkage, O-macos", "label": "medium", "label_id": 2}
{"id": "rust_1310", "text": "Add caching to tag_variant | This function allocates tons of memory and the results are cacheable. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1311", "text": "llvm-config sometimes doesn't provide the correct include directory | llvm-config --cxxflags looks like this for me: ``` -I/home/banderson/Dev/rust/src/llvm/include -I/home/banderson/Dev/rust/build/llvm/x86_64-unknown-linux-gnu/include -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -O3 -fomit-frame-poin | labels: A-LLVM, O-windows", "label": "medium", "label_id": 2}
{"id": "rust_1313", "text": "deal with .dSYM on os x | When building shared libs on os x gcc generates separate .dSYM directories that contain out-factored symbol information. This is a bit ugly and different from the other platforms. We need to investigate/decide what to do with it: leave it, delete it, somehow generate normal libs  | labels: O-macos", "label": "medium", "label_id": 2}
{"id": "rust_1315", "text": "Go over std and core and add pure declarations | Noticed some fns in std and core could be annotated as pure. This should be done so that they may be used from predicates. This probably needs to happen twice, once now and once later, after mutation of local variables is possible in pure functions. It would also help if there co | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1316", "text": "Type casts should be considered as pure where possible | Noticed this when seeing a u8 as uint cast | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1322", "text": "Return address at the bottom of stack should be 0 | We have 0xdeadbeef as our final return address. The unwinder expects to see 0 here afaict. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1323", "text": "Use __morestack to switch to the C stack | This would allow gdb to backtrace through the stack switch. Should be doable by writing an assembly function that follows the __morestack protocol. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1324", "text": "Remove stack alignment from core::task::unsafe_spawn_inner | Pretty sure that aligning here has no effect since the setup in context::call does its own alignment. | labels: A-runtime, E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1325", "text": "Rewrite upcall_new_stack/del_stack to follow the standard upcall convention | These upcalls are used by __morestack and have a different calling convention than other upcalls, but there's no reason that has to be the case. | labels: A-runtime, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1326", "text": "#[link_name = \"\"] should be an error even when #[nolink] | # [link_name = \"\"] now results in an error, but to support the transition to the #[nolink] attribute, it does not when the #[nolink] attribute is also applied. After we snapshot we should make #[link_name = \"\"] always an error. | labels: E-easy, A-linkage", "label": "question", "label_id": 4}
{"id": "rust_1327", "text": "Fix failing tests on windows | There's at least one test that fails on windows and isn't run by check-fast | labels: A-testsuite, O-windows", "label": "medium", "label_id": 2}
{"id": "rust_1328", "text": "Use quotes to improve error messages | Since Haskell's [1 .. 10] is not (yet) implemented in Rust and i read about ranges, i tried ``` let a = [1 to 10]; ``` this gives the baffling error message ``` error: expecting ,, found to ``` A more readable version would be ``` error: expecting \",\" but found \"to\" ``` | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1330", "text": "Importing a module that does not exist fails hard | ``` rust import std::vec; use std; fn main() { } ``` ``` godot:build jdm$ x86_64-apple-darwin/stage0/bin/rustc --target=x86_64-apple-darwin ~/src/resolve_test.rs rust: upcall fail 'option none', /Users/administrator/src/rustbot/workspace-snap-stage3-i386-unknown-darwin/src/src/li", "label": "medium", "label_id": 2}
{"id": "rust_1332", "text": "Add valgrind guard bytes to the end of the stack again | I previously removed them thinking they had no practical effect, but I was wrong since the first few words of the stack are things that shouldn't be scribbled on. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1333", "text": "fix setenv and getenv (especially on os x) | I digged a bit into setenv/getenv not always working on os x and found two issues: - Sadly the man page says: ``` Successive calls to setenv() or putenv() assigning a differently sized value to the same name will result in a memory leak. The FreeBSD seman- tics for these function | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1335", "text": "from_strs should return option::t | Since from_str functions will be mainly used to parse user input, they should return optional types instead of failing on malformed input. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1337", "text": "Add debug representation of strings | labels: A-debuginfo", "label": "medium", "label_id": 2}
{"id": "rust_1338", "text": "Add debug representation of objects | labels: A-debuginfo", "label": "medium", "label_id": 2}
{"id": "rust_1339", "text": "Add debug representation of enums | labels: A-debuginfo", "label": "medium", "label_id": 2}
{"id": "rust_1340", "text": "Fix debug representation of arrays of structs | \"Up-to-date\" test case: ``` rust fn main() { struct moo {a: float}; let x = [moo{a: 1.5}, moo{a: 2.3}]; io::println(fmt!(\"%?\", x)); } ``` (build with `rustc -Z debug-info`, then load it up in gdb and set a breakpoint on `main`.) Original reported test case follows ``` rust let x  | labels: A-debuginfo", "label": "medium", "label_id": 2}
{"id": "rust_1341", "text": "Add debug representation of function types | labels: A-debuginfo", "label": "medium", "label_id": 2}
{"id": "rust_1342", "text": "Add debug representation of resources | labels: A-debuginfo", "label": "medium", "label_id": 2}
{"id": "rust_1343", "text": "Building with debugging causes test failures on i686-unknown-linux-gnu | This command: ``` make check-stage1-T-i686-unknown-linux-gnu-H-x86_64-unknown-linux-gnu-rfail DEBUG=1 ``` Results in tests where the instruction pointer ends up in bizarre places or the stack is misaligned. I don't know if it's related to the recent addition of debug info or not. | labels: A-debuginfo", "label": "medium", "label_id": 2}
{"id": "rust_1344", "text": "Name mangling mistakes with -g | This is a backtrace from compiletest built with -g ``` #11 0x00007ffff7aee3ff in context::call_shim_on_c_stack (this=0x43d700, args=0x445e80, fn_ptr=0x7ffff7af2f48) at ../src/rt/arch/x86_64/context.h:58 #12 0x00007ffff7af4066 in call_upcall_on_c_stack (args=0x445e80, fn_ptr=0x7ff | labels: E-easy, A-linkage", "label": "low", "label_id": 3}
{"id": "rust_1345", "text": "Rust snapshot binaries aren't recognized by RHEL5 | The elf we generate uses the `Linux` ABI, which is a recent invention, older Linuxes having used the `System V` ABI. On Scientific Linux 5 this results in the snapshots being unrunnable: ``` libcore-14bd852465126fe7-0.1.so: ELF file OS ABI invalid ``` See http://stackoverflow.com | labels: O-linux", "label": "question", "label_id": 4}
{"id": "rust_1346", "text": "os x / make check-fast bug that seems to effect invoke-external-native | https://gist.github.com/1500793 looks like this is concurrency related, cannot reproduce this safely on the machine where i see it and am logging this here make check-fast CFG_DISABLE_VALGRIND=1 run-pass [stage2]: test/run-pass/invoke-external-native.rs rust: fatal, 'false' faile | labels: A-runtime, I-crash", "label": "high", "label_id": 1}
{"id": "rust_1347", "text": "\"char\": make \"to_lower\"/\"to_upper\" work for non-ASCII characters | This probably should be implemented by means of the non-exported unicode.rs in libcore. | labels: C-enhancement, A-Unicode", "label": "low", "label_id": 3}
{"id": "rust_1348", "text": "\"char\": add a type and function for Unicode Character Categories | For Unicode Character Categories see http://www.fileformat.info/info/unicode/category/index.htm Haskell implements the type \"GeneralCategory\" and a function to determine a character's \"GeneralCategory\". Their implementation goes like this: - the script https://github.com/ghc/pack", "label": "low", "label_id": 3}
{"id": "rust_1351", "text": "change map::new_*_hash to mk_*_hash | It seems that the prefix `mk_` is used more often than `make_`, so we should swap the function names before 0.1. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1352", "text": "swap arg order of vec::init_fn | This allows for the block syntax sugar. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1353", "text": "cargo: auto-fetch default sources file from rust-lang.org | We should be publishing a \"default\" local-sources.json file on rust-lang.org (or, at minimum, our github repo for now). When you run cargo for the first time it should fetch this if it hasn't got a local-sources.json file, and there should be a \"cargo init\" command or something t | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1354", "text": "cargo: list packages matching name | \"cargo list foo\" or \"cargo search foo\" should return a list of packages matching foo, including installation-status and (if installed locally) where they're located in the search path, and possibly the short package desc / license / version.", "label": "medium", "label_id": 2}
{"id": "rust_1355", "text": "cargo: shortcut for adding a source | It's a minor UI convenience, but \"cargo add-source \" is a nice way to save people the activation-energy of manually editing a json file. | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1356", "text": "cargo: dependency-resolution | Cargo packages will depend on other packages. Add dependency-graph-resolving logic and recursive dependency-installation. Dependencies can be expressed in the central json file. Cyclic dependency is an error condition. Also differentiate which installed packages are installed as  | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1357", "text": "cargo: extract json from crate files | The json describing a crate to a cargo source should be automatically extracted from the crate file. | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1358", "text": "cargo: refresh source index from remote crates | There should be a cargo command (say \"cargo index crate.rc\") that takes a crate file and updates (in-place) a sources file with fresh metadata extracted from the crate file. This is something a person operating a public sources-list will want to run when registering a new package | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1359", "text": "cargo: add $HOME/.cargo/lib to rustc default search path | If it exists, the cargo lib dir should be added to the rustc default linking path. Figure out what counts as most-useful $HOME on windows. | labels: E-easy, A-driver", "label": "low", "label_id": 3}
{"id": "rust_1362", "text": "Bogus span identified with unmatched import | Compiling the rustray.rc crate here https://github.com/brson/rustray/tree/bogus-error results in this error: ``` -:6:14265: 6:14272 error: unresolved import: option -:6:14272: 6:14277 error: unresolved import: math error: aborting due to previous errors ``` The error is actually ", "label": "medium", "label_id": 2}
{"id": "rust_1364", "text": "Make the initial obstack size very small | This looks to be the reason at the moment that we can't scale up past ~10,000 tasks. Right now the size of each shadow stack segment is 500K. We probably need to start this as something very small and double it each segment, like the main stack. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1366", "text": "JSON: add support for \"null\" | \"json.rs\" currently has no support for the JSON value **null** (http://en.wikipedia.org/wiki/JSON) Please - add support for the JSON value \"null\" to libstd/json.rs - encoding: either add \"Null\" to \"tag json\" or \"make to_str()\" accept an \"option::t\". - decoding: should be fi", "label": "question", "label_id": 4}
{"id": "rust_1369", "text": "stdlib/json.rs is written in a very inefficient style | It takes a very Haskell approach to parsing, cutting off piece by piece of the parsed string, and thus constantly allocating new strings. The functional style can be preserved by passing around a (@str, uint) pair with the offset as well as the string. But it'd probably be better | labels: E-easy, I-slow", "label": "low", "label_id": 3}
{"id": "rust_1370", "text": "std::unicode::icu: add libicu character category functions | Add bindings to libicu's (http://icu-project.org/apiref/icu4c/uchar_8h.html) functions: - UBool u_isdigit (UChar32 c) - UBool u_islower (UChar32 c) - UBool u_isspace (UChar32 c) - UBool u_isupper (UChar32 c) - UChar32 u_tolower (UChar32 c) - UChar32 u_toupper (UChar32 c)", "label": "medium", "label_id": 2}
{"id": "rust_1371", "text": "\"char\": implement \"is_whitespace\" and \"maybe_digit\" using \"std::unicode::icu\" | \"is_whitespace\" and \"maybe_digit\" should be implemented using the libicu binding in module \"std::unicode::icu\". libicu is battle tested, we should not replicate their effort. See #1370", "label": "medium", "label_id": 2}
{"id": "rust_1372", "text": "#fmt float broken on Ubuntu Precise | Assert failed on Ubuntu Precise x86_64. Works fine on another Ubuntu 11.04 (i386). ``` java use std; fn main() { std::io::println(#fmt(\"%f\", 5.82)); assert(#fmt(\"%f\", 5.82) == \"5.82\"); } ``` ``` java 0 rust: upcall fail 'Assertion \"\" + extfmt::rt::conv_float({flags: [extfmt::rt:: | labels: O-linux", "label": "medium", "label_id": 2}
{"id": "rust_1373", "text": "Libcore: move \"io\" to libcore | In libcore-land we we can perform calculations and string operations, but we need to discard them eventually, because there are no means to exchange them with the world. Please move the module \"io\" to libcore.", "label": "medium", "label_id": 2}
{"id": "rust_1374", "text": "Unwinding can still sometimes leak memory | The issue seems to be related to by-copy parameters (thus, they are probably something that I broke). I'll link a patch in a second that, when reverted, triggers the issue.", "label": "medium", "label_id": 2}
{"id": "rust_1375", "text": "#fmt uses wrong default precision for float | # fmt(\"%f\", 5.82) yields \"5.82\". Other printf's yield \"5.820000\". | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1376", "text": "fix machine type equality | float, int, uint should be equal to their machine type equivalents. This is currently not the case and originally was the reason for the introduction of trivial casts. Now that these are gone, this needs fixing, i.e. let f: float = fXY::sin(1.0) should compile.", "label": "medium", "label_id": 2}
{"id": "rust_1379", "text": "Expose floating point environment and handle fp exceptions | libmath provides a rich interface to deal with numerical exceptions, rounding modes, and the like. We need to figure, if and how much of it we want to (e.g. as a resource that clears on destruction) Useful references and any comments on this very welcome Additionally: - decide if | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1380", "text": "New logging macros #info and #debug do not work | Some handling for these got lost somewhere - currently unknown. | labels: A-runtime, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1381", "text": "Prominent instructions on how to register a package with cargo-central | We'd like people to be registering their packages with cargo-central pretty much from the start. This involves writing up a small howto or FAQ entry on the matter before release. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1383", "text": "Type unification error messages excessively mystifying | Rust is rapidly gaining a very expressive type and kind system for pointers, but the errors seem to be decreasingly clear; for instance, I came across the following errors today when updating some code: ``` ./fftw.rs:52:8: 52:25 error: mismatched types: expected *mX5 but found *R | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1384", "text": "Request for source addition | I'm developing some stuff off and on that ends up landing in https://github.com/jwise/rust-packages. Can this be added to the default sources.list on rust-lang.org? | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1386", "text": "split stdtest into stdtest/coretest | Stuff in core should not be tested in stdtest | labels: E-easy, C-cleanup, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1387", "text": "invalid location with #debug type error | This code highlights an invalid code location: ``` fn main() { let x = [1,2,3]; #debug(x); } ``` Returns this error message: ``` foo.rs:4:186: 4:187 error: first argument to #fmt must be a string literal. foo.rs:4 } ^ rust: upcall fail 'explicit failure', ../src/comp/driver/sessi | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1388", "text": "odd issue with #fmt and floats | I've run into a rather weird error with #fmt and floats: ``` use std; import std::io; fn main() { let f = -0.550153; let s = #fmt(\"%f\", f); io::println(s); } ``` Incorrectly prints out `0`. But if we instead write: ``` use std; import std::io; fn main() { let f = -0.550153; let s", "label": "medium", "label_id": 2}
{"id": "rust_1390", "text": "kind checker does not recognize implicit returns | This shouldn't compile without annotating the parameter as `copy` kind, but it does: ``` fn id(x: T) -> T { x } ``` If you return by `ret`, the problem is detected. | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1391", "text": "make rustdoc handle imports and exports | rustdoc should copy docs from imported symbols. this would, for example, help float get docs from f32/f64. Probably this should wait/ties in with copying default docs from interfaces when typeclasses become available. | labels: T-rustdoc", "label": "low", "label_id": 3}
{"id": "rust_1393", "text": "support explicit discriminant numbers on tag variants | Currently tags always use 0 ... N, where N is the number of tag variants, as the discriminant values. This makes them useless for modeling C enums, which they are the natural analogue of. We should support a form of variant-declarator that provides a discriminant value, as (say)  | labels: A-frontend", "label": "question", "label_id": 4}
{"id": "rust_1394", "text": "rustc, rustdoc: give nicer feedback when no arguments are given | A \"how to use\" information instead of the \"upcall fail\" messages would be nice: ``` $ rustc error: No input filename given. rust: upcall fail 'explicit failure', ../src/comp/driver/driver.rs:570 rust: domain main @0x10202aa00 root task failed $ rustdoc rust: upcall fail 'bounds c | labels: E-easy, C-cleanup, A-driver, T-rustdoc", "label": "low", "label_id": 3}
{"id": "rust_1395", "text": "make check and install should depend on all | Running 'make check && make install' isn't quite enough to get all targets built. Depend on 'all'.", "label": "medium", "label_id": 2}
{"id": "rust_1396", "text": "change \"when\" to \"if\" in pattern guards | I suggest we replace the word \"when\" in pattern guards with the word \"if\". This is the only place that \"when\" appears in our grammar and so it would seem more consistent: ``` alt foo { pat(a, b) if cond { ... } pat(a, b) { ... } } ``` | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1398", "text": "Allow tuples and other irrefutable patterns in parameter specifications | Currently we can write ``` for (a, b) in vec::zip(as, bs) { ... } ``` but not ``` vec::iter(vec::zip(as, bs)) { |(a, b)| ... } ``` nor ``` fn proc((a: A, b: B)) { ... } vec::iter(vec::zip(as, bs), proc) ``` It would be nice to have these irrefutable patterns work in parameter spe | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1399", "text": "Last use doesn't consider closure bodies properly | The following test case will crash (once fixed, something similar should be added to the test suite): ``` fn invoke_several_times(f: lambda()) { f(); f(); f(); } fn bycopy(+k: K) { log(error,k); } fn byref(&&k: K) { log(error,k); } fn testfn(+k: ~int) { bycopy(k); // <-- ge | labels: I-crash", "label": "high", "label_id": 1}
{"id": "rust_1400", "text": "trans.rs assertion error compiling code | I've reduced this down to about bare minimum: ``` use std; native mod foo { fn bar(x: int); } obj new(i: int) { fn f() { str::as_buf(\"\", {|_x| foo::bar(i) }); } } ``` Errors out with: ``` rust: upcall fail 'Assertion cx.fcx.llobjfields.contains_key(did.node) failed', ../src/comp/", "label": "medium", "label_id": 2}
{"id": "rust_1401", "text": "make all no longer works after make clean | At least for me, running make clean seems to then prevent me from ever building again. I get lots of linking errors related to LLVM (see below). I presume this is related to 7e611366bb07f1c26cf5692bccfdfa4fb1d96d25. ``` g++ -dynamiclib -lpthread -framework CoreServices -Wl,-no_co | labels: E-easy", "label": "question", "label_id": 4}
{"id": "rust_1402", "text": "passing rust records by value to native functions broken | I thought rust records were supposed to be compatible with c structs, but it seems there is an issue passing them by value to a native module. You can find a example of the bug here: https://gist.github.com/1543358 | labels: E-hard, A-codegen", "label": "medium", "label_id": 2}
{"id": "rust_1403", "text": "warn when int or uint is used in a native type decl | Perhaps we should issue a warning---or even an error?---when `int` or `uint` is used in a native type declaration? It is a very common mistake to assume they are the same as the C types `int` and `unsigned`. We could suggest the use of `ctypes::c_int` or `ctypes::long` etc. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1405", "text": "rustc: errors should not display runtime boilerplate logging | Whenever I have a filename typo when running rustc, I always think I'm tripping over some compiler bug before I notice the `error: error opening ...` line at the top. Could rustc catch that the file doesn't exist earlier and cleanly exit instead? ``` % rustc does-not-exist.rs err | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1406", "text": "Add fixed sized arrays for native module records | Some c libraries, like zeromq and libclang, return structures by value that contain fixed size arrays. We can't bind to these functions though because there is no way to express a fixed size array in a structure in rust. It would greatly simplify binding to these libraries if it  | labels: A-type-system, E-hard, C-enhancement", "label": "question", "label_id": 4}
{"id": "rust_1410", "text": "Set up FreeBSD bot | FreeBSD support is almost here (#1409). We'll need a bot.", "label": "question", "label_id": 4}
{"id": "rust_1411", "text": "All non-www URLs redirect to front page | http://rust-lang.org/doc/tutorial/index.html should redirect to http://www.rust-lang.org/doc/tutorial/index.html but instead it redirects to http://rust-lang.org/", "label": "medium", "label_id": 2}
{"id": "rust_1412", "text": "Standard Library documentation: sort function names | I think the list of functions e.g. on http://www.rust-lang.org/doc/core/files/str-rs.html would be much easier to browse, if the function names were sorted. Is this created by rustdoc? | labels: T-rustdoc", "label": "medium", "label_id": 2}
{"id": "rust_1413", "text": "Standard Library documentation output: missing record return type | See http://doc.rust-lang.org/doc/core/files/str-rs.html#str.char_range_at \"char_range\" is of type ``` fn char_range_at(s: str, i: uint) -> {ch: char, next: uint} ``` but the output only shows ``` fn char_range_at(s: str, i: uint) -> ``` | labels: T-rustdoc", "label": "medium", "label_id": 2}
{"id": "rust_1415", "text": "Stop passing spans around in trans | These spans are only used in output generated when hitting an unexpected circumstance (compiler bug). Passing them around is cumbersome, and already being done very poorly (the association of spans with block contexts is completely busted), so I think the code is better off witho | labels: C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1416", "text": "Revert llvm branch commit | https://github.com/brson/llvm/commit/72b5218a095dc390cba26f75baf4f616369ca295 is incorrect and unnecessary. | labels: A-LLVM", "label": "medium", "label_id": 2}
{"id": "rust_1417", "text": "do something more careful than eval_const_expr | Eval_const_expr is used in the front end in several places. This code quasi-duplicates stuff that trans should probably be doing (in Graydon's words). Any evaluation of compile-time values should likely be moved to a pass somewhere in the middle end. I assume there is a way to ge | labels: A-frontend, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1418", "text": "Tutorial is out of date online | This change from November 2011 https://github.com/graydon/rust/commit/6168f8f15b8ad86e5b0670e39d6fcc0a212acb59#doc/tutorial/test.md is not yet online: http://www.rust-lang.org/doc/tutorial/test.html Can we just point to the GitHub Markdown files?", "label": "medium", "label_id": 2}
{"id": "rust_1419", "text": "Stop building stage3 on normal test cycles | We're not comparing stage2 and stage3 at the moment, and the amount of bugs caught by that extra stage that wouldn't be caught in stage2 is probably very small. We could shave off some cycle time by only going to stage2, and doing a stage3 check only on checkpoints. | labels: E-easy, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1420", "text": "rustlang.org still points to github | rustlang.org points to https://github.com/graydon/rust whereas rust-lang.org is an actual Web site. rustlang.org should probably be an alias for rust-lang.org. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1422", "text": "Allow modifications to local variables in pure functions | I know this issue is on someone's plate, but i could not find a related issue. Currently we can not iterate over strings, vectors, lists etc using pure functions. That means that functions like `str::is_whitespace()` can not be declared pure either, even though logically they are | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1423", "text": "llvm-dis does not work on our generated .bc files anymore | If you save a `.bc` with the `--save-temps` compiler switch, the file isn't accepted by `llvm-dis` anymore. It says `unknown type in type table`. This removes a very valuable debugging angle. It used to work. Unless someone has an idea what this might be, we'll have to bisecting  | labels: A-LLVM", "label": "medium", "label_id": 2}
{"id": "rust_1424", "text": "Simplify the rope:bal1 test | It takes a long time to run. Every time I see it I wonder what's going on. | labels: E-easy, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1425", "text": "Allow overloaded literals | `let i: uint = 0` is not valid and this frustrates almost everybody. Maybe there's some compromise that solves the biggest problem. | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1426", "text": "Export all tag variants | Most people would like exporting a tag to export all variants, while preserving some way to only export some.", "label": "medium", "label_id": 2}
{"id": "rust_1427", "text": "Eliminate dot in nullary-tag variant patterns | Nobody likes it, but there's no agreement on how to fix it.", "label": "medium", "label_id": 2}
{"id": "rust_1428", "text": "Rename tag to something else. Possibly 'enum'", "label": "medium", "label_id": 2}
{"id": "rust_1429", "text": "Eliminate the disambiguating :: in id:: | Remembering when you have to put `::` before type parameters is difficult. Nobody likes it. | labels: E-hard", "label": "medium", "label_id": 2}
{"id": "rust_1430", "text": "Separate tag variants by comma | `tag x {a; b; c}` should look like `tag {a, b, c}` to make it closer to record syntax. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1431", "text": "Ensure consistent naming of predicates in std and core | We discussed this on IRC and decided that names of simple boolean predicates in std and core should start with \"is_\" or similarly be expressed using a \"small question word\" The notable exception are generally established predicate names like \"lt\", \"ge\", etc. This needs to be chec | labels: C-cleanup", "label": "question", "label_id": 4}
{"id": "rust_1432", "text": "allow recursive object methods | It's a bit obnoxious when writing an object type that can return instances of itself that we need a tag to break up the recursion: ``` tag foo_tag = foo; type foo = obj { fn get_children() -> [foo_tag]; }; obj new_foo() { fn get_children() -> [foo_tag] { [] } } ``` It'd be much n", "label": "medium", "label_id": 2}
{"id": "rust_1433", "text": "Add support for hexadecimal float literals | We need to be able to parse the output of printf's %a for proper support of mathematical constants without loss of precision (i.e. 0x1.fffffffffffffp+1023_f64 syntax) | labels: A-frontend, E-easy", "label": "question", "label_id": 4}
{"id": "rust_1434", "text": "Stop flushing stdout every time a line is logged | In rust_srv::log we're flushing stdout every log line. It's only done to make sure all the output is captured when the process fails, so we should instead flush just once, possibly in ~rust_srv. | labels: A-runtime, E-easy, I-slow", "label": "low", "label_id": 3}
{"id": "rust_1435", "text": "Stop defining NVALGRIND when valgrind isn't found | I forget exactly why we started defining NVALGRIND, but using it creates a situation where you can build the runtime without the needed valgrind support (if configure doesn't find valgrind); then if you later try to valgrind rust code it will report bogus errors. | labels: A-runtime, E-easy", "label": "question", "label_id": 4}
{"id": "rust_1436", "text": "Implement indefinite-extent iface dicts | They are currently always stack-allocated, which doesn't work when you want to bind a function that takes a bounded parameter. Will also have to make this work for unique functions somehow.", "label": "medium", "label_id": 2}
{"id": "rust_1437", "text": "Implement cast-to-iface | `myvalue as myiface` should, if `myvalue` is of a type that has an impl of `myiface` in scope, copy the value into a boxed representation, along with the dict needed to treat it as myiface. Values of such a type can have methods called on them, which will be resolved through the ", "label": "medium", "label_id": 2}
{"id": "rust_1438", "text": "Fix re-exporting of impls | You currently can't re-export an impl from a module. (Maybe it accidentally works in-crate, but it's definitely broken cross-crate.)", "label": "medium", "label_id": 2}
{"id": "rust_1439", "text": "Add some useful interfaces to the core and std libs | To find out whether they work well, we should try to actually use them. `to_str` and `seq` are some obvious candidates. If #1438 is resolved, we can provide a `core::impl::common` module that exports impls for common interfaces of built-in types, so you'd only need a single `impo", "label": "medium", "label_id": 2}
{"id": "rust_1441", "text": "Documentation links on wiki front page are broken | From https://github.com/graydon/rust/wiki -- in the Documentation section -- the \"HTML\" and \"PDF\" links for \"Latest snapshot\" are both broken. I get a github \"page not found\" error.", "label": "medium", "label_id": 2}
{"id": "rust_1442", "text": "Find out why core::float needs explicit exports | core::float imports from fXY::\\* which in turn re-exports predicates and functions from cmath. Turns out the predicates somehow do not get exported unless one uses explicit export statements. This is a bug and it needs to be investigated where this is coming from. | labels: A-frontend", "label": "medium", "label_id": 2}
{"id": "rust_1443", "text": "Segfault with generic functions | The below code segfaults for me. Any further reduction seems to remove the problem. ``` fn baz(s: T, f: block(T) -> U) { f(s); } fn foo(x: T) { baz(x, {|_e| 0 }); } fn main() { foo(0); } ``` | labels: I-crash", "label": "high", "label_id": 1}
{"id": "rust_1444", "text": "rustc's --test flag should imply --bin | Crate's that have the #[crate_type = \"lib\"] attribute are compiled as libs even when compiling with --test. This is probably not intuitive. | labels: E-easy, A-driver, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1445", "text": "Fix make dist | Make dist probably doesn't work anymore, and we need it before doing a release.", "label": "medium", "label_id": 2}
{"id": "rust_1446", "text": "Have the bots run make distcheck", "label": "medium", "label_id": 2}
{"id": "rust_1447", "text": "Reorganize the directory structure of librustc and the driver | The driver is now just a small stub that calls librustc, but the source still lives under comp. These two things should be separated. I suggest moving librustc to src/librustc and driver.rs to src/rustc-driver. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1448", "text": "Macro errors are reported at def, not use | If you write something like `#debug[\"%u\", 10]`, the type error (unsigned vs signed int) gets reported in `core.rs`, at the definition of `#debug`, rather than at the point of use. This is very confusing and makes you think something is fundamentally wrong in the Rust libraries (a", "label": "medium", "label_id": 2}
{"id": "rust_1449", "text": "Dependencies for C++ files in rt are wrong | I am not 100% sure why, but the autogeneration of dependencies for the C++ files in rt definitely do not work. Changing a header file, for example, does not cause all the files that include that header to be recompiled. I would be inclined to just have `*.cpp` depend on `*.h`, bu", "label": "medium", "label_id": 2}
{"id": "rust_1451", "text": "bare fn types in record unification produces unexpected errors | In the following source: ``` type T = { mutable f: fn@() }; type S = { f: fn@() }; fn fooS(t: S) { } fn fooT(t: T) { } fn bar() { } fn main() { let x: fn@() = bar; fooS({f: x}); fooS({f: bar}); let x: fn@() = bar; fooT({mutable f: x}); fooT({mutable f: bar}); } ``` the last call  | labels: A-type-system, A-diagnostics", "label": "medium", "label_id": 2}
{"id": "rust_1452", "text": "cargo: Add the ability to run tests | labels: C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1453", "text": "Create a continuous integration server for building rustpkg packages | I would like to know when packages break. We can possibly extend rustbot to do this. | labels: C-enhancement, P-medium", "label": "low", "label_id": 3}
{"id": "rust_1454", "text": "redesign task API to use sendable fns and be more approachable | I am currently working on redesigning the task API to use sendfn and be more approachable. However, doing so exposed some bugs in sendfn so this is really blocked on me fixing those bugs. Just wanted to get an issue in the tracker for it. The basic changes so far are: - `task::sp", "label": "medium", "label_id": 2}
{"id": "rust_1455", "text": "spawning a bare fn doesn't work | This should work: ``` fn foo() { } fn bar() { task::spawn(foo); } ``` but it doesn't right now, because you get an error message that you are moving out of a static item. This is reasonable, as spawn's parameter is declared with move mode, but the rule doesn't make sense in this ", "label": "medium", "label_id": 2}
{"id": "rust_1457", "text": "Dismantle std::unstable | core and std have extfmt and test modules which just provide compiler support and aren't intended to provide a user-facing API. We should have some convention for where they should be hidden away. In particular, \"test\" is a module where I would like to put useful things for writi | labels: E-easy, C-cleanup", "label": "question", "label_id": 4}
{"id": "rust_1458", "text": "pp omits parens needed to disambiguate call-with-block sugar | This is a passing Rust program: ``` fn plus_one(f: block() -> int) -> int { ret f() + 1; } fn ret_plus_one() -> fn(block() -> int) -> int { ret plus_one; } fn main() { let z = (ret_plus_one()) {|| 2}; assert z == 3; } ``` The pretty-printer omits the parens around the call in mai | labels: A-pretty, E-hard", "label": "medium", "label_id": 2}
{"id": "rust_1459", "text": "log (fail, 2) hits an LLVM assertion | ``` fn main() { log (fail, 2); } ``` Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && \"Calling a function with a bad signature!\"), function init, file /Users/jruderman/code/rust/src/llvm/lib/VMCore/Instructions.cpp, line 274.", "label": "medium", "label_id": 2}
{"id": "rust_1460", "text": "\"error: internal compiler error ty_fn_args() called on non-fn type\" | ``` fn main() { {|i| if i == 1 { }}; } ``` Result: ``` error: internal compiler error ty_fn_args() called on non-fn type ``` Expected: ``` error: expressions with block type can only appear in callee or (by-ref) argument position ```", "label": "high", "label_id": 1}
{"id": "rust_1461", "text": "\"warning: Captured variable 'x' not used in closure\" presages a crash | ``` fn main() { let x = ~1; let lam_move = lambda[move x]() { }; lam_move(); } ``` While compiling: ``` 3:32 warning: Captured variable 'x' not used in closure ``` While running: ``` malloc: *** error for object 0x1: pointer being freed was not allocated ``` | labels: I-crash, A-codegen", "label": "high", "label_id": 1}
{"id": "rust_1462", "text": "non-exhaustive match failure in typeck::lookup_method | ``` fn f(t: T) { t.x; } ``` Result: ``` upcall fail 'non-exhaustive match failure', ../src/comp/middle/typeck.rs:1554 ``` Expected: ``` error: attempted access of field x on type 'a, but no method implementation was found ``` I guess the loop in lookup_method needs to sk | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1463", "text": "\"upcall fail 'option none'\" with recursive iface impl? | Replacing \"e\" with \"self\" in src/test/run-pass/iface-to-str.rs causes an internal compiler error. Here's a slightly reduced testcase: ``` fn ignore_block(_b: block(str)->str) { } iface to_str{ fn to_str() -> str; } impl to_str of to_str for [T] { fn to_str() -> str { i", "label": "high", "label_id": 1}
{"id": "rust_1464", "text": "rustc hang with infinite recursion in ty::fold_ty | rustc hangs trying to compile this program: ``` import comm::*; fn f() { let p = port(); send(recv(p), chan(p)); } ``` Seems to be infinite recursion in: ``` 510 vec::map::_83cc742242c22cda 510 middle::ty::fold_ty::anon2725 510 middle::ty::fold_ty::_c9621faf7679b838 510 middle::t | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1465", "text": "internal compiler error fail called with unsupported type _|_ | ``` fn main() { fail do { fail } while true; } ``` Gives me ``` error: internal compiler error fail called with unsupported type _|_ ```", "label": "question", "label_id": 4}
{"id": "rust_1466", "text": "RUST_CC_ZEAL crash: too much recursion in walk_uniq | ``` fn main() { let _x = @{a: @10, b: ~true}; } ``` When run with RUST_CC_ZEAL=1, this program crashes. The crash looks like it's due to too much recursion in ``` shape::data::walk_uniq(). ``` It's also suspicious that the cycle collector hits a stack guard r | labels: I-crash", "label": "high", "label_id": 1}
{"id": "rust_1467", "text": "Anonymous function with upvar trips assert in trans | ``` fn main() { let x = 3; (fn() { assert x == 3; })(); } ``` Result: ``` rust: upcall fail 'Assertion cx.fcx.llupvars.contains_key(did.node) failed', ../src/comp/middle/trans.rs:2688 rust: domain main @0x7fe932819a00 root task failed ``` Expected? ``` error: attempted dynamic en", "label": "medium", "label_id": 2}
{"id": "rust_1469", "text": "rebind-fn.rs crashes with RUST_CC_ZEAL=1 | src/test/run-pass/rebind-fn.rs crashes when run with RUST_CC_ZEAL=1. | labels: I-crash", "label": "high", "label_id": 1}
{"id": "rust_1471", "text": "Generic type can't be inferred through lambda block | ``` type actor = { unused: bool }; type self = { unused: bool }; fn act(+behavior: sendfn(self)) -> actor { {unused: true} } tag in { preprocess([u8]); exit; } fn mk() -> actor { act {|self| } } fn main() { } ``` ``` ../src/test/run-pass/block-infer.rs:19: | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1472", "text": "Check that rustc's output is writable before linking | If the final output file is not writable we end up failing with a cryptic linker error and a dump of the gcc command line. This could largely be avoided by doing some check before running the linker. | labels: E-easy, A-linkage, A-driver", "label": "low", "label_id": 3}
{"id": "rust_1474", "text": "Block style autodetection should take upvars into account | This is a slight variation on #1467: ``` fn main() { let x = 3; fn blah(_a: fn()) {} blah({|| log(error, x); }); } ``` Compiling that crashes when trans tries to resolve the upvar for `x` inside the block. I guess typeck should refuse to convert something that has upvars into a b", "label": "medium", "label_id": 2}
{"id": "rust_1475", "text": "Add many more tests for iface and impl | Also for error conditions.", "label": "medium", "label_id": 2}
{"id": "rust_1476", "text": "expected error scanner is too imprecise | The code in compiletest which scans for expected errors when you use the `//!` mechanism to associate an error with a particular line is not very smart. It just looks for a filename, line number, and the string `error` or `warning`. This sometimes causes it to fail tests that do  | labels: E-easy, C-cleanup, A-testsuite", "label": "low", "label_id": 3}
{"id": "rust_1478", "text": "Don't log in the red zone | It requires too much stack | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1479", "text": "Update spawn example in language doc | This is wrong: https://github.com/graydon/rust/blob/master/doc/rust.texi#L1534 | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1480", "text": "Leak with sendfn | This leaks: ``` tag maybe_pointy { none; p(@pointy); } type pointy = { mutable a : maybe_pointy, d : sendfn()->(), }; fn empty_pointy() -> @pointy { ret @{ mutable a : none, d : sendfn()->(){}, } } fn main() { let v = empty_pointy(); v.a = p(v); } ```", "label": "medium", "label_id": 2}
{"id": "rust_1481", "text": "better error message when there is a missing semicolon with an expression | Something like: ``` fn foo() { task::spawn {|| } //! ERROR type mismatch: expected '()' but got 'tast' bar(); } fn bar() { } ``` will yield an error something like the one above. It would be better if it said, \"statement with non-unit return type requires a semicolon\" or somethin | labels: E-easy, A-type-system", "label": "low", "label_id": 3}
{"id": "rust_1482", "text": "Leaks when failures occur during unwinding | If a failure occurs during unwinding or executing a resource, we potentially leak. This is blocking #1078 (which also includes a reference to a testcase). | labels: A-codegen", "label": "medium", "label_id": 2}
{"id": "rust_1483", "text": "deprecate 'obj' in docs | The obj system will be removed in a near-future version of rust, as we have a typeclass system now that goes a fair ways beyond what the obj system did. Not first release, but soon. In our own code we're leaving it active for the 0.1 release just to avoid totally destabilizing th | labels: E-easy", "label": "question", "label_id": 4}
{"id": "rust_1484", "text": "remove 'obj' system | Most uses of the obj system should, at this point, be replaceable with uses of the iface/impl system, with some degree of improved performance to boot. Try this in our own code (libstd and rustc) and see how far it can get. If complete, remove 'obj' support from the compiler. | labels: E-easy, C-cleanup", "label": "question", "label_id": 4}
{"id": "rust_1485", "text": "Transfer rust to mozilla administrative group on github | It's still under 'graydon'. The time has come for it to graduate, you egotistical fellow!", "label": "medium", "label_id": 2}
{"id": "rust_1486", "text": "Generate rustdoc output instead of naturaldocs in build | This requires getting the output from rustdoc to a credible enough state that we can stand looking at its output instead of naturaldocs, rewriting the existing naturaldocs comments to rustdoc attributes, and adding some makefile logic to do the deed. | labels: T-rustdoc, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1487", "text": "allow for native mod functions to initialize records | Some C libraries want you to create a structure on the stack and pass it off to be initialized by some function. Right now the typestate requires all structures to be fully defined before being passed to a function, so I'm finding myself having to write: ``` type foo_t = { p: *ct | labels: A-type-system, E-hard, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1488", "text": "Remove the global variables that store the discriminant IDs per variant | Consider removing global variables that store the discriminant IDs per variant as they are likely not really needed. See pull request #1397. | labels: C-cleanup, A-codegen", "label": "low", "label_id": 3}
{"id": "rust_1489", "text": "Add a mechanism to set the max stack size | Right now we can recurse until memory runs out. There should probably be a way to control the maximum stack size, with some default value | labels: A-runtime, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1490", "text": "move rust-mode.el to src/etc/emacs/ | It's currently living over in marijn's \"temporary\" repo https://github.com/marijnh/rust-mode but has long since become the only emacs mode that can speak rust, so.. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1492", "text": "Should it be possible to use a boxed iface type for a parameter bounded on itself? | I.e. ``` iface foo { fn foo(); } fn do_foo(x: T) { x.foo(); } fn do_foo_with_foo(x: foo) { do_foo(x); } // Does not compile ``` The reason that does not compile is that no dictionary can be passed for type `foo`, since that is a generalization of all types that confor", "label": "medium", "label_id": 2}
{"id": "rust_1493", "text": "make boxes self-describing | Today we have a map that maps from each box allocation to a type descriptor describing its payload. This requires hashtable lookups on malloc/free and seems inefficient. However, to do cycle collection or any form of GC, boxes DO need to be self-describing. Therefore, I propose w | labels: I-slow", "label": "medium", "label_id": 2}
{"id": "rust_1494", "text": "Impl resolution may try to access unresolved types | When collecting the set of impls in a mod that hasn't been resolved yet, you get an error when one of the impls implements an iface, since the ty_path for the iface doesn't have a def associated with it yet. This should probably be fixed by moving the gathering of impls for impor", "label": "medium", "label_id": 2}
{"id": "rust_1495", "text": "rt: remove set_min_stack | This function is not really safe to use as implemented and is only used in some tests that should no longer need it. | labels: A-runtime, E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1496", "text": "Collect benchmark numbers for 0.1 | We need to know how our numbers now compare to those from last summer and those from gcc.", "label": "medium", "label_id": 2}
{"id": "rust_1497", "text": "rt: Add a way to configure the runtime environment from the command line | We have several environment variables defined in rust_env.cpp for controlling the runtime. It would be nice if this could be done from the command line as well. See thoughtpolice's comments in #1489. | labels: A-runtime, E-easy, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1498", "text": "convert shape code to be visitor glue | I would like to do away with the shape code and instead have the compiler generator \"visitor glue\", which is glue code that walks the data structure and invokes methods on a visitor. The methods would be encoded as a struct of functions. This could replace the logging, universal  | labels: A-runtime, C-cleanup, E-hard, A-codegen", "label": "low", "label_id": 3}
{"id": "rust_1499", "text": "custom tag discriminants not considered in the shape code | I just realized that the shape code knows nothing about custom tag discriminants. I would prefer to fix this by fixing #1498. | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1501", "text": "`core::float::consts::pi` does not work | Whereas `core::f64::consts::pi` does. `float` import all from `f64`/`f32`, and exports `consts`, so it should be available. Probably some bug in re-exporting modules.", "label": "medium", "label_id": 2}
{"id": "rust_1503", "text": "Bounds check error in typecheck when compiling alt-expression | Compiling this code: ``` rust fn cmp() -> int { alt(option::some('a'), option::none::) { (option::some(_), _) { fail; } // Works if this next case is commented out (_, option::some(_)) { fail; } } } fn main() { log(error, cmp()); } ``` yields the error: ``` rust: upcall fai | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1504", "text": "Allow 'give up on this function scope, continue with next' errors in typeck | Currently, when the check phase comes across something it really can't type, it bails out entirely and aborts the compilation. It should not be too hard to set it up to continue typechecking other function blocks, since those are mostly separate units. (Of course, getting a funct | labels: E-easy, A-type-system, C-enhancement, A-diagnostics", "label": "low", "label_id": 3}
{"id": "rust_1505", "text": "Parser doesn't handle fn@ or fn~ expr as statement | It tries to parse it as a fn item, and gets confused. There's already some code to handle this for plan `fn() {...}` exprs, it can be extended to handle these forms.", "label": "medium", "label_id": 2}
{"id": "rust_1506", "text": "Inner attributes not supported on all item types, including fn | While `mod { #[attr]; }` works, `fn { #[attr]; }` does not. This style of attribute is very desirable for rustdoc. | labels: A-frontend, E-easy", "label": "question", "label_id": 4}
{"id": "rust_1507", "text": "Improve type error messages | - The type errors sometimes fall back to the nameless (unpacked) names for named types. This is especially awkward for tags and such, where it uses metadata::tyencode to produce a (mostly unreadable) string. Find out why it doesn't see the type's proper name. - Module-qualify the", "label": "medium", "label_id": 2}
{"id": "rust_1508", "text": "Allow C code to call into Rust code | There are probably a number of things needed to make this happen: Scheduler: - Instead of reusing the scheduler's stack to call C code, we'll want each scheduler thread to hold a cache of big stacks, give each task a pointer to a C stack, a stack of C contexts and a stack of Rust | labels: A-runtime", "label": "medium", "label_id": 2}
{"id": "rust_1509", "text": "Reduce the Rust stack red zone | Right now the stack red zone is 20K on all platforms, which is ~20K larger than we would like. Several considerations: - The dynamic linker performs lazy binding in the red zone. Lazy binding can be turned off. - Landing pads call _Unwind_Resume in the red zone. We can probably c | labels: A-runtime, A-linkage, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1510", "text": "Need custom discriminant tests in the pretty printer | Right now, they don't get pretty printed at all! What needs to be done: - First, add a test or two to `test/pretty` with the `pp-exact` directive, as described [in the wiki](https://github.com/mozilla/rust/wiki/Note-testsuite). - Second, modify the pretty printer in `comp/syntax/ | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1511", "text": "C-like tags should be castable to int with or without custom discriminants | This type checks (`tag-disr-val-shape.rs`): ``` enum color { red = 0; green = 1; blue = 2; black = 3; white = 4; } fn main() { assert uint::to_str(red as uint, 10u) == #fmt[\"%?\", red]; assert uint::to_str(green as uint, 10u) == #fmt[\"%?\", green]; assert uint::to_str(white as uint", "label": "medium", "label_id": 2}
{"id": "rust_1512", "text": "Revoke Rust's claim to the `.rc` file extension on GitHub | Fun fact: Rust is the 21st-most-popular language on Github: https://github.com/languages/Rust Even Linus Torvalds uses Rust! https://github.com/torvalds/subsurface/graphs/languages This is just a papercut, but it would be nice if GitHub were told not to count `.rc` files as indic | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1513", "text": "pandoc: unrecognized option `--section-divs' | When building doc/rust.html I get a pandoc error using version 1.5.11", "label": "medium", "label_id": 2}
{"id": "rust_1514", "text": "GitHub's markdown doesn't understand commented out examples in tutorial | See: https://github.com/mozilla/rust/blob/master/doc/tutorial/syntax.md There are code examples prefixed with # that don't appear in the website version. We should probably try to make our markdown displays correctly on github. | labels: C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1516", "text": "Closures can't be declared as diverging functions | This looks inferrable. ``` fn main() { let early_error: fn@(str) -> ! = {|msg| fail }; } ``` ``` ../src/test/run-pass/infer-closure.rs:2:38: 4:5 warning: unable to infer kind of closure, defaulting to block ../src/test/run-pass/infer-closure.rs:2 let early_error: fn@(str) -> ! =  | labels: A-type-system", "label": "medium", "label_id": 2}
{"id": "rust_1517", "text": "Run tutorial code fragments as part of make check | See #1514. marijnh has cleverly arranged for the tutorial fragments to be executable. We should run them as part of the test suite. | labels: A-testsuite", "label": "medium", "label_id": 2}
{"id": "rust_1518", "text": "Add syntax highlighting to rust-lang.org's code snippet | labels: E-easy, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1519", "text": "rust-lang.org says rust is BSD licensed, when it is MIT | The bulk of the rust codebase is under the MIT license.", "label": "medium", "label_id": 2}
{"id": "rust_1520", "text": "Support a very basic form of operator overloading | (RFC) We could add interfaces `core::num` and `core::deref`, with the first implementing methods `add`, `sub`, `mult`, `div`, `rem`, `neg`, and probably a few more, and the second only `deref`. The compiler can then resolve operators `+`, `-`, `*`, `/`, `%`, and `[x]` on types th", "label": "question", "label_id": 4}
{"id": "rust_1523", "text": "Library support for go-like deferred function | I recently wrote the following to get some behavior like a 'finally' block: ``` resource finally(ch: comm::chan) { comm::send(ch, done); } let _finally = finally(ch); ``` What I really wanted to write was: ``` defer {|| comm::send(ch, done); } ``` Or something struct | labels: C-enhancement", "label": "question", "label_id": 4}
{"id": "rust_1524", "text": "Wrong default filename for --lib --emit-llvm -S | ``` x86_64-unknown-linux-gnu/stage1/bin/rustc ../src/test/run-pass/hello.rs --emit-llvm -S --lib ``` Outputs a file named `../src/test/run-pass/hello.` instead of `../src/test/run-pass/hello.ll`. It does contain llasm as expected. | labels: A-frontend, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1525", "text": "str::unsafe_from_bytes should be unsafe | It's not an unsafe function, but it's not safe. In general our string functions need some scrutiny. | labels: E-easy", "label": "low", "label_id": 3}
{"id": "rust_1526", "text": "Memory corruption with --emit-llvm -S on linux | ``` x86_64-unknown-linux-gnu/stage1/bin/rustc --emit-llvm -S --target=x86_64-unknown-linux-gnu --lib -o test.ll ../src/comp/rustc.rc ``` Results in: ``` *** glibc detected *** x86_64-unknown-linux-gnu/stage1/bin/rustc: double free or corruption (!prev): 0x000000001e3341d0 *** ===", "label": "medium", "label_id": 2}
{"id": "rust_1527", "text": "Stack growth defeats optimization | After adding a call to fib(42) in shootout-fibo's main function. Without -O: ``` real 0m3.098s user 0m3.080s sys 0m0.010s ``` With -O: ``` real 0m5.799s user 0m5.770s sys 0m0.020s ``` Edit: When tasks do a lot of calculations without using a lot of stack, the effects of growing a | labels: A-runtime, I-slow, A-codegen", "label": "medium", "label_id": 2}
{"id": "rust_1528", "text": "Functions written in expression style are slower than imperative style | This takes 4.7s: ``` use std; fn ack(m: int, n: int) -> int { if m == 0 { ret n + 1 } else { if n == 0 { ret ack(m - 1, 1) } else { ret ack(m - 1, ack(m, n - 1)); } } } fn main(args: [str]) { // FIXME: #1527 sys::set_min_stack(1000000u); let n = if vec::len(args) == 2u { int::fro | labels: I-slow", "label": "medium", "label_id": 2}
{"id": "rust_1529", "text": "Have some form of destructing if | Having to constantly write code like this: ``` alt optional_value { some (value) { do something; } _ {/*do nothing*/} } ``` Is unnecessary verbose in my opinion, and gets annoying to have to constantly write. I would like to be able to say something like: ``` if (let some(value)  | labels: A-frontend, C-enhancement", "label": "low", "label_id": 3}
{"id": "rust_1530", "text": "rust: task ran out of stack | This program fails under rust as of rev 7e6ce6637e7. I've reduced it a bit, but not hugely - I the issue is the recursive reference to the state tag. I don't know if the program is valid (I've reduced it a lot too). ``` herugrim::~/code/csv $ RUST_LOG=rustc=0,::rt::backtrace rust", "label": "high", "label_id": 1}
{"id": "rust_1531", "text": "core::* listed four times in RUST_LOG=? | ``` Crate log map: core::u64 core::uint core::int core::task core::str std::map::chained std::test std::ebml std::smallintmap std::getopts std::uv std::io core::u64 core::uint core::int core::task core::str rustc::util::common rustc::middle::resolve rustc::back::rpath rustc::midd | labels: A-runtime, E-easy", "label": "low", "label_id": 3}
{"id": "rust_1532", "text": "pretty printer for uints sometimes drops the \"u\" suffix | If I run `rustc --pretty normal` with this input (`tag-disr-val-shape.rs`): ``` // xfail-pretty Issue #1510 tag color { red = 0xff0000; green = 0x00ff00; blue = 0x0000ff; black = 0x000000; white = 0xFFFFFF; } fn main() { assert uint::to_str(red as uint, 10u) == #fmt[\"%?\", red]; a | labels: A-pretty", "label": "medium", "label_id": 2}
{"id": "rust_1533", "text": "Change rustc crate crate_type to \"lib\". Stop passing --lib | The main rustc crate is always used as a library now. To do this we probably want to fix #1444 as well so we don't have to pass --bin when testing. | labels: E-easy, C-cleanup", "label": "low", "label_id": 3}
{"id": "rust_1535", "text": "Crash in shape code during tag comparison | The second comparison crashes. Probably due to weird alignment. ``` tag modlist = [int]; fn main() { let ml = modlist([]); assert ml == modlist([]); assert ml == modlist([]); } ``` ``` ==27842== Thread 2: ==27842== Invalid read of size 8 ==27842== at 0x50FA892: shape::ctxt