Tracking issue for IpAddr | This is a tracking issue for the unstable `ip_addr` feature of the standard library. Some thoughts: - This isn't actually ever used in the system APIs as there's no notion of "an IP address", just an IPv4 or IPv6 address. - We have no stable APIs producing this value. - Some old  | labels: T-libs-api, final-comment-period, B-unstable


Tracking issue for Read::chars | This is a tracking issue for the deprecated [`std::io::Read::chars`](https://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.chars) API. | labels: T-libs-api, B-unstable, C-tracking-issue


Missing snapshots for Bitrig, FreeBSD 32-bit and FreeBSD 64-bit | This issue is for adding the snapshots.


Tracking issue for make_ascii_{upper,lower}case | This is a tracking issue for the unstable `ascii` feature in the standard library. These functions have the somewhat odd naming scheme of `make_*` (not found elsewhere in the standard library). The utility with `&mut str` is also somewhat questionable as there's not a lot of supp | labels: T-libs-api, final-comment-period, B-unstable


Tracking issue for std::dynamic_lib | This is a tracking issue for the unstable `dynamic_lib` feature of the standard library. This module should probably just be made private to the standard library and the compiler rather than being exported for now. A future RFC could decide whether it should be a module in the st | labels: T-libs-api, final-comment-period, B-unstable


Tracking issue for CommandExt::session_leader | This is a tracking issue for the unstable `process_session_leader` feature in the standard library. Added in #26470 some open questions are: - Is there a Windows "equivalent" that should mean this is exposed on `Command` directly? - Is this the best name for the function? Should  | labels: T-libs-api, final-comment-period, B-unstable


thread 'rustc' panicked at 'No def'n found for DefId | I was developing a new module for a small project: ``` rust //tests/command_parser_test.rs #[path="../src/command_parser.rs"] mod command_parser; #[test] fn parses_non_sudo_without_args() { let cmd_str = "ls"; let cmd = command_parser::parse(cmd_str); assert_eq!(cmd.sudo, false); | labels: I-ICE


Spans from serde losing expansion info | https://github.com/Manishearth/scratch/tree/rustc_serde_spans If you run `cargo build` in `poc` there, the `span_lint` shows: ``` Compiling poc v0.1.0 (file:///home/manishearth/sand/bar/poc) src/lib.rs:7:10: 7:19 error: this let-binding has unit value. src/lib.rs:7 #[derive(Seria | labels: A-diagnostics, C-bug


'rustc' panicked at 'assertion failed: slice_layout_is_correct | _caveat_ This is my first bit of Rust and I don't know what I'm doing :wink: This is from the anagram exercism.io exercise. `rustc 1.2.0 (082e47636 2015-08-03)` ``` rust // src/lib.rs pub fn anagrams_for(input: String, inputs: &[str]) -> Vec<&str> { //vec![]; // either this line  | labels: A-debuginfo, I-ICE


macro_rules ICE with bare $crate | Playpen link: http://is.gd/Q53a7T


Floating point modulus has snuck back into the language | Back in https://github.com/rust-lang/rust/commit/1563ea9f278e1e1cd0d21fe8c4fc761805b71964 we decided to remove the `%` operator from floats in the language, relegating the implementations of the `Rem` trait to library calls on the `fmod` and `fmodf` functions. (some discussion in | labels: T-lang


Type inference for closure gets confused without trivial help | The following falls over at the moment, but works with the commented version of the closure: ``` rust fn main() { let f = |&x| x as u64; // <-- doesn't work // let f = |&x: &_| x as u64; // <-- does work test_me0(&f); test_me1(&f); } fn test_me0<F: Fn(&u32) -> u64>(func: &F) -> u | labels: A-type-system, A-closures


ICE while declaring fixed-sized array depending on the item in the same struct | ``` rust struct Generic { pub size: u32, pub data: [u32; Generic::ckSize] } #[test] fn it_works() { } ``` Outputs: ``` error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github. | labels: I-ICE


Tracking issue for UTF-16 decoding iterators | #27808 proposes exposing in `std::char` two iterator adaptors `Utf16Decoder` and `Utf16LossyDecoder`. This functionality was previously only available with an API that require allocation (`String::from_utf16{,_lossy}`) or using the unstable `rustc_unicode` crate directly. They ar | labels: T-libs-api, final-comment-period, B-unstable


fieldless FRU can be used on non-struct-like structs | ## STR ``` Rust struct Foo(u32); fn main() { let x = Foo(42); let _ = Foo { ..x }; } ``` ## Result This compiles and runs. ## Expected This shouldn't compile.


Macro matchers only match when they feel like it | ...or at least that's how much I currently understand, since macros are really counterintuitive sometimes. ``` rust macro_rules! m { ( $i:ident ) => (); ( $t:tt $j:tt ) => (); } fn main() { m!(c); m!(t 9); // why does this work, but not the next case? m!(0 9); // ^ error: expecte | labels: A-macros


Tracking issue for MIR (RFC #1211) | Tracking issue for transition to MIR (rust-lang/rfcs#1211). Relevant discuss thread: https://internals.rust-lang.org/t/transitioning-to-mir/2706 ### Regressions These are cases where building MIR is causing existing crates to stop working. - [x] https://github.com/rust-lang/rust/ | labels: B-RFC-approved, A-MIR


Compiler message improvement | When trying to (erroneously) access members of a tuple using square brackets, rather than a period, the compiler gives the message " error: cannot index a value of type .... ". Particularly as a new user, it would be nice if the compiler could suggest something like "try using th | labels: A-diagnostics


'rustc' panicked at 'assertion failed: `(left == right)` (left: `collections::string::String`, right: `Box<Int>`)', ../src/librustc_borrowck/borrowck/mod.rs:453 | Code to reproduce here: https://github.com/toffaletti/borrow-crash `rustc 1.2.0 (082e47636 2015-08-03)` ``` stack backtrace: 1: 0x103eb47b5 - sys::backtrace::write::hf5ea20500b66cd24uns 2: 0x103ebd013 - panicking::on_panic::hbe02cb0d925cad49iGw 3: 0x103e78dd2 - rt::unwind::begin_ | labels: I-ICE


thread 'rustc' panicked at 'index out of bounds: the len is 60 but the index is 66', ../src/libcollections/vec.rs:1040 | the error reproduced https://github.com/rust-lang/rust/issues/20913 ``` #![feature(plugin)] #![plugin(regex_macros)] extern crate regex; static R : regex::Regex = regex!(r".+"); fn main() { println!("Hello, world!"); } ``` Cargo.toml ``` [package] name = "hello_world" version = " | labels: I-ICE


Vec::reserve and Vec::reserve_exact examples should be differentiated | `Vec::reserve` and `Vec::reserve_exact` are two different methods that do slightly different things - https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.reserve - https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.reserve_exact Right now, both of their e


How to write a generic trait method returning value conforming to the trait? | I've spent several hours trying to get this to work, and no one on IRC seems to have any answers either. Basically, I have a generic trait that I want to apply to a couple different generic structs which should have a method that returns a new, different generic object based on t


f32 "%" is broken on MSVC | ``` rust fn main() { println!("{}", 1.5f32 % std::env::args().len() as f32); } ``` This code doesn't link on MSVC targets. (Sorry if I messed up the testcase; I don't have a Rust install on Windows to test with.)


No single-call way to constant-time move elements in and out of a Vec for pair/triple/etc.-wise operations | This results in some annoying code bloat when trying to mutate two or more vector elements with respect to one another: ``` rust struct A { a: u8, b: u8 } impl A { pub fn do_stuff(&mut self, other: &mut Self) { self.a = other.a % self.b; other.b = self.b % other.a; } } fn main()


Pipe character in rustdoc markdown tables can not be escaped | Attempting to use the pipe symbol in tables in doc-comments does not work as it will be interpreted as a table-separator even when attempting to escape it. Attempts to use html-entities also fails (ie. `|`) and they end up escaped. Example: ``` markdown Test | Table ------|- | labels: T-rustdoc


Cannot impl Drop for a generic type with a Higher-Rank Trait Bound | If I try to compile this program: ``` rust pub trait Foo<'a> {} pub struct Bar<T> where T: for<'a> Foo<'a> { _phantom: ::std::marker::PhantomData<T>, } impl <T> Drop for Bar<T> where T: for<'a> Foo<'a> { fn drop(&mut self) {} } fn main() {} ``` I get this clearly bogus error mess | labels: A-type-system, A-trait-system, A-destructors, T-compiler, C-bug


Change `BTreeMap` to use parent pointers | This will require nodes to have a stable address. CC #26227 @Gankro.


Inconsistent evaluation order for assignment operations | UPDATE: This is fixed by the MIR-based borrow checker and just needs a test. [See the mentoring instructions below.](https://github.com/rust-lang/rust/issues/27868#issuecomment-378392425) --- Currently, the borrow checker thinks that the RHS of `+=` is evaluated before the LHS. t | labels: P-medium, E-mentor, A-borrow-checker, T-lang, I-unsound, A-NLL


`syntax::ast::Expr_::ExprClosure` should have an Expr instead of Block | Currently closures of the form `|a| a * a` are very hard to pretty-print since `a * a` is wrapped in an `ast::Block`, even though there are no curly braces. Match arms contain general sub-expressions, as well. Is there any technical reason why they are treated differently? | labels: A-parser


ABIs are validated before cfg-ing | The ABI string for `extern "..."` is validated while being parsed, meaning one can get errors about in `cfg`'d off modules: ``` rust #[cfg(foo)] mod foo { extern "foo" {} } ``` ``` <anon>:3:12: 3:17 error: illegal ABI: expected one of [cdecl, stdcall, fastcall, aapcs, win64, Rust | labels: T-lang


ICE on impossible trait object/associated type | `````` rust trait Hack: std::ops::Add<Self, Output = Self> + Copy {} fn takes_hack(x: &Hack<Output=i32>) {}``` (which can't work of course) Gives: thread 'rustc' panicked at 'assertion failed: !ty.needs_infer()', ../src/librustc_typeck/lib.rs:152 on playpen's nightly and on an ol | labels: I-ICE


rustdoc does not document the ... in varargs arguments | http://blackbeam.org/doc/libc/funcs/bsd44/fn.ioctl.html shows ioctl as taking two arguments. However, the underlying source at http://blackbeam.org/doc/src/libc/lib.rs.html#6084 shows ioctl as taking variable arguments (...) after those two. rustdoc should show that ... in the ar | labels: T-rustdoc


Segfault in je_rallocx after pushing new value to Vec<u8> causing it to resize | Im getting this very interesting segfault when using with CStrings in a project Im working on. ``` Program received signal SIGSEGV, Segmentation fault. 0x0000555555574551 in je_rallocx () Missing separate debuginfos, use: dnf debuginfo-install fcgi-2.4.0-28.fc23.x86_64 (gdb) bt #


rustc --color=never prints colours | ``` rustc --color=never error: no input filename given ``` the “error:” in the message above is coloured red. | labels: A-frontend


Bitrig x86_64 test failures. | After the new snapshots landed, test failures showed up. | labels: O-x86_64


borrowck cares about field names with disjoint enum downcasts | ## STR This compiles: ``` Rust pub enum Foo { X { foo: u32 }, Y { bar: u32 } } pub fn foo(mut x: Foo) { let mut y = None; let mut z = None; if let Foo::X { ref foo } = x { z = Some(foo); } if let Foo::Y { ref mut bar } = x { y = Some(bar); } drop((y, z)); } fn main() {} ``` If yo | labels: A-borrow-checker


ICE when trying to make a static closure | After some discussing about static closures on IRC, I was messing around and found an ICE: ``` static plus_one: &'static Fn(i32) -> i32 = (&|x: i32| { x + 1 }) as &'static Fn(i32) -> i32; ``` ``` error: internal compiler error: coherence failed to report ambiguity: cannot locate  | labels: I-ICE, A-closures


internal compiler error: literals of different types in range pat | code: ``` fn main() { let i = 5; let index = 6; match i { 0...index => println!("winner"), _ => println!("hello"), } } ``` backtrace: ``` $ RUST_BACKTRACE=1 rustc hello.rs hello.rs:6:13: 6:18 error: paths in constants may only refer to constants or functions [E0014] hello.rs:6 0. | labels: E-needs-test


Rust1.2  Windows7 64bit, rust-openssl issue or a rust-gcc issue | https://users.rust-lang.org/t/i-try-to-build-a-nickel-example-but-gap-at-openssl-sys-0-6-4/2528/5 Please refer to the forum post. We cannot build OpenSSL at Win7 64bit enviroment by Rust1.2 even I have install openssl at C:\OpenSSL-Win64 and set ENV already. Please help to resolv


Small inconsistency with `self`: keyword but sometimes ident | In the following example `self` is accepted as an `ident` in a macro, that is an **identifier**: ``` rust #![allow(dead_code)] macro_rules! foo { ($this:ident) => ($this) } struct Bar; impl Bar { fn bar(self) -> Self { foo!(self) } } fn main() {} ``` [on playpen](http://is.gd/ztU | labels: T-lang


assertion failed: !projection_ty.has_escaping_regions() from astconv | ## STR ``` Rust trait Stream { type Item; } impl<'a> Stream for &'a str { type Item = char; } fn f<'s>(_: &'s str) -> (&'s str, <&'s str as Stream>::Item) { loop {}} fn main() { f as for<'t> fn(&'t str) -> (&'t str, <&'t str as Stream>::Item); } ``` ## ICE ``` thread 'rustc' pani | labels: I-ICE, A-trait-system


Drop skipped on panic | I was working on a patch for @bluss's arrayvec and ran into the following issue. In the code below, I'm trying to keep the `Test` struct from dropping twice even if it panics on drop. If I explicitly drop the `Test` when reading it out of the array (using `ptr::read`), everything


Tracking issue for drop_in_place | This calls the "drop glue" for a given type without having to explicitly read it out onto the stack to be dropped. All types have a drop glue implementation, which involves calling the types Drop impl (if it exists), and the recursively running drop glue on its fields. drop_in_pl | labels: T-libs-api, final-comment-period, B-unstable


Write nomicon dot-operator section | https://doc.rust-lang.org/nightly/nomicon/dot-operator.html


Write nomicon Implementing Arc and Mutex chapter | https://doc.rust-lang.org/nightly/nomicon/arc-and-mutex.html


Rewrite nomicon references section | https://doc.rust-lang.org/nightly/nomicon/references.html This involves solving the incredibly difficult question of "what on earth are Rust's True Pointer Aliasing Rules". CC @aturon @arielb1 @nikomatsakis @pnkfelix @sunfishcode


Book: "Prelude" explanation could be more prominent/thorough | "Prelude" doesn't seem to be a very common term outside of Haskell, yet it seems to only be explained in the Guessing Game section of the book. Even then, it only mentions it being the stuff imported by default, which doesn't explain `std::io::prelude`.


Broken MIR with const match | ### empty_and_catchall ``` rust fn empty_and_catchall(raw: &[u8]) { let mut iter = raw.split(|&b| b == b'/'); let first = iter.next().unwrap(); let second = iter.next(); const EMPTY: &'static [u8] = b""; match (first, second) { (EMPTY, Some(EMPTY)) => (), _ => (), } } fn main() { | labels: I-ICE, C-bug


Cargo: produce deterministic filenames for  `build --test` and `test --no-run` | I'm doing IDE integration, and I want my IDE to be able to debug the test binaries - for which the IDE has to launch those programs itself, it shouldn't use `cargo test`. However (unlike `--bin`for example) neither `build --test` nor `test --no-run` produce a deterministic filena


compiler crash on stable, beta, nightly | ``` rust struct Sched { i: i32, } impl Sched { extern "C" fn get(self) -> i32 { self.i } } fn main() { let s = Sched { i: 4 }; let f = || -> i32 { s.get() }; println!("f: {}", f()); } ``` stable/beta: ``` Stored value type does not match pointer operand type! store { i64 } %0, i3 | labels: I-ICE


Not possible to get pid and stdout on a spawned process | Using the unstable Child `.id()` API it does not seem possible to both get the PID and stdout. I have created reproducible code and output [here](https://gist.github.com/joewilliams/7516a093e192adf72af2). I believe this may be due to the use of `.spawn()` and `.wait_with_output()


dining philosophers does not actually exhibit deadlock | In the Dining Philosophers doc page, the `eat` function is implemented: ``` fn eat(&self, table: &Table) { let _left = table.forks[self.left].lock().unwrap(); let _right = table.forks[self.right].lock().unwrap(); println!("{} is eating.", self.name); thread::sleep_ms(1000); print


Binary releases of Rust targeting musl | The [Rust 1.1.0 blog post](http://blog.rust-lang.org/2015/06/25/Rust-1.1.html) said that nightly binary releases of Rust using musl instead of glibc on Linux were coming. I am not spotting any in [this distribution index](https://static.rust-lang.org/dist/index.html). Is this sti


Improve book support for windows | https://doc.rust-lang.org/stable/book/testing.html could be improved by mentioning `echo %errorlevel%` for use in Windows. Perhaps an appendix for Windows?


from_raw_parts needs an equivalent for dynamically-sized structs | There's no good way to generate a non-raw pointer to a struct with a DST in tail position, which would handy for some FFI use cases involving flexible array members and the like. You can fake it in stable Rust, but only by abusing `transmute`: ``` rust struct PascalString<T: ?Siz | labels: T-lang


Changing the type of self in methods doesn't work | The book states: > Methods take a special first parameter, of which there are three variants: `self`, `&self`, and `&mut self`. The reference uses typed self in a few places, but doesn't explain the exact rules. The compiler also prints redundant and misleading diagnostics: ``` r | labels: A-diagnostics, T-lang, C-feature-request


DestructionScopeData can leak into error messages | ``` Rust pub trait Resources<'a> {} pub trait Buffer<'a, R: Resources<'a>> { fn select(&self) -> BufferViewHandle<R>; // should be BufferViewHandle<'a, R> } pub struct BufferViewHandle<'a, R: 'a+Resources<'a>>(&'a R); fn main() {} ``` Post-RFC1214, this gives the not-particularly | labels: A-diagnostics


Code in E0139 explanation is not valid anymore | ``` let result: SomeType = mem::uninitialized(); unsafe { copy_nonoverlapping(&v, &result) }; result // `v` transmuted to type `SomeType` ``` std::ptr::copy_nonoverlapping takes 3 arguments, but only 2 are provided. It also does not typecheck anymore either. | labels: E-easy


`==` operator does not support subtyping | Here's an example showing this behavior: ``` rust struct Input<'a> { foo: &'a u32 } impl <'a> std::cmp::PartialEq<Input<'a>> for Input<'a> { fn eq(&self, other: &Input<'a>) -> bool { self.foo == other.foo } fn ne(&self, other: &Input<'a>) -> bool { self.foo != other.foo } } // sa | labels: E-easy, E-needs-test


Can `derive` be smarter about lifetime parameters? | briansmith on IRC ran into trouble using `#[derive(PartialEq)]` on a struct with a lifetime parameter. See the code at http://is.gd/R6Jx2x which fails with: ``` <anon>:8:59: 8:65 error: cannot infer an appropriate lifetime for lifetime parameter `'a` due to conflicting requiremen | labels: A-syntaxext


Compiler panic on std::str::FromStr::Err import | I receive a panic in the compiler when attempting to build the following code. I am just learning rust so I have no idea if this could would actually work, but I am assuming it should not panic. I tried this code: ``` rust use std::str::FromStr::Err; fn main() { } fn usage_error(


cfail tests do not check for unexpected errors on windows | Currently the cfail test runner works by parsing rustc's stderr, and scanning the output for errors/warnings. It uses the pattern `<filename>:<line>:<col> [error|warning]` to check whether a line of output is an unexpected error. This never succeeds on windows, because absolute p | labels: O-windows


Trait object lifetime issues | The following code seems like it should typecheck fine, but doesn't. ``` rust struct S; trait T { } impl AsRef<T> for S { fn as_ref(&self) -> &T { unimplemented!() } } ``` `error: method `as_ref` has an incompatible type for trait: expected bound lifetime parameter , found concre | labels: A-diagnostics


ICE: creating trait object with function that has stricter bounds on associated type. | ``` rust use std::marker::PhantomData; pub trait Filterable { type Filter; } pub trait ComponentMapper { type Component; fn entities_filtered(&self, <Self::Component as Filterable>::Filter) where Self::Component: Filterable; } pub struct VecMapper<T> { _marker: ::std::marker::Pha | labels: I-ICE


ICE when creating a trait object with fn with additional bounds on associated items | ``` rust use std::marker::PhantomData; pub trait Filterable { type Filter; } pub trait ComponentMapper { type Component; fn entities_filtered(&self, <Self::Component as Filterable>::Filter) where Self::Component: Filterable; } pub struct VecMapper<T> { _marker: ::std::marker::Pha


Any trait documentation mentions non-existing methods | In the paragraph about the [any module](https://doc.rust-lang.org/stable/std/any/index.html): > Any itself can be used to get a TypeId, and has more features when used as a trait object. As &Any (a borrowed trait object), it has the is and **as_ref** methods, to test if the conta


Tests output without color when RUST_TEST_NOCAPTURE=1 is set | Is it design so or a bug? platform:win7 x64 rustc 1.2.0 (082e47636 2015-08-03) tests output with color: ![color](https://cloud.githubusercontent.com/assets/4688041/9428055/5916ee66-49ce-11e5-8003-adec646282ac.png) after set RUST_TEST_NOCAPTURE=1 in console tests output without co


Link error when a public module exposes types from a private module | Compilation of: ``` rust mod privmod { pub struct HiddenType; impl HiddenType { pub fn hidden_method(&self) { } } } pub mod pubmod { use privmod; pub fn expose() -> privmod::HiddenType { privmod::HiddenType } } pub use pubmod::expose; ``` produces the warning: > warning: method i


Note where implicit Sized requirement comes from | I was not aware that `Sized` is a default requirement for type parameters, so I was very confused why [this code doesn't compile](https://play.rust-lang.org/?code=%0Atrait%20OopsSized%3CO%20%2F*%20missing%20%3A%20%3FSized%20*%2F%3E%20%7B%0A%20%20%20%20fn%20observers%28%26self%29% | labels: C-enhancement, A-diagnostics, T-compiler, D-newcomer-roadblock


No way to timeout when receiving from a Receiver | It apparently used to be possible to timeout on `Receiver::recv` by using a `Timer` and `select!`. Now that `Timer` is gone, that's not possible. Either something like `Timer` should be re-introduced, or something similar to `Receiver::try_recv` could be added which accepts a tim


macro_rules cannot expand `concat!(...)` into a variant arm | Here is a reduced example of the bug: ``` rust macro_rules! foo { ($key:expr) => { match "foobar" { $key => "", _ => "", } } } fn main() { foo! { concat!("foo", "bar") }; } ``` This errors with: ``` foo.rs:4:13: 4:17 error: unexpected token: `concat!("foo" , "bar")` foo.rs:4 $key | labels: A-macros, C-feature-request


Type parameters not allowed on Result | ``` rust fn main() { let () = Result::<(), ()>::Ok(()); //let () = Result::Ok::<(), ()>(()); // <-- This is what I meant to do } ``` gives: ``` <anon>:2:23: 2:25 error: type parameters are not allowed on this type [E0109] <anon>:2 let () = Result::<(), ()>::Ok(()); ^~ ``` This is | labels: C-enhancement, A-diagnostics


set_var/remove_var are unsound in combination with C code that reads the environment | Like the documentation for our `set_var` (setenv) says, care must be taken with mutating environment variables in a multithreaded program. See [this glibc bug #13271](https://sourceware.org/bugzilla/show_bug.cgi?id=13271) that says getaddrinfo may call getenv. It looks like we ha | labels: A-concurrency, P-medium, I-unsound, C-bug, E-needs-mcve, T-libs


std::net::AddrParseError doesn't implement std::error::Error | I was writing a generic argument parse validator for my program, which involved matching errors from FromStr::parse. After constraining the error type to Error, I ran into an issue when creating a validator for parsing IP addresses: ``` main.rs:48:24: 48:47 error: the trait `std:


Supply snapshot source tarballs for src/snapshots.txt | It would be great if, in addition to the nightly tarballs, there were .tar.gz's for every snapshot listed in `src/snapshots.txt`. This would make snapshot creation on e.g. DragonFly simpler, as it could be more easily integrated into the ports system, which do not like fetching s


Fix a number of `run-make` tests on MSVC. | Due to the way MSYS sandboxes file paths, paths passed to `cl.exe` are expanded into values which are invalid outside of MSYS. | labels: A-testsuite, O-windows


the compiler unexpectedly panicked with message "no type for node" | $ RUST_BACKTRACE=1 rustc bug.rs ``` error: internal compiler error: no type for node 17: pat _ (id=17) in fcx 0x7ff96bbf0100 note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING | labels: I-ICE, E-needs-test, C-bug


Lifetime in trait method declaration affects RFC 1214 checks | ``` rust trait Test { fn f<'a>(&self) where PartialEq<i32> : std::fmt::Display {} } trait Test2 { fn f<'a>(&self) where (PartialEq<i32> + 'a) : std::fmt::Display {} } fn main() { } ``` Currently, Test1 triggers an "error", but Test2 doesn't. I would expect them to be treated the  | labels: A-lifetimes, A-trait-system, P-low, T-lang, C-bug, T-types


ICE on trait with mixed lifetimes | This code generates ``` rust trait Y<'a>: Sized { fn f(&'a self) { } fn g(&self) where Self: for<'r> Y<'r> { self.f(); } } ``` this ICE ``` txt <anon>:6:14: 6:17 error: internal compiler error: coherence failed to report ambiguity: cannot locate the impl of the trait `Y<'_>` for  | labels: I-ICE


Incorrect error message when attempting to access field on struct constructor | [playpen](http://is.gd/rb25Yu) ``` rust struct MyStruct { field: u8 } fn main() { MyStruct.foo; } ``` results in ``` <anon>:4:5: 4:13 error: `MyStruct` is the name of a struct or struct variant, but this expression uses it like a function name [E0423] <anon>:4 MyStruct.foo; ^~~~~ | labels: A-diagnostics


ToOwned is implemented for all reference types | This occurred while trying to convert instances of `str.to_string()` to `to_owned()`. When the receiver is of type `&&str` (or `&&&str`, etc.) this will "mysteriously" fail to work since you get back a `&str`. The reason seems to be that the general implementation of `ToOwned` fo


IntoIterator not implemented for &Option and &Result | To be consistent with Vec and other collections, shouldn't these types also get the IntoIterator impls for `&T` and `&mut T`?


trans monomorphizes dtors that have a different parameter order wrong | ## STR ``` Rust use std::fmt; struct T2<U,V: fmt::Display>(U,V); impl<V: fmt::Display, U> Drop for T2<U,V> { fn drop(&mut self) { println!("{}", self.1); } } fn main() { let _ = T2((), 1); } ``` ## Expected result Should print `1` (or fail to compile) ## Actual result ``` <anon>: | labels: I-ICE


"Could not compile `advapi32-sys` on a network-mapped drive | I attempted to run the command: cargo build --verbose and got the following error: ``` powershell PS Q:\projects\hello_world\src> cargo build --verbose Compiling advapi32-sys v0.1.2 Running `rustc C:\Users\<name>\.cargo\registry\src\github.com-0a35038f75765ae4\advapi32-sys-0.1.2\ | labels: I-ICE, T-compiler, C-bug


No terminal color with Git for Windows 2.5 (mintty.exe) | I am using 1.3 beta and previously was using Git for Windows 1.9.5 with the msys terminal. Rustc output had pretty colors, but then today I upgraded to Git for Windows 2.5, which includes the mintty.exe replacement terminal (w/ bash shell). The terminal itself has colored text, s


placing large array inside Box causes stack overflow | I was trying to store a large array on the heap, the code produced a run-time error of stack overflow. ``` rust fn main() { let x = Box::new([0; 10_000_000]); } ``` I expected the array to be initialised on the heap. Instead it seems, the array is being initialised onto the stack


Friendlier compiler message for incorrect trait method signatures | When implementing a trait, it would be useful to see the expected method signature in compiler error messages. Example ``` impl std::fmt::Display for MyType { // Not sure what to put here so I stub it and hope to get help from error fn fmt() -> () { } } ``` The current error mess | labels: A-diagnostics


i32::pow only handles overflow up to an exponent of 1023 | Playpen: http://is.gd/zhwksu ``` rust fn main() { let x: i32 = 2; println!("{}", x.pow(1024)); println!("{}", x.pow(1023)); } ``` Prints: ``` 0 thread '<main>' panicked at 'arithmetic operation overflowed', ../src/libcore/num/mod.rs:550 ``` Interestingly, this only seems to happe


mod names that collide with primitive types should link to primitive type docs | A (personal) user experience: While looking for matching functionality on `str`, I went to the following link: - `mod str`: https://doc.rust-lang.org/std/str/index.html - note that this is distinct from primitive `str`: https://doc.rust-lang.org/std/primitive.str.html - you may n


windows-msvc builds very fragile | `./configure` for -msvc freely interchanges between windows/msys commands, which results in it being quite fragile: it's a good idea to treat msys as a purely unix-like environment, and then have a single escape-hatch to execute windows commands (eg. via cmd). Ways this can curre | labels: O-windows


make check fails on c-dynamic-dylib on windows | Running make check fails with this error message when run in on windows. ``` ------ stderr --------------------------------------------- error: linking with `gcc` failed: exit code: 1 note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-static | labels: O-windows, T-bootstrap, C-bug


Generic type defaults should not be allowed if they don’t satisfy type constraints | As spotted in [this internals thread](https://internals.rust-lang.org/t/interaction-of-user-defined-and-integral-fallbacks-with-inference/2496/23?u=nagisa): ``` rust use std::fmt::Debug; struct Foo; fn show<T: Debug = Foo>(t: T) { println!("{:?}", t) } ``` compiles. Lack of early | labels: A-type-system, P-medium, T-lang, C-bug


[MSVC] Rustc is producing inappropriate filetypes w/ `--crate-type=dylib` && `--crate-type=staticlib`. | For example: ``` sh /C/msys64/home/Richard/rust-build/x86_64-pc-windows-msvc/stage2/bin/rustc.exe --out-dir /C/msys64/home/Richard/rust-build/x86_64-pc-windows-msvc/test/run-make/output-type-permutations -L /C/msys64/home/Richard/rust-build/x86_64-pc-windows-msvc/test/run-make/ou


Implement new semantics for lines(), deprecate lines_any() | Tracking issue for https://github.com/rust-lang/rfcs/pull/1212 | labels: B-RFC-approved, T-libs-api


ICE - 'path not fully resolved' with type alias to an array type with undefined size | It appears that when a type alias to array type which uses an undefined constant for it's size is defined, the compiler crashes. I have only been able to reproduce this with the constants defined in uint modules. This code ``` rust // This line prevents the crash // use std::usiz


Anomalous unstable feature annotations | After submitting #28031, I ran a [script](https://gist.github.com/durka/a5243440697c780f669b) on the rest of src/ and I found several feature annotations that seem anomalous. A few I thought were obvious and I submitted another PR #28038. This short list contains the ones that I'


Panic in libsyntax/ext/quote.rs | Using a macro argument (e.g. $x) inside of quote_expr! causes an internal compiler error. ## Testcase ``` #![feature(quote)] fn main() { macro_rules! foo { ($bar:expr) => {{ quote_expr!(cx, { $bar }) }} } foo!(0); } ``` ## Meta `rustc --version --verbose`: rustc 1.5.0-nightly (32 | labels: I-ICE


Can't expand macro inside slice pattern | ``` rust #![feature(slice_patterns)] macro_rules! m { () => ( c.. ); } fn main() { match [0, 1, 2] { [ c.. ] => {} [ m!() ] => {} } } ``` Gives this error: ``` <anon>:4:14: 4:16 error: macro expansion ignores token `..` and any following <anon>:4 () => ( c.. ); ^~ <anon>:10:11: 1 | labels: A-macros


Set recovery methods | Tracking issue for https://github.com/rust-lang/rfcs/pull/1194 cc https://github.com/rust-lang/rust/pull/28043 | labels: T-libs-api, final-comment-period, B-unstable


FFI guide should be more explicit about the libc crate | https://doc.rust-lang.org/book/ffi.html#interoperability-with-foreign-code in general says > The standard library includes type aliases and function definitions for the C standard library in the libc module, Which is wrong. Reported in https://news.ycombinator.com/reply?id=101327


Inconsistency in type checking where clauses in trait definition | In this example, function `f` compiles, but `g` does not. To make `g` compiles it's necessary to repeat the `C` definition bound. For function `f` this is not necessary. This seems to be an inconsistency. ``` rust trait A { fn a(&self); } trait B where Self: A { fn b(&self); } tr


Add a toc to each std lib generated pages | Long pages such as in [regex](http://doc.rust-lang.org/regex/regex/index.html) have many examples but it's difficult to know at a glance what the documentation contains without scanning the entire document. Having a table of contents would help a lot with this. Here is a list of  | labels: T-rustdoc, C-enhancement, T-dev-tools


Better document that process::exit does not result in a clean shutdown | The documentation states `If a clean shutdown is needed it is recommended to only call this function at a known point where there are no more destructors left to run.`, however simply running it when no more destructors are left to run does not guarantee a clean exit. For example


Rename Rust to be less discriminatory towards noble metals | Rust should be renamed to something which does not discriminate against noble metals. Not all metals corrode, such as ruthenium, rhodium, palladium, silver, osmium, iridium, platinum, and gold, and yet they still make significant contributions to society and thus should not be ig


match String as str inside enum | I've confused by this matching: ``` rust enum E { Container(String) } fn main() { let e = E::Container(String::from("data")); match e { E::Container("data") => println!("Match"), _ => println!("No match"), } } ``` Error: ``` rust <anon>:9:22: 9:28 error: mismatched types: expecte


No verification on intrinsic function number of arguments | The following code will compile: ``` Rust #![feature(repr_simd, platform_intrinsics)] #[repr(simd)] struct f64x2(f64, f64); extern "platform-intrinsic" { fn x86_mm_movemask_pd(x: f64x2, y: f64x2, z: f64x2) -> i32; } ``` but it shouldn't because the function takes only one `f64x2`


Document use _ as _ syntax | /u/DroidLogician on reddit [mentioned](https://www.reddit.com/r/rust/comments/3ink8q/is_there_a_way_to_include_a_crate_that_shares_a/cuifk8p) that the `use _ as _` syntax is undocumeted, at least in the crates and module chapter of TRPL. @steveklabnik, this seems like your territ


rt::atexit callbacks don't run after exit(0) call | Specifically, the stdout buffer doesn't flush: from #28058: > `fn main() { print!("Hi!"); }` results in "Hi!", `fn main() { print!("Hi!"); std::process::exit(0); }` results in no output. We should probably just be using libc atexit here. cc @alexcrichton


Building coreutils with LTO causes LLVM error | Building [coreutils](https://github.com/uutils/coreutils) with LTO: ``` make ENABLE_LTO=y ENABLE_STRIP=y ``` causes the following error: ``` ... rustc -O -L /Users/gustavo.hexsel/Dev/coreutils/build/ -C lto --extern uufalse=/Users/gustavo.hexsel/Dev/coreutils/build/libfalse.rlib  | labels: A-linkage, A-LLVM


`include!`ed files are unable to #[macro_use] | This makes using codegen a bit more cumbersome. What happens: `main_real.rs`: ``` // main_real.rs: #[macro_use] extern crate log; fn main() { info!("Hi!"); } ``` `main.rs`: ``` include!{"main_real.rs"} ``` `Cargo.toml`: ``` [package] name = "macro-use-include" version = "0.1.0" a | labels: A-macros


Types do not expand hygienically in macros that create modules | If I take a macro parameter of type `ty`, and in the macro I create a module and expand `ty` within that module, the name of the type is parsed within the module, not within the context of the macro, which subtly breaks hygiene. For instance ([playpen](http://is.gd/yNseM4)): ```  | labels: P-low, A-macros


Read::bytes() is a performance trap | ``` rust use std::fs::File; use std::io::Read; use std::io::BufReader; fn main() { let f = File::open("/usr/share/dict/words").unwrap(); let f = BufReader::new(f); let mut count = 0; for b in f.bytes() { if b.ok() == Some(b'a') { count += 1 } } println!("{}", count); } ``` On my


Read::bytes() and Read::chars() iterators should ignore Interrupted errors | https://github.com/rust-lang/rust/blob/fd302a95e1197e5f8401ecaa15f2cb0f81c830c3/src/libstd/io/mod.rs#L1549 etc.; `Interrupted` errors should be ignored here for the same reason they are ignored with `BufRead::lines()`. | labels: T-libs-api


`use` of unstable function is not gated in import list | This compiles on stable: `use std::thread::{catch_panic};` but this does not: ``` use std::thread::catch_panic; error: use of unstable library feature 'catch_panic': recent API addition ``` Fortunately, I can't find a way to actually use the import anyway, but it's a stability tr | labels: E-easy, P-high, T-libs-api


Show library version number in the rust doc | When I read the documentation of the rust standard library from google, I don't know to which version of rust it refers. It could be great to have a footer with the version and a text which appear when we put our cursor on the rust logo which display the version of the library th


Document the rules for `extern crate` in doc tests | It's not clear from the documentation how to use external crates in doc tests. This should be documented in the testing section of the book. This is related to rust-lang/cargo#960.


Local ambiguity in macro *definition* | ``` rust macro_rules! m { () => ();; } ``` ``` <anon>:2:14: 2:15 error: local ambiguity: multiple parsing options: built-in NTs tt ('lhs') or 1 other options. <anon>:2 () => ();; ^ ``` (the equivalent of `$( $lhs:tt => $rhs:tt );+ $(;)*` is used to parse macros) This leaks "lhs", | labels: A-diagnostics, A-parser, A-macros, T-compiler, C-bug, D-confusing


Macros accept empty repetitions which hang the compiler | This causes an infinite loop: ``` rust macro_rules! m { ( $()+ ) => (); } m!(); ``` | labels: A-macros


rustc panic with docopt_macros | Compiling the following `main.rs` with `rustc` d877e6540 (driven by rust-lang/cargo@1b902d4): ``` rust #![feature(plugin)] #![plugin(docopt_macros)] docopt!(Args, " Usage: foo (--help | --version) Options: -h, --help Show this message --version Show the version of foo "); ``` I g | labels: I-ICE


no_debug and omit_gdb_pretty_printer_sections attributes exist and are ungated | This compiles without a peep from the compiler: ``` rust #[no_debug] #[omit_gdb_pretty_printer_section] fn main() {} ``` The later especially seems to be purely designed for the rust testsuite, so should probably be feature gated. (Nominating for more discussion and some sort of  | labels: E-easy, A-attributes, P-medium, E-mentor, A-stability, T-compiler


Weird lifetime error with closure and early-bound lifetime | ``` rust struct S; impl S { fn f<'a:'a>(_x:&'a i32) {} } fn main() { let g1: &Fn(&i32) = &|x| S::f(x); g1(&1); let g2 = &|x| S::f(x); g2(&1); } ``` ``` <anon>:9:9: 9:10 error: borrowed value does not live long enough <anon>:9 g2(&1); ^ <anon>:8:27: 10:2 note: reference must be va | labels: C-enhancement, A-lifetimes, A-closures, fixed-by-NLL


Private `Recover` trait is visible in `BTreeMap` docs | It shows up on https://doc.rust-lang.org/nightly/std/collections/struct.BTreeMap.html and https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.BTreeMap.html, but not on https://doc.rust-lang.org/nightly/collections/struct.BTreeMap.html or https://doc.rust-lang.org/n


`fs::read_link` on OS X removes the root, returning an invalid path. | The [documents](http://doc.rust-lang.org/nightly/std/fs/fn.read_link.html) are not very clear about what it should return but I have to guess it should be an absolute path: ` Reads a symbolic link, returning the file that the link points to. ` It should say "(absolute) path to th


Report same/similar errors only once | It seems that https://github.com/rust-lang/rust/issues/20692 is not only a case for duplicate error messages as shown by ``` rust fn main() { let array = [1, 2, 3]; for a in array { println!( "{}", a); } } ``` Which print the error 3 times. It is the same as the other case about  | labels: A-diagnostics


ICE at static boxed mutable function | I tried this code: ``` rust static no_op : Box<FnMut(i32)> = Box::new(move |_| { }); fn main() { } ``` I expected it to compile cleanly or give me a helpful error. Instead, it gave me a helpful error and then an ICE: ``` src/bug_repro.rs:1:34: 1:56 error: function calls in static | labels: I-ICE


Update Rustonomicon to mention contravariance | [Claiming that rust does not use contravariance in its type system](https://doc.rust-lang.org/nightly/nomicon/subtyping.html#variance) seems to be an error. The Rustonomicon should be updated. I've already been confused enough since I took the "it does not exist" as a fact. Quoti | labels: A-type-system


ICE: constant expression should not reach expr::trans_def | Code that reproduces the ICE: ``` rust fn main() { std::u8::MAX; } ``` ``` <anon>:2:5: 2:18 warning: path statement with no effect, #[warn(path_statements)] on by default <anon>:2 std::u8::MAX; ^~~~~~~~~~~~~ <anon>:2:5: 2:17 error: internal compiler error: constant expression sho | labels: I-ICE


Bad span assigned to continue keyword | The break expression span contains its keyword, but the one for continue does not: http://is.gd/phbWGX cc https://github.com/nrc/rustfmt/issues/184


continue and break keyword related errors invalidly include the next token into span | Once https://github.com/rust-lang/rust/issues/28105 is fixed, there’s still an issue of both `continue` and `break` keyword spans including a token after the keyword into a span. e.g. for ``` rust fn main() { break } ``` span includes the closing brakcet ``` <anon>:1 fn main() {


use of undeclared label error message has a wrong span | It includes both the `break`/`continue` keywords as well as the label name, when only the label should be spanned: e.g. ``` <anon>:1:13: 1:22 error: use of undeclared label `'a` <anon>:1 fn main() { break 'a; } ^~~~~~~~~ ```


chars() iterator no longer compiling | Back a couple weeks ago, I had a program with this code here: ``` rust for ch in msg.chars() { if !ch.is_alphabetic() { continue; } let s = caesar_shift(ch, key); e.push(s); } ``` This code compiled just fine, where msg is an `&str` parameter to the function in question. Now, hav


Windows TLS destructors don't run in a statically linked binary | On `-msvc` TLS destructors do not appear to be run at all. On `-gnu` TLS destructors appear to run when a non-main thread exits (as expected) or `std::process:exit` is called (es expected), but not run when main thread is terminated normally (by returning from `fn main`; not expe | labels: O-windows


Should we default to jemalloc on OpenBSD, FireflyBSD and Bitrig? | Supported since [jemalloc 4.0](https://github.com/jemalloc/jemalloc/releases/tag/4.0.0)


ICE in rustc from function call in RHS of const definition | I tried this code: ``` const X: u8 = || -> u8 { 5 }(); ``` I expected to see this happen: Either a compilation error, or to be equivalent to const X: u8 = 5. Instead, this happened: Internal compiler error ## Meta `rustc --version --verbose`: ``` rustc 1.4.0-nightly (20a8412e0 20 | labels: I-ICE


LLVM ICE using maud and iron | Reproduction: https://gist.github.com/anonymous/ecaa67ead6b561fb8d39 The full error from `cargo build`: ``` Compiling iron-maud v0.1.0 (file:///Users/reem/code/iron/iron-maud) Global is external, but doesn't have external or weak linkage! i8 (%closure.66*, i8*, void (i8*)**)* @_Z


Operator bound breaks type inference | I would expect this to compile, but it doesn't: ``` use std::ops::{Mul}; pub fn calc<X>(x: X) -> f64 where f64: Mul<X, Output=X> { 2. * 3. } fn main() { } ``` https://play.rust-lang.org/?gist=4c8550ad70d41976729f&version=nightly In math the convention is to write scalar-vector mu | labels: A-trait-system


simplify CFG_FILENAME_EXTRA | I'm wondering what is the rationale behind the hash values appended to the shared objects generated by `rustc` (and `cargo` too apparently, but filing only here for now.) At first I thought the hash was of some file contents, to ensure that unstable stuff doesn't get linked to. b


Extend unused_parens lint to cover plain range literals | For example match `for x in (1..10) { .. }`, but not `for x in (1..10).step_by(2) { .. }`, because in the latter case, the parenthesis are actually needed. This should match expression nodes against `ExprParen(ref inner)` where `inner.node` is a `ExprRange(..)`, and the parent no | labels: A-lints


Multi-span reporting feature | For some lints, the user experience would be greatly enhanced if we could report a span with multiple highlights. E.g. in a unicode lint, we currently report every matching unicode sequence within a string, which can be _very_ verbose. To reduce the clutter, it would be great if  | labels: A-diagnostics


Methods behind a feature gate are still visible to the compiler even when the feature is not on | When a new trait method is found behind a feature gate (such as the `read_exact` method of `io::Read`, which is behind the correspondingly named feature) `rustc` will see the method in scope even if the feature has not been explicitly turned on for the crate. This causes a proble | labels: A-stability, T-compiler


Command::{spawn, status, output} take &mut self unnecessarily | All three are used to actually run the command, and simply delegate to `spawn_inner`, which only requires `&self`. This is confusing because it appears that a `Command` is intended to be reusable, but taking a `&mut self` prevents the command being shared, and suggests that a pas


Incorrect/missing symbol names on msvc backtraces | Symbol names are not properly supported yet on msvc, so backtraces are generally unhelpful. As a result, `run-pass/backtrace.rs` is currently disabled. This issue can be closed when it's been reenabled. | labels: O-windows


#![test] on a crate has an... interesting effect | ``` <anon>:1:1: 1:4 error: unresolved import `std::prelude::v1::*`. Maybe a missing `extern crate std`? <anon>:1 #![test] ^~~ error: aborting due to previous error ``` | labels: E-needs-test, C-bug


HIR: tracking issue for HIR-related things. | Initial landing: #28138 | labels: metabug, T-compiler, A-HIR


HIR: move desugaring to lowering step | Desugaring `if let`, `while let`, and `for` should move to the lowering step, rather than being part of macro expansion. | labels: A-HIR


HIR: unify literals and attributes | We freely convert between the AST and HIR versions, I don't think there is any point in there being two versions, so we should just use the AST ones everywhere. | labels: A-HIR


HIR: delete the AST after lowering | Unless a tool wants to keep it around. This will require some work on lints to separate AST lints from HIR lints. | labels: A-HIR


HIR: cache lowering info | Lowering is O(n) in the number of nodes reached, so could take a while if it happens often (it doesn't at the moment, but could in the future). It might make sense to cache the lowering step, so we can cheaply go from AST to HIR. This is probably most important for tools, rather  | labels: A-HIR


HIR: remove ids from the AST | I think only the HIR needs ids. | labels: A-HIR


HIR: separate AST and HIR lints | Lints are a pain at the moment because they operate on the AST but need type info which belongs to the HIR. We should have two kinds of lints - purely syntactic ones which operate on the (expanded) AST and run early (before AST->HIR lowering) and ones which can access type info a | labels: A-HIR


Tracking issue for BinaryHeap::{push_pop, replace} | # Updated issue Tracking issue for - `BinaryHeap::push_pop` - `BinaryHeap::replace` # Original Report std::collections::BinaryHeap has a bunch of unstable methods without proper stability markings; filing an issue to point them at. Someone please label this B-unstable. | labels: T-libs-api, final-comment-period, B-unstable


thread 'rustc' panicked at 'assertion failed: `(left == right)` (left: `...`, right: `...`)', ../src/librustc_borrowck/borrowck/mod.rs:453 | Trying to compile a project of mine via `cargo run` leads to an assertion failure in the borrow checker. The code I introduced that triggered it is in `src/zipper.rs`, function `take` beginning line 86. The code might be a bit nonsensical, since I was just fighting the borrow che | labels: I-ICE


Unable to compile tests due to compiler panic | While trying to compile crate test code using `cargo test` the compiler panics. The code is public and the causing commit can be found [here](https://github.com/b52/cogset/commit/73cf6ffd6ce87464df75440ccd064615a60f8afc). The output of the corresponding travis build can be seen [ | labels: I-ICE


unused type params on fn lead to difficult to deciper errors at call site | Consider code like this ([playpen](http://is.gd/PxabmK)): ``` rust fn add3<T>(x: i32) -> i32 { x + 3 } fn main() { println!("add3(4): {}", add3(4)); } ``` The Rust compiler currently rejects the above, because it cannot infer what type to assign to the type parameter `T` in the a | labels: A-diagnostics


Implement the trait debug for std::collections::BinaryHeap | If I run the following code : ``` rust use std::collections::BinaryHeap; #[derive(Debug)] pub struct MyStruct { bh: BinaryHeap<i32>, } fn main() { let m = MyStruct { bh: BinaryHeap::new(), }; } ``` I get the following error : ``` rust test.rs:6:2: 6:21 error: the trait `core::fmt


Expected compile error because bad use of semicolon | Actual result compile and output "bogus" Code: https://pastebin.mozilla.org/8844697 rustc 1.4.0-dev (7b7fc67dd 2015-08-13) | labels: A-parser, T-lang


bad span: generics ending with `>>` | ``` #[derive(Copy, Clone)] pub struct StdCounter<T: Zero + Add<T, Output = T> + Sub<T, Output = T>> { pub value: T } ``` Apparently, inserting a space between the `>>` fixes the issue. | labels: A-parser


Avoid adding drops for types w/ no dtor in MIR construction | The MIR code currently adds drops for all types that are not `Copy`, even if we can see that there is no destructor (e.g., `struct Foo(u32)`). This is relatively harmless (trans ignores such types) but it means more memory alloc etc than necessary. See associated FIXME. | labels: A-MIR


Settle execution order uncertainty for `+=` | When translating something like `a += b` to MIR, an uncertainty arose about what the semantics of ``` a = 0; a += { a = 22; 2 } ``` ought to be. Should resulting value of `a` be `24` or `2`, basically? The current MIR yields 24, on the basis that this is more-or-less what will ha | labels: P-medium, T-lang, A-MIR, C-tracking-issue


PartialOrd documentation is misleading | The documentation for `cmp::PartialOrd` states that "if `a < b` then `!(a > b)` and vice versa", but the "vice versa" is somewhat misleading here since `!(a > b)` doesn't imply `a < b` if e.g. either of the values is a NaN float. The author probably wanted to say that `a > b` als


functional struct : no documentation | Consider the following code : ``` rust struct MyStruct; fn main() { let var = MyStruct {}; } ``` The following error message appear : ``` example.rs:4:24: 4:25 error: structure literal must either have at least one field or use functional structure update syntax example.rs:4 let  | labels: A-diagnostics


link.exe fail on Windows with MSVC involving logging and generic struct | ``` $ cargo build Compiling libc v0.1.10 Compiling log v0.3.2 Compiling link-crash v0.1.0 (file:///C:/Users/%D0%90%D0%BB%D0%B5%D0%BA%D1%81%D0%B0%D0%BD%D0%B4%D1%80/Document s/link-crash) error: linking with `link.exe` failed: exit code: 1120 note: "C:\\Program Files (x86)\\Microso | labels: O-windows


milliseconds should be represented by u64, not u32 type | I found at least two cases in the standard API where milliseconds are represented by u32 variables: `std::sync::Condvar::wait_timeout_ms()` and `std::thread::park_timeout_ms()`. However unlikely, it is not completely impossible for the user to expect being able to pass parameter


ICE when non-const in const path. | This is that backtrace and error. ``` ico@arch ted $ cargo run Compiling ted v0.1.0 (file:///home/ico/code/projects/ted) src/text/buffer.rs:112:21: 112:27 error: paths in constants may only refer to constants or functions [E0014] src/text/buffer.rs:112 0.0 ... vwidth => { ^~~~~~  | labels: I-ICE


Suggestion for chapter about bindings | Hi, I feel variable bindings need to be explained more. Working and learning alone, it took me quite some time to figure them out (hopefuly I got everything right). Things like: 1. Keyword let declares a new binding - sort of linkage between name and value. It has to be used ONLY


#[no_mangle] is unsafe in the presence of name collisions | On some platforms (at least GNU/Linux, but I hear Windows and several others too), if you link together two static libraries that both export a symbol of the same name, it's undefined which symbol actually gets linked. In practice on my machine, the first library seems to win. Th | labels: A-linkage, P-low, T-lang, T-compiler, I-unsound, C-bug


rustc: malloc.c:2388: sysmalloc: Assertion failed | I was playing with examples for #28179 and hit this assertion in the playpen. ``` fn main() { println!("ok") } #[no_mangle] #[allow(non_snake_case)] pub fn _ZN2io5stdio6_print20h94cd0587c9a534faX3gE() { std::process::exit(1); } ``` That `#[no_mangle]` function needs to clash with | labels: I-ICE


2-line ICE - no entry found for key | `rustc 1.4.0-nightly (7780408af 2015-09-01)` ``` fn bar<F>() where F: Fn([usize; 1]) {} fn main() {} ``` | labels: I-ICE


Operator overloading issues | I did a quick search on the bug tracker and didn't find a duplicate so I'll just drop this here : According to the docs, `HashSet` implements `Sub`, but apparently operator overloading fails in this case. Calling `Sub::sub` directly does work. This example also fails with `BTreeS


why not derive(Debug) by default | and use attribute #[nodebug] to specific others? in the document, it says > Format trait for the :? format. Useful for debugging, all types should implement this. > Generally speaking, you should just derive a Debug implementation. but sometimes missing it, and I could only manua


ICE with closure in array size | ## STR ``` Rust struct S<T>(T) where [T; (||{}, 1).1]: Copy; fn main() {} ``` ## ICE ``` error: internal compiler error: ParameterEnvironment::from_item(): `unknown node (id=10)` is not an item note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a b | labels: E-easy, E-needs-test, E-mentor


Reference paragraph mentions nonexistent example | https://doc.rust-lang.org/nightly/reference.html#match-expressions > A pattern that's just an identifier, like **Nil** in the previous example, could either refer to an enum variant that's in scope, or bind a new variable. The compiler resolves this ambiguity by forbidding variab


thread 'rustc' panicked at 'index out of bounds: [...] src/libcollections/vec.rs:1047 | I can't use the `json!` macro on latest `master` (2015-09-03). **I tried this code:** src/main.rs ``` rust #![feature(plugin)] #![plugin(json_macros)] extern crate rustc_serialize; fn main() { let payload = json!({"test": "1"}); println!(payload.to_string()); } ``` Cargo.toml: `` | labels: I-ICE


Backtraces never worked on `i686-pc-windows-gnu` | Backtraces on windows are generated using the `StackWalk64` function. This will generate incorrect backtraces if any of the frame pointers are omitted due to FPO. This would normally be fine, as debug builds are compiled without FPO enabled. However, even in debug builds, the cod | labels: O-windows


Help text suggests the code that triggered the error | Got the following output when compiling: ``` src/lib.rs:41:32: 41:45 error: cannot infer an appropriate lifetime due to conflicting requirements src/lib.rs:41 guard.get(key).map(|v| BorrowedValue { guard: guard, value: v }) ^~~~~~~~~~~~~ src/lib.rs:40:5: 42:6 help: consider using | labels: A-diagnostics


Cannot coerce to FnBox with references in arguments | It doesn't appear to be possible to return a FnBox which accepts references: ``` rust #![feature(fnbox)] use std::boxed::FnBox; type Callback = Box<FnBox(&mut usize, &usize)>; fn get_cb() -> Callback { Box::new(|a, b| {}) } fn main() { } ``` produces the following error on `rustc | labels: A-type-system


Valgrind doesn't report allocations with jemalloc on nightly | Compiling the following code with `opt-level=0`, Valgrind reports 26 allocs for `rustc 1.2.0 (082e47636 2015-08-03)`, but 5 allocs for `rustc 1.4.0-nightly (cd138dc44 2015-09-02)`: ``` rust fn main() { let mut t = 0; for i in 0..10 { t += *Box::new(i); } assert_eq!(t, 45); } ```  | labels: P-medium, T-libs-api


a way to compose functions | Here is a way (I was pointed to this by mbrubeck on the rust IRC channel) to [compose two functions](https://play.rust-lang.org/?code=%23!%5Bfeature%28unboxed_closures%2C%20core%29%5D%0A%0Afn%20succ%28x%3A%20i32%29%20-%3E%20i32%20%7B%20x%20%2B%201%20%7D%0Afn%20sq%28x%3A%20i32%29%


Add the release dates to RELEASES.md | Pages like Wikipedia/Wikidata need to prove that a given information is correct. The announcement blog posts seem to be the only obvious place to look up the the exact release dates. Blog post URLs are not necessarily stable over time. It would be simpler to just refer to RELEASE


functions implement Copy but not Clone | This compiles ``` rust fn func(){} fn main(){ run(func); run(func); } fn run<T>(f: T) where T: Fn() + Copy{ f(); } ``` but this does not ([playground](http://is.gd/TidLCG)) ``` rust fn func(){} fn main(){ run(func); run(func); } fn run<T>(f: T) where T: Fn() + Clone{ f(); } ``` T | labels: A-type-system, I-ICE, P-low, E-mentor, T-lang, T-compiler


Rust panics if index out of bounds | ``` rust fn main () { let x = vec![1, 2, 3]; println!("Got: {}", x[88]); } ``` This code compiles just fine, but, when I run it, I get an ICE, or something similar: ``` thread '<main>' panicked at 'index out of bounds: the len is 3 but the index is 88', ../src/libcollections/vec.


Enabling lto in 1.2.0 causes LLVM ERROR near llvm.lifetime.end | ``` % rustc -V rustc 1.2.0 (082e47636 2015-08-03) ``` ``` -C opt-level=3 -g -C debug-assertions=on ``` Disabling `lto` causes compilation to complete without issue. Enabling it causes errors as follow. Below are a few runs of `cargo build` followed by `cargo clean` between runs.  | labels: A-LLVM, A-codegen


Tracking issue for overloaded `+=` operators (RFC 953) (feature augmented_assignments) | Tracking issue for RFC rust-lang/rfcs#953, which implements support for `+=` operators. cc @japaric | labels: T-lang, T-libs-api, B-unstable


Tracking issue for raw fat pointer comparisons (RFC #1135) | Tracking issue for rust-lang/rfcs#1135, "implement raw fat pointer comparisons". cc @arielb1 | labels: B-RFC-approved


Tracking issue for `..=` inclusive ranges (RFC #1192) -- originally `...` | ### Current status We are planning to to change the syntax for inclusive ranges and patterns to `..=`. The `...` syntax in patterns is stable and will remain (silently) deprecated for the time being; rustfmt can rewrite `...` to `..=`. This comes after much discussion. [See this  | labels: E-mentor, T-lang, T-libs-api, B-unstable, B-RFC-implemented, C-tracking-issue


Tracking issue for constant prop not causing add'l errors (RFC #1229) | Tracking issue for rust-lang/rfcs#1229 cc @oli-obk | labels: A-lints, B-RFC-approved, T-lang, T-compiler, B-unstable, C-tracking-issue


Tracking issue for PhantomData being permitted by CoerceUnsize (RFC #1234) | Tracking issue for https://github.com/rust-lang/rfcs/pull/1234 cc @Gankro | labels: B-RFC-approved


Float repr fail in nested tuple access error message | This code ``` rust (1, (2, 3)).1.1 ``` produces this error message ``` expr.rs:5:14: 5:17 error: unexpected token: `1.1` expr.rs:5 {(1, (2, 3)).1.1} ^~~ expr.rs:5:14: 5:17 help: try parenthesizing the first index; e.g., `(foo.1).10000000000000009` ``` It should suggest `(foo.1).1


Open tracking issues for all language features | https://github.com/rust-lang/rust/issues/26868 but for lang features. The issues for each thing should be recorded in the corresponding place in `libsyntax/feature_gate.rs`, and when they've all been opened & recorded, the FIXME's relating to this issue in that file should be rem | labels: P-medium, T-lang


Introduction to Rust codebase | I want to contribute to Rust, but it is very hard to gain specific knowledge of the Rust codebase and how it works on my own. It is doable, by reading the source code and jumping-to-definition in Emacs, but is there any documentation generated for the source code, or something to


rustdoc fails to treat pipe character inside code blocks properly | Both of these examples should look like the original when rendered as a table in rustdoc but neither do. This: ``` //! Test | Table //! ------|------------- //! t = b | `x | y | z` ``` Results in: ``` //! Test | Table //! ------|------------- //! t = b | `x ``` This: ``` //! Test | labels: T-rustdoc


Rust book: Empty Markdown link | > “This works because Rust has a [hygienic macro system][].” I'll fix this as soon as I can get to it (tomorrow, because its nighttime here), but I thought I Should post an issue.


Tuple indexing should handle float tokens specially | `tuple.0.0` tokenises as [Ident("tuple"), Dot, Float("0.0")]. At present it produces an “unexpected token” error with a help message along the lines of “try parenthesizing the first index; e.g., `(tuple.0).0`”. This is silly. We should just special-case float literals of the form | labels: T-lang


segfault while compiling stage2 libsyntax for i686-pc-windows-gnu | @alexcrichton has indicated this may be related to using newer versions of gcc, which might explain why it doesn't fail on the buildbot machines. The segfault occurs while running the `tailcallelim` llvm pass on `ast::Pat_::drop()`, possibly during the prerequisite `tti` analysis


ICE while compiling piston-gfx_texture | While compiling piston-gfx_texture v0.3.0 https://github.com/PistonDevelopers/gfx_texture/issues/67 ``` error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/r | labels: I-ICE


"make docs" fails (1.2.0) | ``` root@deli:/home/borisov/src/rustc-1.2.0 # VERBOSE=1 make docs cfg: version 1.2.0-dev cfg: build triple x86_64-unknown-linux-gnu cfg: host triples x86_64-unknown-linux-gnu cfg: target triples x86_64-unknown-linux-gnu cfg: host for x86_64-unknown-linux-gnu is x86_64 cfg: os for


ICE returning arrays with length specified by an associated constant | ### code ``` rust #![feature(associated_consts)] trait Trait { const SIZE: usize; } pub fn cause_compiler_to_panic<T: Trait>() -> [u8; T::SIZE] { unimplemented!() } ``` ### compiler output ``` $ RUST_BACKTRACE=1 rustc --crate-type rlib compiler_panic.rs error: internal compiler e | labels: I-ICE


Cannot implement trait for generic struct where types are also generic | In this example code, I want to implement the trait `Convert` for the struct `Combine` (which combines 2 Converts) ([code in playground](http://is.gd/656wnI)) ``` rust pub trait Convert<D1, D2>{ fn convert(&self, data: D1) -> D2; } impl<D1, D2, T> Convert<D1, D2> for T where T: F


rustc_platform_intrinsics takes LLVM lots of time to compile | CPU: ``` model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz stepping : 3 microcode : 0x12 cpu MHz : 3392.293 cache size : 8192 KB ``` with debuginfo: ``` time: 0.580; rss: 228MB translation time: 0.228; rss: 172MB llvm function passes time: 48.802; rss: 287MB llvm module passes | labels: I-compiletime


Variance issue with higher kinded lifetimes | ``` rust fn test() -> *mut for<'a> Fn(&'a usize) { // change to *const and it'll work if let Some(_) = Some(1) { // not sure why I have to do this loop{} } else { loop{} } } fn main() {} ``` ``` <anon>:2:5: 6:6 error: cannot infer an appropriate lifetime for lifetime parameter 'a | labels: A-lifetimes


Attributes on item macros are ignored | This compiles and runs without warnings: ``` rust macro_rules! m { () => ( fn f(){} ); } #[test] m!(); fn main() { f(); } ``` I at least expected the unused attribute lint to catch this


ICE: unprintable span | The following code: ``` Rust use nom::{IResult, not_line_ending, line_ending}; fn csv_line(input: &[u8]) -> IResult<&[u8], Vec<&[u8]>> { terminated!(input, separated_list!(filter!(apply!(check_characters, b"\n\r,")), not_line_ending), line_ending) } fn check_characters(data: &[u8 | labels: I-ICE


ERROR:rbml::reader: failed to find block with tag 42 | It looks like this has been an issue in the past and there are some closed bugs that look similar, but it seems to have come back again... `rustc --version --verbose`: ``` rustc 1.4.0-nightly (f6aac8037 2015-09-06) binary: rustc commit-hash: f6aac80375ee8ec63522affc09e0cd5c4f888b


Unexpected compiler error E0308 on arithmetic with borrowed values | I've faced with compiler error on arithmetic operations with borrowed values. After some simplification of my code, it was reduced to following program: ``` fn main() { let a: i32 = 0; let b: i32 = 0; let aa = &a; // works if b - aa < 0 { } // unexpected e0308 error if b < aa { } | labels: T-lang, T-libs-api


Unused imports lint should detect redundant prelude imports | This code produces no warning: ``` rust use std::vec::Vec; fn main() { Vec::<u8>::new(); } ``` A warning would be useful for old code that imports items which have since made it into the prelude. | labels: C-enhancement, A-lints


Improve Error Handling chapter | A long while back, @BurntSushi wrote http://blog.burntsushi.net/rust-error-handling/ . It is awesome, and deserves to be in the book in some form. Last we talked, @BurntSushi was okay with us using it from a licensing perspective.


Nightly documentation's std::vec's source link does not work | The `source` link on the `vec` page https://doc.rust-lang.org/nightly/std/vec/index.html leads to https://doc.rust-lang.org/nightly/core_collections/vec/?gotosrc=24157 which is just a `Not Found` page. I randomly clicked source on other pages and they seem to work. | labels: T-rustdoc


Documentation search finds std::rand::Rng::shuffle but does not find corresponding page | I search for `shuffle` in the documentation like so https://doc.rust-lang.org/stable/std/?search=shuffle . The result is `std::rand::Rng::shuffle - Shuffle a mutable slice in place.` but the link https://doc.rust-lang.org/stable/rand/trait.Rng.html#method.shuffle does not lead an | labels: T-rustdoc


ICE on assert!("test") | While playing around on the playground, I found that this reports an ICE: ``` rust fn main() { assert!("test"); } ``` ``` <std macros>:2:4: 2:19 error: cannot apply unary operator `!` to type `&'static str` (internal compiler error: unprintable span) <std macros>:1:1: 5:46 note:  | labels: I-ICE


Broken links in rustbook chapter on compiler plugins | This might be a known side-effect of the immature nature of compiler plugins, but nearly all of the links from the "Compiler Plugins" chapter are broken. https://doc.rust-lang.org/nightly/book/compiler-plugins.html Example from the 2nd paragraph: See the [rustc::plugin](https://d


Weird dropping issues with transmute() and "" vs "let _ = " | ``` rust struct Dropper; impl Drop for Dropper { fn drop(&mut self) { println!("drop"); } } fn main() { let d = Dropper; unsafe { std::mem::transmute::<_, u8>(d) }; } ``` this prints "drop". ``` rust struct Dropper; impl Drop for Dropper { fn drop(&mut self) { println!("drop"); }


Constants behave differently depending on the way they're initialized. | I can't match using a constant that was initialized using a byte string literal: ``` const ARRAY1: [u8; 0] = []; const ARRAY2: [u8; 0] = *b""; fn main() { match [] { ARRAY1 => {} ARRAY2 => {} } } ``` This gets an error: ``` a.rs:2:25: 2:29 error: constant evaluation error: unsupp


Release versions of Rust need special flags to compile | Looks like distros need to build Rust with some specific flags to get them work as expected. This can be problematic for packagers and users of non-official-builds of Rust, so I think that this must be clearly described somewhere. Another option would be to just set those options


Shadowed enum variants lead to badness | This is crate `c`: ``` rust pub enum E { V(u8) } impl E { fn V(u: u8) -> E { println!("IN V!"); E::V(u) } pub fn test(&self) { match *self { E::V(val) => println!("{}", val), } } } ``` This compiles fine. The `E::V(u)` line seems to use the variant constructor instead of my funct


Use --release-channel=stable by default on releases | Release tarballs should be compilable with just basic `./configure ; make ; sudo make install` without having to pass special flags to configure. This is the case of the `--release-channel` option, that must be changed in the releases.


dereferences in statics can create broken code | ## STR ``` Rust extern { static error_message_count: u32; // anything will do } pub static BAZ: u32 = *&error_message_count; fn main() {} ``` ## | labels: A-LLVM, I-ICE, E-needs-test


Rules governing references to private types in public APIs not enforced in impls | This code compiles, it should not: ``` rust mod x { pub struct Foo { x: u32 } struct Bar { x: u32 } impl Foo { pub fn foo(&self, x: Self, y: Bar) { } } } fn main() { } ``` cc @nrc | labels: P-high, T-compiler


Remove the unnecessary lang items for Send and Sync | I remember @huonw telling me long ago that these lang items are unnecessary, though I don't remember if there's a good reason for why they haven't been removed yet. | labels: C-cleanup, T-lang, T-compiler


internal compiler error on 1.4.0-dev for i686-pc-windows-gnu | I tried the cross-compilation for windows following procedures on this page. [Using Rust in Wine as a sort of cross-compiler](https://gist.github.com/vi/883cacf09b57a8efe5bf) In procedure No.3, I got an internal compiler error, like that. ``` bash $ RUST_BACKTRACE=1 /opt/local/bi


Cannot call static function of type in macro | The following code fails to compile: ``` macro_rules! macro_ { ($t:ty) => { impl $t { fn bar() -> $t { unimplemented!(); } fn foo() -> $t { $t::bar(); } } } } struct Foo; macro_!(Foo); ``` Error message: ``` a.rs:8:17: 8:19 error: unexpected token: `Foo` a.rs:8 $t::bar(); ^~ ```


Cannot hygienically create test functions in macro | Code: ``` macro_rules! macro_ { ($t:ty) => { #[test] fn test() { } } } struct Foo; struct Bar; macro_!(Foo); macro_!(Bar); ``` Error: ``` a.rs:4:9: 4:22 error: duplicate definition of value `test` [E0428] a.rs:4 fn test() { } ^~~~~~~~~~~~~ a.rs:1:1: 6:2 note: in expansion of macr | labels: A-macros


Linker failure while compiling exa with LTO (duplicate symbols) | Building [exa](https://github.com/ogham/exa) fails at link stage if LTO is used and system package for libssh2-dev is not installed: ``` Compiling exa v0.3.0 (file:///home/butler/packs/exa) error: linking with `cc` failed: exit code: 1 note: "cc" "-Wl,--as-needed" "-m64" "-L" "/h


rustc panics with index out of bounds | Sample code in question: ``` rust struct MyStruct { x: i32, } fn foo(v: &Vec<i32>, s: &MyStruct) { } fn main() { let v1 = vec![]; let v2 = vec![]; foo(&v1, &v2); } ``` rustc correctly complains about the type of the second argument in the call to foo(), but then panics. Backtrace | labels: I-ICE


Type parameter `Self/SelfSpace.0` (Self/SelfSpace/0) out of range when substituting | Hello! I'm reporting an apparent compiler error stemming from a typo. **Version** ``` sh $ rustc --version --verbose rustc 1.4.0-nightly (7bf626a68 2015-09-07) binary: rustc commit-hash: 7bf626a68045be1d1a4fac9a635113bb7775b6bb commit-date: 2015-09-07 host: x86_64-apple-darwin re


ICE: the 1th autoderef failed | ICE when using `Rc<RefCell<Box<FnMut()>>>.` ``` rust use std::rc::Rc; use std::cell::RefCell; fn main() { let mut a = 0; let fs = vec![Rc::new(RefCell::new(Box::new(|| a = 4 )))]; fs.iter().map(|f| { let mut closure = f.borrow_mut(); (&mut *closure)() }); } ``` `rustc --version - | labels: I-ICE


Error explanation suggests using #![no_std] when already in use | I've been running into a linker error `undefined reference to 'panicking::panic::h98aad983367da335F7E'` while trying to build with `#![no_std]`. While trying to debug, I ended up with some code that looked like this: https://gist.github.com/anonymous/88c01ee6ee33e4bad656 When you | labels: A-diagnostics


Tracking issue for Arc/Rc extras | This is a tracking issue for the `arc_counts`, `rc_counts`, and `rc_would_unwrap` features. The counting functions have been around for awhile but `would_unwrap` was added recently. cc #27718, more discussion there. | labels: T-libs-api, final-comment-period, B-unstable


Improve [..] and as_slice documentation | The section of the Rust book on Slices is nice (hard to find in primitive types) but it gives more information on [..](and it's origins in [1..] and [3..5] [..3] type indexing): https://github.com/rust-lang/rust/blob/master/src/doc/trpl/primitive-types.md#slices The actual docs f


rustdoc generates `where` clauses that are not valid Rust | At the moment, the summary for the IntoIterator trait definition reads: ``` pub trait IntoIterator where Self::IntoIter::Item == Self::Item { type Item; type IntoIter: Iterator; fn into_iter(self) -> Self::IntoIter; } ``` The 'where' clause on the first line isn't valid Rust, whi | labels: T-rustdoc, T-dev-tools, C-bug


Calling a block: discrepancy between parser-lalr and rustc | I don't know whether this code is valid syntax: ``` rust fn f(i: i32) -> i32 { i } fn main() { 1 + {f}(1); } ``` It is rejected by `rustc`: ``` test.rs:3:12: 3:13 error: expected one of `.`, `;`, `}`, or an operator, found `(` test.rs:3 1 + {f}(1); ^ ``` It is _accepted_ by the L | labels: A-grammar, T-lang, C-bug


Field access of cast expression: discrepancy between parser-lalr and rustc | It's not clear to me whether this code is valid syntax. It looks wrong, so maybe it ought to be rejected. `rustc` rejects it, but `parser-lalr` accepts it: ``` rust struct S { f: i32 } fn main() { let s = S { f: 42 }; s as S.f; } ``` It _looks_ like it should parse as `s as (S.f) | labels: A-grammar, P-medium, T-lang, C-bug


HRTB aren't described in the book | https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md This is, as far as I know, the only thing syntax-wise that's not covered at all.


Compiler for piston-gfx_texture v0.3.0 | rustc 1.4.0-nightly (7780408af 2015-09-01) ``` Compiling piston-gfx_texture v0.3.0 Running `rustc /home/alex/.cargo/registry/src/github.com-0a35038f75765ae4/piston-gfx_texture-0.3.0/src/lib.rs --crate-name gfx_texture --crate-type lib -C opt-level=3 -C metadata=9792eb950b42c997 -


List of commands and formats for the rustc testing setup? | I'm trying to come up with some official documentation for the way we test the rust compiler. So far, I know of: - `~^`, `~^^`, and `~|` - `HELP`, `ERROR` I'm a bit foggy on how the error text actually works too. If anyone has anything to add to this, or any information about thi


Somehow address redundancies between doc-comment code and crate code | # Issue I noticed with a few of my crates that I have some redundancies between my docs and the code in the crate, specifically testcases. As a example, here `nice_example()` is duplicated: `````` //! docs docs docs //! docs docs docs //! ``` //! fn nice_example() { ... } //! ``` | labels: T-rustdoc, T-dev-tools, C-feature-request


SipHasher::write, when used externally, should refer to trait method, not inherent (and private) method. | This code snippet works: http://is.gd/cAKwYz However, substituting `::Hasher` for `::SipHasher` gives the following error: ``` src/chunks.rs:35:5: 35:34 error: method `write` is private src/chunks.rs:35 ::std::hash::SipHasher::write(&mut hasher, &x); ``` Discussion from IRC: ```


ICE: assertion failed: bound_list_is_sorted(&bounds.projection_bounds) | When trying to compile a crate using `cargo build`, `rustc` fails with an unexpected panic. Cargo prints this message: ``` bash $ cargo build Compiling mnemosyne-parser v0.1.0 (file:///Users/hawk/Development/mnemosyne) error: internal compiler error: unexpected panic note: the co | labels: I-ICE


type cannot be shared between threads safely message could be more informative | If you hit an issue such as ``` misc.rs:26:5: 26:17 error: the trait `core::marker::Sync` is not implemented for the type `*mut libc::types::common::c95::c_void` [E0277] misc.rs:26 require_sync(&x); ^~~~~~~~~~~~ misc.rs:26:5: 26:17 help: run `rustc --explain E0277` to see a detai | labels: A-diagnostics


Field access of block: discrepancy between parser-lalr and rustc | ``` rust struct S { f: u32 } fn main() { { S { f: 42 } }.f; // rustc accepts, parser-lalr rejects { 42 } as i32; // rustc and parser-lalr reject { 42 } == 42; // rustc and parser-lalr reject } ``` The grammar in src/grammar/parser-lalr.y should probably be relaxed to accept the f | labels: A-grammar, P-medium, I-needs-decision, T-lang, C-bug


Information about @bors | I'm planning to write a short manual for bors, so anyone who has any information about how bors works, please post here.


Float to integer casts can have undefined results | By accident I came across an ICE from this code: `(-1.0 as usize,)`. The ICE is triggered by an assertion while building the constant tuple. The field has a value of `undef`. Looking into it, the two floating point to integer cast instructions, `fptoui` and `fptosi` have a very l


Panic condition documentation consistency | I noticed that the formatting of panic conditions in the documentation of a lot of functions seems to be inconsistent. Specifically it varies between simple warnings in the description of the function and 'Panics' subheaders with the panic condition listed below. A good example b


Terminal. | I use a terminal with a black background. When I try to compile rust code, and errors or warnings occur, I don't see the messages (but the colored 'error' or 'warning'). That is because the messages are always black, is there any way I can change that? :art:


Unwinding in a drop() implementation skips remaining drops | Given this: ``` rust struct S; impl Drop for S { fn drop(&mut self) { println!("Dropping S"); panic!("DIE"); } } struct T; impl Drop for T { fn drop(&mut self) { println!("Dropping T"); } } fn main() { let t = T; let s = S; } ``` The output is: ``` Dropping S thread '<main>' pani


Privacy, stability etc. are not respected in imports with empty braces | ``` use std::rt::{}; ``` should warn that `std::rt` is unstable, but it doesn't. ``` mod m { mod n {} } use m::n::{}; ``` should be caught by privacy checker, but it isn't. See https://github.com/rust-lang/rust/pull/28364#issuecomment-139869943 for some details.


Invalid "error: source trait is inaccessible" error | This code __does not__ compile ([playpen](http://is.gd/uKBOfD)): ``` rust pub mod mymod{ mod foo { pub trait ToFoo{ fn to_foo(self) -> i32; } } pub use self::foo::ToFoo; } pub fn foobar<T: mymod::ToFoo>(x: T) { let v = x.to_foo(); } fn main() {} ``` Output: ``` <anon>:14:13: 14:2


Internal compiler error involving boxing a closure... | ``` damien@fx-8150 ~/Documents/mkt $ cargo build Compiling mkt v0.1.0 (file:///home/damien/Documents/mkt) error: internal compiler error: no type for node 1423: local stock (id=1423) in fcx 0x7ff9de3f1358 note: the compiler unexpectedly panicked. this is a bug. note: we would app | labels: I-ICE


Placing constant expressions in statics can result in unnecessary huge memcpy's | ``` rust pub enum MyEnum { A(u32), B([u8; 65536]), } pub fn slow(e: &mut MyEnum) { *e = MyEnum::A(32); } pub fn fast(e: &mut MyEnum, x: u32) { *e = MyEnum::A(x); } ``` The optimised IR is: ``` llvm ; ModuleID = 'rust_out.0.rs' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:1 | labels: I-slow, A-codegen, T-compiler


Poor error message with assigning invalid constant to enum variant | ``` Rust pub struct Foo(pub u32); pub const CONSTANT: Foo = Foo(1); #[derive(Clone)] enum Enum { Variant = CONSTANT, } fn main() {} ``` ``` <anon>:2:27: 2:33 error: constant evaluation error: unsupported constant expr [E0080] <anon>:2 pub const CONSTANT: Foo = Foo(1); ^~~~~~ <ano | labels: A-diagnostics


rustc --version --verbose does not report LLVM version used | labels: A-frontend, C-enhancement


internal compiler error: unexpected panic (ERROR:rbml::reader: failed to find block with tag 56) | I'm trying to run a clone of https://github.com/pistondevelopers/piston-examples (at revision 88ee3ff1f1dde20ef9c6d71c098d3abbaba38039). The following commands work (which means that the program crashes on my system, but that already happened before so it shouldn't be related to


internal compiler error: unexpected panic | The compiler panicked when I tried to compile the following code: <pre><code> extern crate x86; use core::{ptr, intrinsics}; use self::x86::io::{inb, outb}; /***** Serial I/O code *****/ const COM1: u16 = 0x3f8; const COM_RX: u16 = 0; // In: Receive buffer (DLAB=0) const COM_TX:  | labels: I-ICE


Broken anchor links in new Error Handling guide | In the [Error Handling guide](https://doc.rust-lang.org/nightly/book/error-handling.html), clicking the anchor link "A brief interlude: unwrapping isn't evil" in the table of contents has no effect. It points to: https://doc.rust-lang.org/nightly/book/error-handling.html#a-brief-


macro_rules attempts to expand tokens it needs to only pass through. | ``` rust macro_rules! expr { ($a:expr) => ($a) } macro_rules! str_tts { ($b:tt) => { expr!(stringify!($b)) } } fn main () { // This works ("$ c"). let x = expr!(stringify!($c)); // This errors with "unknown macro variable `c`". let y = str_tts!($c); println!("{} {}", x, y); } ``` | labels: A-macros


Error in iterator filter predicate results in an unhelpfully exponential number of error messages | ``` fn main() { let buf: &[u8] = &[12, 13, 14, 15, 16]; let indices = buf.iter().zip(buf.iter().skip(1)).enumerate().filter(|_, (a, b)| *a == b'\r' && *b == b'\n').map(|(i, (_, _))| i); for i in indices { // ... } } ``` Building the above produces 48 errors. Removing the map at t | labels: A-diagnostics


Missing code snippet in the Error Handling guide | Paragraph 6 of https://doc.rust-lang.org/nightly/book/error-handling.html#the-option-type starts with : "But wait, what about unwrap used in unwrap-double?". The problem is that there is no code sample involving something called `unwrap-double`. It seems that there is some piece


improve error message when resolution via Deref actually required DerefMut | If a type `B` implements `Deref` to get out `&A`, then auto-deref based method resolution of instances of `B` will include methods of `A` that require `&mut self`, even when there is no `DerefMut` that would be necessary for such auto-deref to work. We still reject the code, with | labels: C-enhancement, A-diagnostics, E-mentor, WG-diagnostics


Macro items assigned bad span | Item-like macro invocations are assigned a bad span. Oft-times it'll only contains a semicolon. | labels: A-diagnostics


Overcomplicated sample code for Option::iter_mut and Result::iter_mut | The code samples that illustrate the [Option::iter_mut()](https://doc.rust-lang.org/nightly/core/option/enum.Option.html#method.iter_mut) and [Result::iter_mut()](https://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.iter_mut) use an overcomplicated pattern. For i


visibility modifiers are accepted for enum variants | The following code compiles without warnings: ``` rust #[allow(dead_code)] enum Foo { pub Spam, Eggs } fn main() { } ``` I guess that this should be forbidden, because enum vairants inherit visibility of the enum itself. At minimum, this should produce a warning. This is the rele


Using a plugin that was built without `-C prefer-dynamic` causes LLVM error | I forgot to add `plugin = true` to Cargo.toml and got this when building an external test: ``` : CommandLine Error: Option 'interpreter-print-volatile' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options ``` For reference, this is an incorrect w | labels: A-frontend, A-LLVM, I-ICE, C-bug


Parser does not stop early enough if keyword is found instead of ident | For ``` rust enum A { enum A } ``` and for ``` rust struct A { mod A } ``` 2 errors are emitted for each ``` test.rs:2:5: 2:9 error: expected identifier, found keyword `enum` test.rs:2 enum A ^~~~ test.rs:2:10: 2:11 error: expected one of `(`, `,`, `=`, `{`, or `}`, found `A` tes


Build with --enable-llvm-assertions segfaults on Windows (MinGW 64) | The issue is Windows-specific, I can't reproduce it on Kubuntu. cc @alexcrichton (?) based on the backtrace and git blame Configure: ``` ./configure --enable-llvm-assertions ``` Build: ``` $ make VERBOSE=1 cfg: version 1.5.0-dev (355daea40 2015-09-16) cfg: build triple x86_64-pc- | labels: O-windows


Crates failing on beta | This has been reported multiple times: https://travis-ci.org/serde-rs/json/jobs/80688459 The new beta is mysteriously failing. Looks cargo-related. Need to fix this asap. cc @alexcrichton @rust-lang/tools | labels: regression-from-stable-to-nightly


Tests run-pass/backtrace.rs and run-pass/backtrace-debuginfo.rs fail on Windows (MinGW 64) | cc @Diggsey Configure: ``` ./configure ``` Build: ``` $ make check-notidy TESTNAME=backtrace.rs cfg: version 1.5.0-dev (355daea40 2015-09-16) cfg: build triple x86_64-pc-windows-gnu cfg: host triples x86_64-pc-windows-gnu cfg: target triples x86_64-pc-windows-gnu cfg: host for x8 | labels: O-windows, O-windows-gnu


Always pass /DEBUG to msvc linker | From convo with @retep998, passing /DEBUG, even w/o emitting debuginfo, makes backtraces work. They 'see no reason' not to always pass this flag. This should be a simple change to `rustc::back::link`. | labels: E-easy, A-linkage


Mutable borrows in an `else if` after an `if let` are disallowed | ``` rust fn main() { let mut f = Some(1); if let Some(a) = f { } else if f.as_mut().is_some() {} } ``` Gives: ``` <anon>:4:15: 4:16 error: cannot mutably borrow in a pattern guard [E0301] <anon>:4 } else if f.as_mut().is_some() {} ^ note: in expansion of if let expansion <anon>:3


Type alias can be used to bypass privacy check | ``` rust struct Priv; pub use self::private::public; mod private { pub type Priv = super::Priv; pub fn public(_x: Priv) { } } ``` The function `public` is exported, accepting the type `Priv`, even though `Priv` is not exported. | labels: P-high, T-lang


Meaningless `pub` lint. | I would expect a lint warning about `pub` declarations which aren't needed or meaningful. ``` rust mod a { struct A; impl A { pub fn x() { } } } ``` This simple example would warn about a meaningless `pub` for the function `x`. | labels: A-lints


Ambiguous explanation of Sync in the book | > When a type `T` implements `Sync`, it indicates to the compiler that something of this type has no possibility of introducing memory unsafety when used from multiple threads concurrently. The term "used" should be elaborated: "when used by immutable reference from ..." It will


trpl: Off-by-one highest memory address | The highest memory address used in the example of `the-stack-and-the-heap.md` should be `2^30 - 1`, not `2^30`.


trpl: Invalid byte size terminology | The following terms are used in `the-stack-and-the-heap.md`: _gigabyte_, _GB_. But a gigabyte is 10^9 bytes, not 2^30. The correct terms are: _gibibyte_, _GiB_.


Bootstrap rust for ARM64 | I am trying to bootstrap rust for ARM64. I am trying to build an arm64 stage0 rustc on an x86 machine so that I can use that to natively compile rustc on ARM64. I have the aarch64-linux-gnu-gcc cross compiler installed. I am configuring rust as follows: ``` $ ../configure --host=


Bad span for public foreign function | The pub keyword isn't included in the span. See [this example in the rust playground](https://play.rust-lang.org/?code=extern%20{%0A%20%20pub%20fn%20foxxxo%28%29%3B%0A%20%20pub%20fn%20foxxxo%28%29%3B%0A}%0A%0Apub%20fn%20foyyyo%28%29%20{}%0Apub%20fn%20foyyyo%28%29%20{}%0A%0Afn%20m


Negative blanket OIBIT impl treated as positive | `impl !Pod for .. {}` looks like it produces a positive impl. [(playpen)](https://play.rust-lang.org/?gist=6b188c2bb938c1d831fc&version=nightly) ``` rust #![feature(optin_builtin_traits)] unsafe trait Pod {} unsafe impl !Pod for .. {} struct Foo<X, Y>(X, Y); fn is_pod<T: Pod>(_:  | labels: A-type-system, P-medium, T-lang, C-bug


match statements that cover all possible values for type not seen as exhaustive | Apologies if this is a dupe. This doesn't compile: ``` rust fn main() { match 25u8 { 0 ... 24 => println!("less than 25"), 25 => println!("exactly 25"), 26 ... 255 => println!("above 25") } } ``` Error message: ``` <anon>:2:5: 6:6 error: non-exhaustive patterns: `_` not covered [ | labels: T-lang


rustdoc generates bad fragments in links to trait methods | For example, https://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html links to "https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html#method.fmt", but the correct link is "https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html#tymethod.fmt". | labels: T-rustdoc


rustdoc generates duplicate anchors | For https://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html : | Anchor | Lines | | --- | --- | | method.extend | 740, 741 | | assoc_type.IntoIter | 731, 734, 737 | | assoc_type.Item | 730, 733, 736 | | method.into_iter | 732, 735, 738 | | examples | 85, 218, 229, 24


rustdoc generates cross-crate links to pages which don't exist because of #[doc(hidden)] | For example, https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html#method.align links to https://doc.rust-lang.org/nightly/core/fmt/rt/v1/enum.Alignment.html, which doesn't exist because std::fmt::rt is marked #[doc(hidden)] . | labels: T-rustdoc


clone_from in the standard library | The `Clone` trait has a sadly-neglected `clone_from` method that clones a value into an existing one. There is a default implementation, but it's fairly naive and therefore not optimal for all cases, notably collections. It would be good if the major collections had better implem | labels: I-slow, C-enhancement, T-libs-api, E-help-wanted


Emitted LLVM-IR should be annotated to connect to rs source | I've tried looking at llvm-ir output to understand how my code is translated by rustc, but this is currently very difficult. Can be by line numbers, or include original source in an llvm-ir comment. For those llvm-ir assignments that correspond to rust variable assignments, givin | labels: A-LLVM, C-feature-request


Poor diagnostics on implicitly required `Sized` bound for all type parameters | [This](https://play.rust-lang.org/?gist=5563b832a31eefd08109&version=nightly): ``` fn main() {} struct A<T: B> { a: T::S } trait B { type S; fn s(&self) -> Self::S; fn res(&self) -> A<Self> { A { a: self.s() } } } ``` errors out with: ``` <anon>:11:9: 11:10 error: the trait `core | labels: A-diagnostics


`VecDeque::push_back(())` does not work correctly. | http://is.gd/NY4tCl ``` use std::collections::VecDeque; fn main() { let mut v = VecDeque::new(); v.push_back(()); assert!(v.len() > 0 ); } thread '<main>' panicked at 'assertion failed: v.len() > 0', <anon>:6 ``` | labels: regression-from-stable-to-stable


E0015 "function calls in statics" recommends using constant functions in stable even though constant functions are not stable | Using rustc 1.3.0 (9a92aaf19 2015-09-15) ``` rust struct Foo { a: u8 } fn bar() -> Foo { Foo { a: 5 } } static foo: Foo = bar(); fn main() {} ``` ``` > rustc test.rs test.rs:6:19: 6:24 error: function calls in statics are limited to constant functions, struct and enum constructor | labels: A-diagnostics


`BTreeSet` causes general protection fault with zero-sized key-value pairs and jemalloc | foo.rs: ``` rust use std::collections::BTreeSet; fn main() { let _: BTreeSet<()> = BTreeSet::new(); } ``` Output: ``` sh > rustc --version rustc 1.5.0-nightly (cff041170 2015-09-17) > rustc foo.rs > valgrind ./foo ==15717== Memcheck, a memory error detector ==15717== Copyright (C | labels: A-collections, T-libs-api


LLVM assertion hit while building SpiderMonkey bindings | I have some code at https://gist.github.com/michaelwu/1040fa8f592ad020f893 . Building it with the latest nightly using `rustc --crate-type lib jsapi.rs` results in this assertion `Assertion failed: (getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getEleme | labels: I-ICE


source tarball contains snapshot.pyc | This generated file should not be distributed. [Link](https://internals.rust-lang.org/t/perfecting-rust-packaging/2623/18?u=brson) Look near the `tar-dist-src` rule in the makefiles to fix. | labels: E-easy


LLVM contains non-DSFG-compatible file | Per @anguslees, the file src/llvm/cmake/modules/LLVMParseArguments.cmake carries the CC-BY _2.5_ license (an old version of the license), which is [not compatible with the Debian Free Software Guidelines](https://wiki.debian.org/DFSGLicenses). We are distributing this file in our


The docs for print! and println! should contain panics section | Invocations of the `print!(..)` and `println!(..)` macros may panic if stdout isn't writeable. This is undocumented as of yet. Proposed solution: Add a `# Panics` section in both doc comments.


transmute_copy doc is backward. | The doc for [`mem::transmute_copy`](https://github.com/rust-lang/rust/blob/master/src/libcore/mem.rs#L532) states ... > Interprets `src` as `&U`, and then reads `src` without moving the contained value. ... but the function is built around [`ptr::read`](https://github.com/rust-la


Private trait's methods reachable through a public subtrait | I'm not 100% sure how the privacy rules should work. A's methods should not be callable because the trait is private, but it's reachable though the trait C that inherits A, by calling `C::a()`. B's methods are reachable the same way, even if it's marked pub but not publically rea | labels: A-resolve, A-visibility, T-lang


RangeArgument not exported to std::collections | Trait RangeArgument (currently new and unstable in Rust 1.3) is not exported into standard library. https://doc.rust-lang.org/stable/collections/range/trait.RangeArgument.html


Test that all collections work with zero-sized types (ZST) | In light of #28488, add tests to the testsuite that exercise all collections using ZST. Most common ZST is the `()` (empty tuple), and all collections need to support it. | labels: E-easy, A-collections


Module inner spans run a bit long | Consider this code: ``` mod foo { mod bar { mod baz {} } } ``` The inner spans, innermost to outermost: `}`, `mod baz {} }`, `mod bar { mod baz {} } }\n\n`. The docs state that the inner should be [a] span from the first token past `{` to the last token until `}`.


unhelpful error message invoking fn foo<T>() when T is not used within signature | Test case: ``` rust fn foo<T>() {} fn main() { foo() } ``` Error: ``` t.rs:2:13: 2:16 error: unable to infer enough type information about `_`; type annotations or generic parameter binding required [E0282] t.rs:2 fn main() { foo() } ^~~ ``` It should, at least, mention `T` by na


Re-exported functions aren't being resolved when used from other modules. | I did most of my development for a project on the 1.4-nightly branch of the compiler, but when running travis.ci (1.3-stable), I got really weird import resolution errors. [errors here](https://travis-ci.org/TyOverby/ares/builds/81212781) - [source code here](https://github.com/T


Replace the ast::Mac_ enum with a struct | https://github.com/rust-lang/rust/blob/master/src/libsyntax/ast.rs#L1137 ``` rust pub enum Mac_ { MacInvocTT(Path, Vec<TokenTree>, SyntaxContext), // new macro-invocation } ``` this should instead be something like ``` rust pub struct MacroInvoke { path: Path, tts: Vec<TokenTree> | labels: E-easy, E-mentor


read_link cannot open some files reported as symbolic links on windows | rustc on Windows 7 32 bit: ``` C:\Users\andrew\walkdir\symlinks>rustc --version rustc 1.5.0-nightly (6e5a32547 2015-09-19) ``` Test program: ``` rust use std::fs; fn main() { let md = fs::symlink_metadata("is_a_symlink").unwrap(); println!("is symlink? {}", md.file_type().is_syml | labels: O-windows


Give windows-gnu-specific issues a tag separate from A-windows | I propose that A-windows be used for any issue that affects -msvc targets, but not for any issue that doesn't affect -msvc targets. In particular, if an issue is msys-specific then it shouldn't be given the A-windows tag, but instead a different one like A-Windows-gnu. In theory  | labels: O-windows, O-windows-gnu, O-windows-msvc


Creating data-less enum variant with data yields a confusing error message | ``` rust enum Test { Variant, Variant2(&'static str) } fn main(){ let y = Test::Variant2("Hello"); let x = Test::Variant("World"); } ``` results in ``` <anon>:8:13: 8:35 error: expected function, found `Test` <anon>:8 let x = Test::Variant("World"); ^~~~~~~~~~~~~~~~~~~~~~ ``` The | labels: A-diagnostics


Moving out of boxed structs by destructuring no longer works | In 1.3.0, ``` struct PatriciaTree { data: Box<u8>, child_l: Box<u8>, } impl PatriciaTree { fn delete(&mut self) { let child = Box::new(PatriciaTree { data: Box::new(5), child_l: Box::new(5) }); let PatriciaTree { data, child_l } = *child; } } fn main() {} ``` fails with ``` break


Rustdoc handling of public re-export is broken | Looking at nightly docs of `core::num`, the presentation of `ParseFloatError` is confusing. It looks like this: ![rustdoc](https://cloud.githubusercontent.com/assets/2311707/9981695/622813d4-5fc4-11e5-9734-5884e190c801.PNG) It should be rendered like `ParseIntError`, for example. | labels: T-rustdoc


Compiler panic while compiling | Compiler paniced when "cargo test" was executed git snap shot of file https://github.com/valarauca/Fact/tree/1cfcdbb41e2099abefcea7994bd03b48aa2be882 | labels: I-ICE


Compiler crash while linking lambdas across crates | Source code that causes crash https://github.com/valarauca/Block/tree/CompilerCrash Has own dedicated branch. Readme.md includes git check out of extern crate which was loaded. Occurs in Rustc v1.3 x86_64 Linux v3.19.3 Also Occurs in Rustc v1.2 x86_64 rustc 1.4.0-beta.1 (d2e13e82