| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : Run main rust-analyzer tests in rust-lang/rust CI\, : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : public-dependency\playground\0.0.0\2018\0.2\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : broken-nightly\0.1.0\2024\3.12.0\rkyv\, : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : Size::sub: 0 - 8 would result in negative size\Rust Bug Minimization Patterns\, : , : 1} |
| {: , : C\, : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : Promote tvOS/watchOS/visionOS to Tier 2\, : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 0} |
| {: , : Out of memory\, : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 1} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : implementation of `Send` is not general enough\, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : Disallowed after deaggregation ...\, : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : some_feature\some_feature\, : , : 1} |
| {: , : , : , : 2} |
| {: , : Rust Bug Minimization Patterns\, : , : 0} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 1} |
| {: , : good enough\, : , : 3} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : C\_start\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : Implement cross-language ThinLTO,\Stabilize linker-plugin based LTO (aka cross-language LTO),\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : a function\, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : malformed `doc` attribute input\, : , : 0} |
| {: , : const items\type const items\, : , : 3} |
| {: , : {%\Found | labels: A-macros, C-bug, C-discussion, T-rust-analyzerlabelquestionlabel_id |
| idrust_151950textunmangled symbols are not escaped in naked/global assembly | I tried this code: ```rust unsafe extern \ { #[link_name = \] unsafe fn inject(); } #[unsafe(export_name = \)] extern \ fn inject_() {} #[unsafe(naked)] extern \ fn print_0() -> usize { core::arch::naked_asm! | labels: A-codegen, C-buglabelmediumlabel_id |
| idrust_108894text#[derive(Clone, Copy)] doesn't work | I tried this code: ```rust use std::marker::PhantomData; #[derive(Clone, Copy)] pub struct TypedAddress<T>{ inner: u64, phantom: PhantomData<T>, } pub trait Memory { fn write_value<T>(&self, offset: TypedAddress<T>, value: &T); fn return_value<T>(&self, offset | labels: A-diagnostics, A-macros, T-compiler, A-suggestion-diagnostics, D-newcomer-roadblock", "label": "medium", "label_id": 2} |
| {"id": "rust_145123", "text": "Performance regression with auto-vectorization from 1.87 onwards | ### Code I tried this code: ```rust pub fn unfilter_4(previous: &[u8], current: &mut [u8]) { let mut a_bpp = [0; 4]; let mut c_bpp = [0; 4]; for (chunk, b_bpp) in current.chunks_exact_mut(4).zip(previous.chunks_exact(4)) { let new_chunk = [ chunk[0].wrapping_a | labels: A-LLVM, T-compiler, regression-from-stable-to-stable, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_152177", "text": "[ICE]: Compiler panic while compiling ppc64le rust code in linux tree | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \"Rust Bug Minimization Patterns\" for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, T-compiler, O-PowerPC, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_26697", "text": "Add conversions from Box<str> and String | Tracking issue for https://github.com/rust-lang/rfcs/pull/1152 | labels: B-RFC-approved", "label": "medium", "label_id": 2} |
| {"id": "rust_26701", "text": "Shadowed variable isn't droped until the end of outer scope | ``` struct Test { n: usize } impl Drop for Test { fn drop(&mut self) { println!(\, self.n); } } fn main() { println!(\); let a = Test { n: 1}; println!(\); let a = Test { n: 2}; println!(\); } ``` produces ``` Hello, wlabelmediumlabel_id |
| idrust_26702textAdd support for cross compiling to the rump kernel | https://github.com/rumpkernel/ is a neat project for a minimal netbsd anykernel. Since rump kernel is compatible with netbsd I've started adding support for cross compiling a amd64 netbsd rustc at https://github.com/rust-lang/rust/pull/26682 https://github.com/rust-lang/rust-inst | labels: C-enhancement", "label": "question", "label_id": 4} |
| {"id": "rust_26704", "text": "CoerceUnsized isn't implemented for rc::Weak | ``` rust #![feature(rc_weak)] use std::rc::{ Rc, Weak }; use std::cell::RefCell; trait Barker { fn bark(&self); } struct Dog { x: i32, y: i32, } impl Barker for Dog { fn bark(&self) { println!(\) } } fn speak_weak(barker: Weak<RefCell<Barker>>) { let b = barker.upgrade().unwlabelmediumlabel_id |
| idrust_26706textChaining Arc<RefCell<..>> confuses borrowck. | http://is.gd/rNjThX ``` use std::sync::Arc; use std::cell::RefCell; struct A { a : Arc<RefCell<i32>> } struct B { b : Arc<RefCell<A>> } impl B { fn is_foo(&self) -> bool { *self.b.borrow().a.borrow() == 2 } } ``` This should compile, but it does not. Breaking the chain is a worka | labels: A-lifetimeslabelmediumlabel_id |
| idrust_26707textGeneric bit operations are cubersome | I've tried to implement operations which operates on bitvectors. For example: ``` rust fn set_bits<T, I = T>(start: I, end: I, val: T) -> T where T : ::core::num::Zero + ::core::num::One + ::core::cmp::Eq + ::core::ops::Not<Output = T> + ::core::ops::Sub<T, Output = T> + ::core:: | labels: T-libs-api, C-feature-request", "label": "medium", "label_id": 2} |
| {"id": "rust_26708", "text": "internal compiler error: cannot relate bound region: ReEarlyBound(7289, TypeSpace, 0, 'a) <= ReStatic | Hit this bug converting my code from using moving to references, ie: started adding lifetime specifiers. I don't exactly know what is happening to give more context sorry. ## Meta `rustc --version --verbose`: rustc 1.1.0 binary: rustc commit-hash: unknown commit-date: unknown hos | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_26709", "text": "ICE with type-pruned complex smart pointer | Converting my `Aref` type to handle unsized types has exposed an ICE (assertion failure) in `librustc_trans/trans/glue.rs` when handling `ArefInner`'s destructor. ``` error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: w | labels: I-ICElabelhighlabel_id |
| idrust_26710textUnexpected behaviour with stdin and .lines() on Windows | Using .lines() for input on Windows always reads an '\\r' at the end of the string. For example: ``` fn main() { use std::io::prelude::*; use std::io; let stdin = io::stdin(); for line in stdin.lock().lines() { let line = line.unwrap(); println!(\, line)labelmediumlabel_id |
| idrust_26714textICE \ | I got this ICE while trying to get E0128 error with code: ``` Rust pub struct Foo<Bar=Bar>; //~ ERROR E0128 pub struct Baz(Foo); fn main() { println!(\); } ``` I'll add the backtrace when I'll have a rust compiler (other than play.rust-lang at least).labelmediumlabel_id |
| idrust_26716textfs::create_dir_all fails for directory junctions on Windows | First reported in https://github.com/rust-lang/cargo/issues/1749, it looks like if an intermediate directory is a junction on Windows then `fs::create_dir_all` will fail. Unfortunately the standard library doesn't provide away to create a junction, but a setup like this should wo | labels: regression-from-stable-to-nightly, P-high, T-libs-api", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_26717", "text": "Crash/Deadlock when using RUST_LOG=rustc::middle::ty | ``` $ cat triv.rs fn main() {} $ RUST_LOG=rustc::middle::ty rustc triv.rs DEBUG:rustc::middle::ty: Interned type: bool Pointer: 0x7fc79208e310 DEBUG:rustc::middle::ty: Interned type: char Pointer: 0x7fc79208e338 DEBUG:rustc::middle::ty: Interned type: [type error] Pointer: 0x7fc7 | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_26719", "text": "`rustc -o -` crashes | When I tried this, I was hoping it would output the executable to stdout. Saving it as a file called `-` would be reasonable behavior too. ``` sh-session $ ls example.rs $ rustc -o - example.rs error: linking with `cc` failed: exit code: 1 note: \"cc\" \"-Wl,--as-needed\" \"-m64\" \"-L\" | labels: A-frontend, E-easy, E-needs-test, C-bug", "label": "low", "label_id": 3} |
| {"id": "rust_26720", "text": "Display note for \"unused variable\" warning suggesting that the warning can be disabled via underscores | For reference, see [this Reddit thread](https://www.reddit.com/r/rust/comments/3be26r/for_loop_with_unused_variable/) It seems to me that if you have code like this ``` rust for x in foo { // code that does not use `x`... } ``` Then in addition to the \"unused variable\" warning th | labels: C-enhancement, A-diagnostics", "label": "low", "label_id": 3} |
| {"id": "rust_26721", "text": "Internal Fulfillment Context assertion tripped, needs more investigation | I'm not sure if this is a bug or not, needs further investigation. It appears that by reusing the fulfillment_cx [here](https://github.com/jroesch/rust/blob/fulfillment-context-refactor/src/librustc/middle/traits/mod.rs#L452) we incur more obligations and later trip an [assertionlabelmediumlabel_id |
| idrust_26723textvec![elem; size] with run-time size should be highly visible in docs for std::vec, std::vec::Vec and std::vec! | It's a common beginner's problem to create a vector with run-time size filled with identical values, but the idiomatic solution is pretty much undiscoverable without asking people on IRC/StackOverflow/Reddit. cc @steveklabniklabellowlabel_id |
| idrust_26726textcfg!(linux) should work | Currently you need cfg!(unix), but we use #[cfg(target_os=\)]. I haven't tested, but we should make sure #[cfg(target_os=\"unix\")] also works.", "label": "medium", "label_id": 2} |
| {"id": "rust_26729", "text": "Tracking issue for Add some of `[T]`’s methods to strings and vice versa (RFC 1152) | https://github.com/rust-lang/rfcs/pull/1152 | labels: B-RFC-approved", "label": "medium", "label_id": 2} |
| {"id": "rust_26736", "text": "cannot move into irrefutable slice patterns with multiple elements | ``` rust let arr = [Box::new(1), Box::new(2), Box::new(3)]; let [a, b, c] = arr; ``` fails with ``` <anon>:5:13: 5:14 error: use of moved value: `arr[..]` [E0382] <anon>:5 let [a, b, c] = arr; ^ <anon>:5:10: 5:11 note: `arr[..]` moved here because it has type `Box<i32>`, which is | labels: A-borrow-checker, C-bug, fixed-by-NLL", "label": "medium", "label_id": 2} |
| {"id": "rust_26737", "text": "{String,Vec}::from_raw_parts docs need to be much clearer about incorrectness | The docs for these are currently fairly meagre: > ``` > unsafe fn from_raw_parts(buf: *mut u8, length: usize, capacity: usize) -> String > ``` > > Creates a new String from a length, capacity, and pointer. > > This is unsafe because: > - We call `Vec::from_raw_parts` to get a `Ve", "label": "low", "label_id": 3} |
| {"id": "rust_26739", "text": "In macros, expr followed by { is buggy | The following compiles: ``` rust macro_rules! test { ($e:expr {}) => {$e}; } ``` However, (1) this technically isn't allowed by the macro future proofing rules and (2) it doesn't work when `$e` is an ident because rust tries to parse `ident {}` as an invalid struct literal instan | labels: A-macros, P-high, T-lang", "label": "high", "label_id": 1} |
| {"id": "rust_26744", "text": "Windows: Self compiled rustdoc not interpreting `code` in markdown correctly | For example: ``` #![feature(rustdoc)] extern crate rustdoc; use rustdoc::html::markdown::Markdown; fn main() { let x = \"This program makes a variable binding named `x`.\"; println!(\"{}\", Markdown(x)); } ``` This code runs fine in the playpen (http://is.gd/HVGloB) and when using th | labels: T-rustdoc", "label": "low", "label_id": 3} |
| {"id": "rust_26746", "text": "Function pointers don't seem to be mentioned in the book | The fact that function pointers implement the closure traits `Fn`/`FnMut`/`FnOnce` also doesn't seem to be mentioned in either the book or the reference.", "label": "medium", "label_id": 2} |
| {"id": "rust_26748", "text": "Codegen bug: UnsafeCell<T: ?Sized> is declared noalias, despite it being aliasable | `fn(&UnsafeCell<i32>)` => `define internal void @and_test(%\"2.core::cell::UnsafeCell<i32>\"* dereferenceable(4)) unnamed_addr #1` As you can see, no `noalias`, and, weirdly, no `nocapture`. `fn(&UnsafeCell<[i32]>)` => `define internal void @and_test({ %\"2.core::cell::UnsafeCell<[i | labels: A-codegen", "label": "medium", "label_id": 2} |
| {"id": "rust_26753", "text": "#[no_mangle] is silently ignored on generic functions | A grossly simplified illustrative example. Assume we're in a library crate (I want to get a shared object out of this so I'm using `--crate-type dylib` but this appears to be a problem for the general case), and we have the following items defined. ``` rust pub enum Action { Thin", "label": "medium", "label_id": 2} |
| {"id": "rust_26755", "text": "The inner span for an empty module should point to the module's file | Assume you have `mod foo` where foo.rs is an empty file. There will be an `ItemMod` for the module and it's `inner` span will be a dummy span. It would be more useful if that span could be a zero-length span pointing into foo.rs's `FileMap`. (This is possible with a PR which shou | labels: A-parserlabellowlabel_id |
| idrust_26758textThe .msi installer freezes if you try to overwrite an existing Rust installation | I can't belive this issue wasn't reported. Many people on IRC had this problem at the release of 1.1. If you have the version 1.0 of Rust installed for example in `C:\\Program Files\\Rust`, then try to install version 1.1 to the same location, the installer will freeze forever and | labels: O-windows, P-medium, E-medium, T-dev-tools, C-buglabelmediumlabel_id |
| idrust_26760textf32 seen as ambiguous associated type | see http://stackoverflow.com/questions/31208465/pi-constant-is-ambiguous ``` rust fn main() { let _ = f32::consts::PI; } ``` fails to compile with: ``` bash $ rustc - <anon>:2:13: 2:28 error: ambiguous associated type; specify the type using the syntax `<f32 as Trait>::consts` [E | labels: A-diagnostics, C-bug, WG-diagnosticslabelquestionlabel_id |
| idrust_26764text.note.rustc dylib section flagged SHF_ALLOC on Linux (can cause crashes) | Having the metadata note section flagged \ can cause two types of crashes in certain environments. ## 1. Dynamic loader crash Glibc's dynamic loader will try to allocate and copy the entire section onto the stack which will crash if the stack size is limited. This section i | labels: O-linux, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_26767", "text": "Nightly: thread 'rustc' panicked at 'parse_region: bad input' | Building justinas/fortythree@d4b377ce8d2c0ba4fd4e3c2360a308e6c122bf08 with the latest nightly (2015-07-01 at the moment) makes the compiler panic unexpectedly. ``` thread 'rustc' panicked at 'parse_region: bad input', ../src/librustc/metadata/tydecode.rs:358 ``` This is seemingly | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_26768", "text": "Compiler both suggests and forbids the use of the core module | This is on Rust 1.1 stable. I'm learning Rust right now, and decided a good way to start off would be to write a linked list. In the process, I decided to add a `print_list` function that would traverse my linked list and print out it's contents. This would probably be fine had I", "label": "medium", "label_id": 2} |
| {"id": "rust_26773", "text": "Structs can be created via type-aliases | ## STR ``` Rust struct S { v: u32 } type T=S; fn main() { let T { v: u } = T { v: 42 }; println!(\"{}\", u) } ``` This also works with type parameters: ``` Rust struct S<T> { v: T } type Alias<T> = S<Vec<T>>; fn main() { // look at ma, no type annotations println!(\"{:?}\", Alias { v | labels: A-type-system", "label": "medium", "label_id": 2} |
| {"id": "rust_26774", "text": "rustc panic trying to unwrap error \"failed to open archive\" | I was trying to build cargo using the latest rustc nightly, and encountered the following error while building libgit2-sys: ``` rust:cargo lambda$ RUST_BACKTRACE=1 make \"/usr/local/bin/rustc\" -V rustc 1.3.0-nightly (bf3c979ec 2015-06-30) \"/usr/local/bin/cargo\" --version cargo 0.4 | labels: I-ICE, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_26775", "text": "`extern crate` is always treated as `pub` within the crate, but is not visible outside it; `pub extern crate` makes no difference | Two examples: ``` rust #![feature(core)] #![crate_type = \"lib\"] pub extern crate core; ``` That is accepted but `core` cannot be accessed from outside the crate. ``` rust #![feature(core)] #![crate_type = \"lib\"] mod foo { extern crate core; // behaves identically // pub extern cr | labels: A-resolve, A-visibility, P-high, T-lang", "label": "high", "label_id": 1} |
| {"id": "rust_26779", "text": "TRPL Dining philosophers should all eat together when threaded | The first output of the threaded example is: ``` Gilles Deleuze is eating. Gilles Deleuze is done eating. Friedrich Nietzsche is eating. Friedrich Nietzsche is done eating. Michel Foucault is eating. Baruch Spinoza is eating. Baruch Spinoza is done eating. Karl Marx is eating. Ka", "label": "medium", "label_id": 2} |
| {"id": "rust_26780", "text": "std::slice::SliceConcatExt impls should rely on AsRef rather than Borrow | `HashMap` assumes that `Borrow` implies compatible hashing, which may not be desirable: https://github.com/servo/string-cache/pull/89", "label": "medium", "label_id": 2} |
| {"id": "rust_26793", "text": "reference: explain what \"implies\" means in Closure types section | There are these 2 statements in [8.1.10](http://doc.rust-lang.org/reference.html#closure-types): > `FnMut` implies `FnOnce` > `Fn` implies `FnMut` and `FnOnce` Is the word _implies_ used correctly? What does it mean?", "label": "medium", "label_id": 2} |
| {"id": "rust_26794", "text": "Export fd_set in libc or libnative | This is essentially re-opening #16297. Per the original reporter, I'm trying to write a binding to a C network-related library and would like fd_set to be available without having to duplicate effort. That issue was closed on the grounds that the desired function did exist, whichlabelmediumlabel_id |
| idrust_26797textICE path not fully resolved, associated constants | Implementing my own fd_set because, per #26794, I can't find one exported elsewhere. But trying to be clever about the size of the required array causes a panic: ``` extern crate libc; pub struct fd_set { pub __fds_bits: [libc::c_long ; (1024 / usize::BITS)], } fn main () { } ``` | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_26801", "text": "comments.md doesn't know about `//!` | [The chapter on comments](http://doc.rust-lang.org/book/comments.html) discusses two types of comments: `//` comments and `///` doc comments. [The section on testing](http://doc.rust-lang.org/book/testing.html#documentation-tests) mentions a third type: `//!` module doc comments.labellowlabel_id |
| idrust_26802textICE: \ | Stumbled upon the following error when trying to box a trait where a inner lifetime (function) needs to be a subtype of an outer lifetime (trait) ### playpen http://is.gd/tFVEpb ### code ``` rust trait Foo<'a> { fn bar<'b>(&self, _: &'b u8) where 'a: 'b { /* */ } } pub struct Foo | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_26803", "text": "Remove windres.exe from MinGW distribution | We're not shipping all the dependencies anyway right now and should just stop shipping everything related to this (cc https://github.com/rust-lang/rust/pull/25030) | labels: O-windowslabelmediumlabel_id |
| idrust_26805textWhere-clause based exclusion of default methods from vtable doesn't normalize correctly. | @Ms2ger reported that on rustc-1.3.0-dev (f3b97a74a), https://github.com/mlalic/solicit ICEs with: ``` rust src/libcore/iter.rs:804:35: 804:42 error: internal compiler error: Encountered errors `[FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<http::session::DefaultS", "label": "high", "label_id": 1} |
| {"id": "rust_26810", "text": "Recursive constant checker needs to check types | ``` rust type A = [u8; C.0]; const C: (usize, A) = (1, [1]); struct A2 { u: usize, a: [u8; C2.u] } const C2: A2 = A2{ u:1, a:[1] }; fn main() { println!(\"{:?} {:?}\", C.1, C2.a); } ``` Currently accepted without errors; I would expect an error. | labels: A-type-system", "label": "medium", "label_id": 2} |
| {"id": "rust_26812", "text": "error: internal compiler error: unexpected panic | ``` 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/rust/blob/master/CONTRIBUTING.md#bug-reports note: run with `RUST_BACKTRACE=1` for a backtrace thread | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_26813", "text": "Regression on beta for trait bounds on supertrait's associated items | The following playpen works on 1.0, Stable(1.1) and Nightly(1.3 bf3c979ec 2015-06-30) but fails to compile on current Beta (1.2). http://is.gd/cQJ1Xk It would be good if we could backport whatever fixed the behavior for 1.3. cc @nagisa | labels: regression-from-stable-to-nightly, P-high, T-lang, relnoteslabelcritical_buglabel_id |
| idrust_26815textICE - path not fully resolved | This code triggers an ICE: ``` use std::collections::*; pub enum A {a} fn main() { let xs = HashSet::new(); xs.contains(&A::DoesntExist); } ``` ``` error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate labelhighlabel_id |
| idrust_26823textrustc panic when shifting SIMD types | I tried the `core::simd::f32x4` which I wanted to invoke operator `Shl`. I tried this code: ``` rust #![feature(core, core_simd)] extern crate core; use core::simd::f32x4; fn main() { let x = f32x4(1.0, 2.0, 3.0, 4.0); let y = f32x4(2.0, 2.0, 2.0, 2.0); x << y; } ``` Causes the f | labels: I-ICElabelhighlabel_id |
| idrust_26826textImprove multi-core performance of Arc | A long time ago (2010), [a post](https://mail.mozilla.org/pipermail/rust-dev/2010-December/000140.html) was made to the rust-lang mailing list on the topic of immutable data structures and reference counting. In particular, the author points out that naïve reference counting is qlabelmediumlabel_id |
| idrust_26839textShould emit error about private struct before unresolved name | I was trying to use std::thread::sleep and created the following code: ``` rust use std::time::duration::Duration; use std::thread::sleep; fn main() { sleep(Duration(1)); } ``` The (only) error message is: ``` <anon>:5:11: 5:19 error: unresolved name `Duration` <anon>:5 sleep(Dur | labels: A-diagnosticslabelmediumlabel_id |
| idrust_26840textnegate_unsigned feature gate triggered for user-defined Neg | ``` rust struct S; impl std::ops::Neg for S { type Output = u32; fn neg(self) -> u32 { 0 } } fn main() { -S; } ``` ``` <anon>:6:13: 6:15 error: unary negation of unsigned integers may be removed in the future <anon>:6 fn main() { -S; } ^~ ``` | labels: A-diagnosticslabelmediumlabel_id |
| idrust_26842textRustdoc does not properly escape colons in hrefs | Given ``` # Example 2: aliasing a mutable reference ``` Rustdoc creates the following anchor ``` #example-2:-aliasing-a-mutable-reference ``` which browsers (Firefox at least) vomit on if you try to enter it the URL bar. I suggest just eating the colon. | labels: T-rustdoclabelmediumlabel_id |
| idrust_26843textconcat_idents! fails \ | Attempting to use the concat_idents! macro in some code I'm messing around with locally, and it keeps failing on compile with: ``` [matt@loki crypto]$ rustc crypto.rs crypto.rs:22:17: 22:71 error: concat_idents! expecting comma. crypto.rs:22 let f = concat_idents!(token::str_to_i", "label": "medium", "label_id": 2} |
| {"id": "rust_26845", "text": "Integer division/remainder rounding behavior should be documented | Using Google I can find lots of old arguments over how integer division should work in Rust, but I cannot find anything in the reference, the API docs for the integer types, or the API docs for the `Div` trait that says what was actually decided. (And the documentation seems to i", "label": "low", "label_id": 3} |
| {"id": "rust_26847", "text": "Associated constants should not be object safe | The following code compiles: ``` rust #![feature(associated_consts)] trait Foo { const FOO: u32; } impl Foo for () { const FOO: u32 = 1; } fn main() { let _: &Foo = &(); } ``` Furthermore, adding the line `<Foo>::FOO;` to `main` causes an ICE: ``` error: internal compiler error: | labels: A-type-system, A-trait-system, A-associated-items, T-lang", "label": "high", "label_id": 1} |
| {"id": "rust_26851", "text": "Difficult for plugins to set visibility of Items | Even though the `vis` field of `syntax::ast::Item` is `pub`, it's pretty difficult for compiler plugins to set visibility of an item, since they tend to be passed around wrapped in `P<>`. `ExtCtxt` doesn't seem to provide any means to do it. I had to write this horrible hack to s", "label": "medium", "label_id": 2} |
| {"id": "rust_26860", "text": "Rustc doesn't run on Fedora 22 | ``` batisteo@w650sz:~$ curl -f -L https://static.rust-lang.org/rustup.sh -O ``` ``` bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 41917 100 41917 0 0 35305 0 0:00:01 0:00:01 --:--:-- 35313 ``` ``` batisteo@w650sz:~$ slabellowlabel_id |
| idrust_26862textICE compiling \ crate | Sorry about the giant backtrace. This is attempting to compile [solicit](https://github.com/mlalic/solicit). ``` nri@nri-desktop:~/software/nri/solicit$ RUST_BACKTRACE=1 cargo build --verbose Fresh libc v0.1.8 Fresh log v0.3.1 Compiling solicit v0.4.0 (file:///home/nri/software/nlabelhighlabel_id |
| idrust_26864textRedundant trait bounds in compile error suggestion | code: ``` rust pub fn str_join(strs: &[AsRef<str>], join: str) -> String { strs.iter().fold(String::new(), |mut acc, s| { if !acc.is_empty() { acc.push_str(join); } acc.push_str(s); acc }); } fn main() {} ``` message: ``` <anon>:2:10: 2:16 error: no method named `iter` found for | labels: A-diagnosticslabelmediumlabel_id |
| idrust_26865textGeneric to determine size at compile time | It would be nice to be able to make a datatype like the following: ``` type tname<N> = Vec<[int; N]>; ``` Where N is not a type but an integer. So, for example: ``` let instance = tname::<5>::new(); ``` would create an instance of `Vec<int; 5]>`labelmediumlabel_id |
| idrust_26866textICE with trait object + associated type | Probably not minimal example: ``` rust #[derive(Clone, Debug)] struct Foo; pub trait Bar { fn shrink(&self) -> Box<Iterator<Item=Self>>; } impl Bar for Foo { fn shrink(&self) -> Box<Iterator<Item=Foo>> { Box::new(None.into_iter()) } } fn main() { } ``` Version: `rustc 1.3.0-night | labels: I-ICElabelhighlabel_id |
| idrust_26867textlibstd: Div is not implemented for Wrapping | Is this intentional or has this been an oversight? | labels: E-easylabellowlabel_id |
| idrust_26868textAdd issue references to each `#[unstable]` | `#[unstable]` now supports the `issue = \` field, that allows linking it to an issue here, e.g. `#[unstable(feature = \, reason = \, issue = \)]`. We should use it more. The exact arrangement of which library features need issues/how those issues will be laid outlabelquestionlabel_id |
| idrust_26871textrustdoc: show the descriptions of traits’ implementations if any | Right now if one adds additional information to an implementation of a trait’s method, that information is not shown in the output of `rustdoc`. For instance, the [implementation](https://github.com/rust-lang/rust/blob/master/src/liballoc/rc.rs#L457-L482) of `Drop` for `Rc` has a | labels: T-rustdoclabelmediumlabel_id |
| idrust_26872textLinking error unless 'use'd | While working on a sample game with rust I encountered a strange bug which I believe to be a corner case of the setup I have. I am unable to recreate it in a simpler crate, so I am going to submit the code as I have it right now, hoping someone else might spot what is going wronglabelmediumlabel_id |
| idrust_26873textunresolved import using separate files, but not mod statements | This code compiles: ``` rust //! lib.rs mod A { pub mod B { use super::*; pub struct S; } pub mod C { use super::*; use super::B::S; pub struct T; } pub use self::C::T; } use A::*; ``` ``` $ rustc --crate-type lib lib.rs -Awarnings $ ``` However, splitting the code into files cau | labels: E-needs-testlabelmediumlabel_id |
| idrust_26875textRustc unexpectedly panicked | Backtrace: ``` ../src/libcore/iter.rs:804:35: 804:42 error: internal compiler error: Encountered errors `[FulfillmentError(Obligation(predicate=Binder(TraitPredicate(<http::session::DefaultStream as core::cmp::PartialOrd>)),depth=1),Unimplemented)]` fulfilling during trans note: labelhighlabel_id |
| idrust_26880textDo not require to implement a trait method if a constraint is not satisfied | Consider the [following example](http://is.gd/TOrGVM): ``` rust trait Foo { fn foo(&self); fn bar(&self) where Self: Bar; } trait Bar { } struct Baz; impl Foo for Baz { fn foo(&self) {} } ``` The example produces the following error: ``` <anon>:11:1: 13:2 error: not all trait ite | labels: A-trait-systemlabelmediumlabel_id |
| idrust_26886textICE: a type named `...` has already been imported in this module. | ``` $ RUST_BACKTRACE=1 make cfg: version 1.3.0-dev (fd8e175c4 2015-07-08) 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 x86_64-unknown | labels: I-ICE, E-needs-testlabelhighlabel_id |
| idrust_26888textDocument replacement behavior of map and set insertion methods | The behavior of the following methods is undocumented when the key/item being inserted is equivalent to one already in the collection: - [`BTreeMap::insert`](https://doc.rust-lang.org/nightly/std/collections/struct.BTreeMap.html#method.insert) - [`BTreeSet::insert`](https://doc.rlabelmediumlabel_id |
| idrust_26890text`Stdin:read_line` does not need `&mut self` | Currently, `Stdin::read_line` takes `self` as `&mut`. Why is that? The implementation simply locks and calls `read_line` on the guard, and locking doesn't need a mutable `self`. So this is unnecessary, and the doc doesn't say why this was done. (Nor does the source.) So I propose | labels: T-libs-apilabelmediumlabel_id |
| idrust_26900textRename SliceConcatExt::connect to join | Tracking issue for https://github.com/rust-lang/rfcs/pull/1102 | labels: E-easy, B-RFC-approvedlabellowlabel_id |
| idrust_26902textEnsure loops optimize right at the LLVM level | This involves 4 steps: 1) Gather up several different loop/iterator idioms that should optimize to e.g. memset/memcopy and run it through `rustc -opt-level=0 --emit=llvm-ir` 2) Feed the IR from step 1 into `opt -O2 -print-before-all` and grab the IR from before `Recognize loop id | labels: I-slow, A-codegen, E-mentorlabelmediumlabel_id |
| idrust_26905textDST coercions are prevented by phantom data | This prevents Rc from having a sound definition with respect to dropcheck ``` rust #![feature(unsize, coerce_unsized)] use std::marker::{Unsize, PhantomData}; use std::ops::CoerceUnsized; struct MyRc<T: ?Sized> { ptr: *const T, _boo: PhantomData<T>, } impl<T: ?Sized + Unsize<U>, | labels: A-DSTs, P-highlabelhighlabel_id |
| idrust_26906textRename slice::{tail, init} per RFC 1058 | Tracking issue for https://github.com/rust-lang/rfcs/pull/1058 | labels: B-RFC-approvedlabelmediumlabel_id |
| idrust_26908textillegal hardware instruction | rustc generates an executable which crashes with `illegal hardware instruction`. Steps to reproduce: ``` git clone https://github.com/j-e-k/rust-dmat-bug cd rust-dmat-bug cargo bench ```labelmediumlabel_id |
| idrust_26911textUnstable features should not appear in API documents built for stable Rust | Users on stable and beta channel cannot use unstable features, so it makes no sense to print those APIs to their documents.labelmediumlabel_id |
| idrust_26912textinternal compiler error: translating unsupported cast | ``` % rustc --version rustc 1.1.0 ``` The following minimal example will cause an internal compiler error: ``` fn main() { let x = String::new() as String; } ``` Error text: ``` % RUST_BACKTRACE=1 rustc wat.rs wat.rs:1:16: 1:17 warning: unused variable: `x`, #[warn(unused_variabllabelquestionlabel_id |
| idrust_26915textLLVM assertion regression for msvc | While it's been building fine for a while now, an appveyor build for `glutin` failed with an LLVM assertion for `x86_64-pc-windows-gnu` on `winapi-build`. The `i686-pc-windows-gnu` build, using the same rustc version, was fine though. https://ci.appveyor.com/project/tomaka/glutin | labels: A-LLVM, I-ICE, T-compiler", "label": "question", "label_id": 4} |
| {"id": "rust_26916", "text": "Explain when/why to use lifetimes in TRPL Lifetimes chapter | Some [feedback from Reddit](https://www.reddit.com/r/rust/comments/3cl12r/is_rust_too_complicated/csx0y6t): > The book doesn't explicitly explain when to use lifetimes. [This page](https://doc.rust-lang.org/book/lifetimes.html) explains in broad strokes why Rust needs lifetimes alabelmediumlabel_id |
| idrust_26917textExplain the `<>` more, in or before the Lifetimes chapter of TRPL where it first appears | Some [feedback from reddit](https://www.reddit.com/r/rust/comments/3cl12r/is_rust_too_complicated/csx0y6t): > Also, the function<blah>syntax hadn't come up previously [to the Lifetimes chapter], so it would be nice to expand on that. The Lifetimes chapter currently has: > Before ", "label": "medium", "label_id": 2} |
| {"id": "rust_26918", "text": "Trait inherits from other traits, but cannot be casted back to them | I don't know why I cannot cast `FooBar` back to `Foo` or `Bar`. I tried this code: ``` rust trait Foo {} trait Bar {} trait FooBar: Foo + Bar {} impl <T: Foo + Bar> FooBar for T {} struct A; impl Foo for A {} impl Bar for A {} fn test(fb: &FooBar) -> &Foo { fb as &Foo } fn main() | labels: A-type-systemlabelmediumlabel_id |
| idrust_26920textDebug for `str` writes one byte at a time | The `Debug` formatter for `str` outputs one byte at a time to the underlying writer. We could improve this, for example we could skip forward while no escaping is needed, and if we find a char to escape, write the backlog and then write escape for the current char, and continue. | labels: I-slowlabelmediumlabel_id |
| idrust_26922textICE using an associated constant as an array length in a function parameter | The following code causes an ICE using the latest nightly. ``` #![feature(associated_consts)] pub trait Test { const LENGTH: usize; fn method(array: [i32; Self::LENGTH]) { } } fn main() { } ``` Running with RUST_BACKTRACE=1 gives ``` thread 'rustc' panicked at 'path not fully res | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_26927", "text": "Deref and DerefMut docs don't mention autoderef/deref coercions | Current docs are: > The Deref trait is used to specify the functionality of dereferencing operations like *v. > The DerefMut trait is used to specify the functionality of dereferencing mutably like *v = 1;labellowlabel_id |
| idrust_26930text1.1.0: glob imports break re-exporting a crate | `cargo new mycrate` Add to `Cargo.toml`: ``` [dependencies] num = \ ``` Make empty `x.rs` file: `touch mycrate/src/x.rs` Contents of `mycrate/src/lib.rs`: ``` extern crate num; use num as num_export; use self::x::*; ``` ``` $ cargo build Compiling issue v0.1.0 (file:///home/ste | labels: A-resolve, E-needs-testlabelmediumlabel_id |
| idrust_26933text`std::fs::copy` sets permissions too late | `std::fs::copy` makes a new file, reads permissions of the old file, copies contents of the old file to the new file, and then sets permissions of the new file to those it just read. If used to copy a file that is only readable to the current user into a public directory, there's | labels: T-libs-api, C-feature-accepted", "label": "medium", "label_id": 2} |
| {"id": "rust_26937", "text": "Incorrect lifetime inferred for closure | Example: ``` rust struct Z<'a> { q: &'a (FnMut(&str) + 'a) } impl<'a> Z<'a> { fn new(q: &'a (FnMut(&str) + 'a)) -> Z<'a> { Z { q: q }} } pub fn main() { let c = |s| { println!(\"{}\", s); }; Z::new(&c); } ``` Fails with: ``` <anon>:12:16: 12:18 error: type mismatch resolving `for<' | labels: A-closures, A-borrow-checkerlabelmediumlabel_id |
| idrust_26938textRules for object safety should be documented | Currently, the only documentation of the rules for object safety I could find is in [this blog post](https://huonw.github.io/blog/2015/01/object-safety/). However, this should also become part of the official documentation, for example [here](http://doc.rust-lang.org/stable/book/labelmediumlabel_id |
| idrust_26939textCompile error when compiling rustc for ios. | This is d0d37075a54b68df99c46d42655a06c575eecd3f. I am trying to follow [this tutorial](https://www.bignerdranch.com/blog/building-an-ios-app-in-rust-part-1/) to learn something about iOS. It contains a step about cross compiling rustc for iOS: ``` $ mkdir build && cd build $ ../labelquestionlabel_id |
| idrust_26940textAllow destructuring of Drop types by-value | This is equivalent to mem::forget, and therefore seems to be safe if a bit foolhardy. Only really a problem within the module that defines the type regardless. Maybe have a warn on by default. I don't like having to ptr::read out my fields when they aren't Copy.labelmediumlabel_id |
| idrust_26946textimprove error message for using unbound 'self' in macro | I just mistakenly tried to naively use `self` in a macro (which is only invoked by a method taking self), and got the error: ``` error: `self` is not available in a static method. Maybe a `self` argument is missing? ``` As described in #15682, failure is intended due to hygiene. | labels: A-diagnostics, A-macroslabelmediumlabel_id |
| idrust_26948textICE with attempted functional record update on struct-like enum variant | ``` rust fn main() { enum Foo { A { x: u32 } } let orig = Foo::A { x: 5 }; Foo::A { x: 6, ..orig }; } ``` produces: ``` % RUST_BACKTRACE=1 rustc huh.rs error: internal compiler error: no type for node 21: expr orig (id=21) in fcx 0x7000007f2ce8 note: the compiler unexpectedly pan | labels: I-ICElabelhighlabel_id |
| idrust_26949textAlias for Box of Arrays not working properly | I cannot use `my_alias::new` when box is wrapping an array. I tried this code: ``` rust type Value = Box<u8>; type Values = Box<[u8]>; fn test() { let a = Box::new(0); // works let b = Value::new(0); // works let c = Box::new([0u8, 8]); // works let d = Values::new([0u8, 8]); // | labels: A-diagnosticslabelmediumlabel_id |
| idrust_26952textStable regression in nightly | Type inference broke, or something. Hard to see why, as the file (broadcast.rs) is probably one of the simpler cases. Easiest repro to is clone the repo (it is also up on crates, though as an earlier version) ``` % git clone https://github.com/frankmcsherry/timely-dataflow Clonin | labels: regression-from-stable-to-nightly, P-high, T-langlabelcritical_buglabel_id |
| idrust_26953textClarify public type aliasing behavior | Compile: ``` rust // Example #1 mod mod_a { mod sub_a { pub struct InnerA; } pub type A = sub_a::InnerA; } use mod_a::A; fn main() { let a=A; } ``` ``` error[E0425]: unresolved name `A` --> test.rs:12:11 | 12 | let a=A; | ^ unresolved name ``` Yet A is quite obviously imported. T | labels: P-medium, A-docslabellowlabel_id |
| idrust_26954textinternal compiler error: unexpected panic | tried to compile the following code using `cargo build`: ``` rust pub fn anagrams_for<'a>(word: &'a str, variants: &'a [str]) -> &'a [str] { variants } ``` version: ``` ✗ rustc --version --verbose ruby-2.2.2 rustc 1.0.0-beta.3 (built 2015-04-30) binary: rustc commit-hash: unknownlabelhighlabel_id |
| idrust_26956textExcessive repeated errors when unsized slice is used in a for loop | This code: ``` rust fn main() { let vec = vec![1,4,35,13,42,1]; for x in vec[3..] { print!(\, x); } } ``` produces the following errors ``` main.rs:3:5: 5:6 error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277] main.rs:3 for x in vec[3..] { main | labels: A-diagnosticslabelmediumlabel_id |
| idrust_26962textAdditional 1.2. relnote items | - PR #26416 -- better error information for `std::io::Error`. cc @brson | labels: relnoteslabelmediumlabel_id |
| idrust_26964textDebug for CString is lossy | CString should escape its contents like a byte string, not trying to show it as utf-8. Right now it does the latter via `to_string_lossy()`labelmediumlabel_id |
| idrust_26968textExplicit difference between .. and _ in patterns in docs | When reading the book, specifically the [Ignoring Variants](https://doc.rust-lang.org/book/patterns.html#ignoring-variants) in Patterns, I found it unclear that in a pattern `..` can match multiple fields. Thus couldn't figure out what made it differ from `_`, without playing wit", "label": "low", "label_id": 3} |
| {"id": "rust_26969", "text": "LTO faulty build which is fixed by print!() | Found strange thing when i enable `lto` optimization: It always panics at this place https://github.com/DoumanAsh/collectionScripts/blob/lto_hyper/rust/vim_updater/src/main.rs#L43 ``` thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: \, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : {}\, : , : 2} |
| {: , : only string and byte strings supported in compare_values\, : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : /…\, : , : 4} |
| {: , : \, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : unreachable pattern\, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : filename-that-does-not-correspond-to-a-file\, : , : 2} |
| {: , : \, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : @\, : , : 2} |
| {: , : , : , : 2} |
| {: , : {} {}\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : Mutability\, : , : 2} |
| {: , : , : , : 2} |
| {: , : make -j8 rustc-stage1 && make check-stage1\, : , : 2} |
| {: , : {}\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : Taking a reference into a struct marked `repr(packed)` should become `unsafe`\, : , : 4} |
| {: , : , : , : 2} |
| {: , : borrowed value does not live long enough\{}\{}\, : , : 2} |
| {: , : , : , : 1} |
| {: , : use of unmarked library feature\cannot parse address\cannot parse address\, : , : 2} |
| {: , : {}\{}\, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : ==\ is_file_set == true; \, : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : outlives\outlives\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : this is a bug.\, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : {}\, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : \\r\\n\\t\Hello\\r\\n\\tThere\{:?}\{:?}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : tt\expr\{}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : dropping {:?}\, : , : 2} |
| {: , : 0wned\, : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : impl A .. {}\, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 0} |
| {: , : illegal\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : addw %rax, %rbx\={rbx}\{rax}\{rbx}\{}\, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : C\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : illegal hardware instruction\, : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : Test\dylib\, : , : 4} |
| {: , : <unnamed_field>\, : , : 2} |
| {: , : , : , : 2} |
| {: , : learn rust\, : , : 2} |
| {: , : ./something\/some/path\./somelabelmediumlabel_id |
| idrust_27356textfs::Path.PathExt::exists accesses uninitialized variable | When running this test program ``` #![feature(path_ext)] use std::path::Path; use std::fs::PathExt; fn main() { println!(\); Path::new(\).join(\).exists(); println!(\); } ``` in valgrind, I see the following error message: ``` ==labelmediumlabel_id |
| idrust_27357textsplit_at_mut does sketchy things with aliasing | The problematic function: ``` Rust fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) { unsafe { let self2: &mut [T] = mem::transmute_copy(&self); (ops::IndexMut::index_mut(self, ops::RangeTo { end: mid } ), ops::IndexMut::index_mut(self2, ops::RangeFrom { start: mid labelmediumlabel_id |
| idrust_27359textfreebsd32 test failures | ``` thread '<unnamed>' panicked at 'assertion failed: `(left == right)` (left: `140737488355328`, right: `3`)', ../src/libstd/fs.rs:2036 test fs::tests::open_flavors ... FAILED thread '<unnamed>' panicked at 'assertion failed: `(left == right)` (left: `140737488355328`, right: `3", "label": "medium", "label_id": 2} |
| {"id": "rust_27361", "text": "Confusing error message with unsafe functions in extern blocks | This code produces \"error: expected one of `fn`, `pub`, `static`, or `unsafe`, found `unsafe`\": ``` rust extern { unsafe fn foo(); } ``` | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_27362", "text": "rustdoc: `const fn` not displayed for reexported docs | Doc inclusion / doc reexport does not show `const fn` properly (example: std::cell::Cell::new). - Reexport metabug: rustdoc: Pain points of reexports #24305 - const fn tracker: #24111 | labels: T-rustdoc", "label": "low", "label_id": 3} |
| {"id": "rust_27363", "text": "Cargo.toml confused by [dependencies.url] | Using Cargo.toml [dependencies.url] in error against some named crate.io, will lead to compile errors, rather than suggesting some \"failed to parse\" error against Cargo.toml. For example: ``` [dependencies.url] regex = \"*\" git = \"https://github.com/servo/rust-url\" ``` will lead t", "label": "medium", "label_id": 2} |
| {"id": "rust_27366", "text": "rustc panic | Unfortunately, I have no idea what causes this panic. I wish I could give more useful info. Here is the backtrace: ``` error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.", "label": "high", "label_id": 1} |
| {"id": "rust_27367", "text": "Nightly panics when using associated constant in array size | In the playpen (Mode: Debug, Channel: Nightly) I was playing with associated constants when this code made the compiler panic: ``` rust #![feature(associated_consts)] use ::std::marker::PhantomData; trait Num { const VAL: usize; fn val() -> usize; } struct N1; impl Num for N1 { c", "label": "high", "label_id": 1} |
| {"id": "rust_27372", "text": "readelf complains that .note.rustc is malformed | After building rustc 1.1.0, if I run `readelf --section-headers --note` over the shared libraries produced, I see output like the following: ``` $ readelf --section-headers --note x86_64-unknown-linux-gnu/stage2/lib/libarena-e9599659.so There are 30 section headers, starting at o | labels: O-linux", "label": "medium", "label_id": 2} |
| {"id": "rust_27376", "text": "Some old doc should be removed | https://doc.rust-lang.org/stable/getopts/index.html People might see this page through old link, so these old pages should be removed. We may need `make clean` here, I guess..", "label": "medium", "label_id": 2} |
| {"id": "rust_27377", "text": "Error E0399 regression on nightly from beta. | I have found that with a trait of the form ``` trait Foo { type A = (); fn get_a(&self) -> Option<Self::A> { None } type B = (); fn get_b(&self) -> Option<Self::B> { None } } impl Foo for () { type A = (); } ``` I get the following error message on nightly (as of the time of this", "label": "high", "label_id": 1} |
| {"id": "rust_27381", "text": "Rustc crashed with stack overflow error | Test code is in https://github.com/zonyitoo/coroutine-rs with branch `boost-stackoverflow`. `cargo build` should be ok, but if you run `cargo run --example simple`, then it will report ``` Compiling coroutine v0.3.1 (file:///Users/zonyitoo/Projects/coroutine-rs) thread 'rustc' ha | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_27384", "text": "Bad impl of the new placement-in suggests to use `ref` where it is invalid | When you implement new placement protocol traits invalidly and consume the collection you’re placing into such as like this: ``` rust let mut x = MyVec(Vec::new()); in x {42}; x ``` the code yields ``` vec-emplace.rs:56:5: 56:6 error: use of moved value: `x` [E0382] vec-emplace.r | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_27389", "text": "Tracking issue for changing the global, default allocator (RFC 1974) | Tracking issue for ~~https://github.com/rust-lang/rfcs/pull/1183~~ https://github.com/rust-lang/rfcs/pull/1974 Known bugs: * [ ] The `#[global_allocator]` attribute doesn't work in modules #44113 Current status: * [x] Implemented in https://github.com/rust-lang/rust/pull/42727 * | labels: T-libs-api, B-unstable, C-tracking-issuelabellowlabel_id |
| idrust_27391textCompiler allows for wrong struct initialization | By mistake I used recursively `Default::default()` inside `Default::default()` implementation. Compilation suceeded, but program crashed on illegal instruction. I tried this code: ``` rust struct A { x: i32, } impl Default for A { fn default() -> A { A { x: 1 } } } struct B { x: labelmediumlabel_id |
| idrust_27394textTracking issue for `no_std` (RFC #1184) | https://github.com/rust-lang/rfcs/pull/1184 | labels: B-RFC-approvedlabelmediumlabel_id |
| idrust_27395textAssembly private symbols redefinition error | On playpen nightly ``` rust #![crate_type=\] #![feature(asm)] fn main() { unsafe { routine() } } pub unsafe fn routine() { asm!(\ : // no outputs : // no inputs : \ : \); } pub unsafe fn routine2() { routine(); // causes inlining, dup | labels: P-low, A-inline-assembly, T-compilerlabellowlabel_id |
| idrust_27396textstd::io::BufReader reads incorrect data | Steps to reproduce: 1) Download test TGA image at https://drive.google.com/file/d/0B7COwFox9fT8Wk9WSk5iMWRaRFk/view?usp=sharing . 2) Past this code in `bug_example.rs`: ``` Rust use std::fs::File; use std::io::BufReader; use std::io::Read; use std::path::Path; fn main() { let patlabelmediumlabel_id |
| idrust_27401textDrop flags on the stack not reinitialized in loops | It looks like that when a local variable is initialized in a loop and dropped in the same loop, the stack local drop flag for that local isn't reinitialized to \"not dropped\" when the loop runs after the first time. Concretely, this test passes on stable and fails on nightly right | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_27402", "text": "rustc does not add the LIBPATH for ucrt.lib to the MSVC command line. | When `cargo build` is used outside of an VS2015 {x86,x64} Native Tools Command Prompt, I receive this error during linking: `rustc: LINK : fatal error LNK1104: cannot open file 'ucrt.lib'` in librustc_trans/back/msvc/mod.rs: ``` rust // The MSVC linker uses the LIB environment va", "label": "medium", "label_id": 2} |
| {"id": "rust_27403", "text": "conflicting implementations when attempting to `impl<S> Into<S> for ArbitraryStructWithNoOtherImpls<S>` | At the very least (if this failure is expected), the error needs to be improved to actually point to the conflicting impl rather than simply printing the crate name and repeating the same function output that conflicts (if it is for some reason not possible to print better info a | labels: C-enhancement, A-diagnostics, P-low, T-lang", "label": "low", "label_id": 3} |
| {"id": "rust_27404", "text": "Rustbook isn't stripping %'s | https://doc.rust-lang.org/nightly/adv-book/ and https://doc.rust-lang.org/nightly/book/ Show the title rendered twice, once as a header, once as `% ...`", "label": "medium", "label_id": 2} |
| {"id": "rust_27408", "text": "Allow late environment capture for closures | I suggest to allow a closure to capture their environment either at its call site or whenever a reference to the closure leaves the scope in which it can access the environment. This would allow the following code which is a very common use case of lambdas and is currently reject", "label": "medium", "label_id": 2} |
| {"id": "rust_27409", "text": "Poor report of macro_rules! error message | rustc 1.3.0-dev (04badd6a9 2015-07-25) A macro_rules! syntax error reported at expansion site instead of macro definition: ``` macro_rules! sum { ($h:expr) => $h; ($h:expr, $($t:expr),*) => ($h + sum!($($t),*)); } fn main() { let i = sum!(2,3,4); println!(\"{}\", i); } ``` Error me | labels: A-diagnostics, A-macros", "label": "medium", "label_id": 2} |
| {"id": "rust_27412", "text": "Bikeshed \"The Advanced Rust Programming Language\" as a name | @dherman suggested this iirc -- but I can't remember. @brson is concerned that it is too similar Originally it was called _The Unsafe Rust Programming Language_ since it largely focuses on unsafe code and the stuff that matters to it.labelmediumlabel_id |
| idrust_27415textWeird statement macro expansion | ``` rust macro_rules! e { () => ( drop(1) drop(2) ) } fn main() { e!(); } ``` This is currently accepted; I would normally expect it to complain about a missing semicolon, or something like that. | labels: A-macroslabelmediumlabel_id |
| idrust_27420text[wish list] Confusing error message E0308 when using two diff versions of a library | I came across this confusing error message: ``` src/main.rs:17:37: 17:67 error: mismatched types: expected `&nalgebra::structs::vec::Vec3<f32>`, found `&nalgebra::structs::vec::Vec3<f32>` (expected struct `nalgebra::structs::vec::Vec3`, found a different struct `nalgebra::structslabelmediumlabel_id |
| idrust_27422textOption<T> `map_or` and `map_or_else` type is inconsistent with `map` | `map` method type is ``` fn map<U, F>(self, f: F) -> Option<U> where F: FnOnce(T) -> U ``` `map_or` method type is ``` fn map_or<U, F>(self, default: U, f: F) -> U where F: FnOnce(T) -> U ``` `map_or_else` method type is ``` fn map_or_else<U, D, F>(self, default: D, f: F) -> U whlabelmediumlabel_id |
| idrust_27425textIs there plan to add `Result<T, E>.expect_err` method? | `Result<T, E>` has `unwrap` and `expect` method yielding `Ok`, but only has `unwrap_err` yielding `Err`, there isn't `expect_err` method.", "label": "medium", "label_id": 2} |
| {"id": "rust_27427", "text": "`move_val_init` signature change broke freebsd32 build | I don't quite understand what's going on here, but it looks like intrinsics changed under us. From [`freebsd10_32` build 151](http://buildbot.rust-lang.org/builders/auto-freebsd10_32-1/builds/151/steps/compile/logs/stdio): ``` rustc: i686-unknown-freebsd/stage0/lib/rustlib/i686-u", "label": "medium", "label_id": 2} |
| {"id": "rust_27428", "text": "Getting started in the book should state how to get a backtrace | This is the most annoying and most useless error message ever if you don't know how to get a backtrace. The docs should state how to get one. Without a backtrace it's only helpful if you already know where the error isn't always the case. This: ``` rust vec![1, 2][7]; ``` Returnslabellowlabel_id |
| idrust_27429textConfusing Error Message When Doc Comment inside Array | Probably a few other places where it's also confusing. Should probably state something like 'unexpected doc comment. A doc comment must precede an item`. ``` rust fn main() { let a = [1.0, 1.0 /** b */, 1.0]; } ``` ``` <anon>:1:31: 1:39 error: expected one of `,`, `.`, or an oper | labels: A-diagnosticslabelmediumlabel_id |
| idrust_27430textmatch of associated_const from const_fn | I am using an associated constant in a match pattern. The associated constant was initiated with a const function. https://play.rust-lang.org/?gist=0a3ce02daba0b2226cac&version=nightly ``` rust #![feature(associated_consts, const_fn)] struct A(u32); impl A { const fn new() -> A { | labels: I-ICE, A-associated-itemslabelhighlabel_id |
| idrust_27433textInvalid error (E0425) reported | In the following code: ``` Rust fn main() { let foo = 42u32; const FOO : u32 = foo; } ``` We have the following errors: ``` Shell <anon>:3:23: 3:26 error: attempt to use a non-constant value in a constant [E0435] <anon>:3 const FOO : u32 = foo; ^~~ <anon>:3:23: 3:26 error: unreso | labels: A-diagnostics, E-needs-testlabelmediumlabel_id |
| idrust_27435textthe type placeholder `_` is not allowed within types on item signatures should hint at generics | The following signature yields the mentioned error ``` rust fn shuffle(args: Vec<_>) -> Vec<_> ``` it should be replaced by ``` rust fn shuffle<T>(args: Vec<T>) -> Vec<T> ``` There should be an error hint suggesting this change. | labels: C-enhancement, A-diagnostics, P-medium, E-medium, D-newcomer-roadblocklabellowlabel_id |
| idrust_27442textVecMap Debug implementation should use debug_map | Right now, it doesn't support pretty printing as a result.", "label": "question", "label_id": 4} |
| {"id": "rust_27443", "text": "compiler error on crate hyper 0.6.6 (solicit v.0.4.0) | I just tried to include extern crate hyper = \"*\" -> 0.6.6 when crate starts building there is an internal compiler error: Cargo.toml [dependencies] hyper=\"*\" $ rustc --version rustc 1.3.0-nightly (freebsd) $ cargo build Compiling solicit v0.4.0 src/libcore/iter.rs:804:35: 804:42 | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_27445", "text": "Warn on redundant 'as Foo' statements | ``` rust fn main() { let x: i8 = 42; let y: i8 = x as i8; println!(\"y: {}\", y); } ``` This doesn't generate any warnings from rustc, even though the `as i8` is redundant here. I bump into this occasionally when refactoring, so it would be nice if rustc could help find these sitaulabelmediumlabel_id |
| idrust_27446textrustc panics if the terminal's terminfo is invalid | If the terminfo for my terminal is malformed, rustc panics with ``` thread '<main>' panicked at 'assertion failed: `(left == right)` (left: `0`, right: `2`)', /home/rustbuild/src/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libterm/terminfo/parser/compiled.rs:315 ``` The | labels: A-frontend, E-needs-test", "label": "medium", "label_id": 2} |
| {"id": "rust_27448", "text": "Defining a public method on a private type alias causes linking failures | Suppose we have a crate named `c`. **src/lib.rs**: ``` rust pub struct A<T>(T); type B = A<()>; impl B { pub fn new() -> Self { A(()) } } ``` ``` text src/lib.rs:5:5: 7:6 warning: method is never used: `new`, #[warn(dead_code)] on by default src/lib.rs:5 pub fn new() -> Self { sr", "label": "medium", "label_id": 2} |
| {"id": "rust_27449", "text": "ICE when comparing two *const Trait for equality | Hey all, I'm trying to see if two &Trait refer to the same object. It sounds like the correct way to do this is by casting to `*const Trait` and comparing those pointers for equality, however this produces an ICE. Here's a simple [repro on playpen](http://is.gd/c4UIFd) and pasted | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_27450", "text": "poor error message when casting from fat raw pointer to usize | [playpen](https://play.rust-lang.org/?code=trait%20Num%20%7B%7D%0Aimpl%20Num%20for%20i32%20%7B%7D%0A%0Afn%20main%28%29%20%7B%0A%20%20%20%20%260i32%20as%20*const%20Num%20as%20usize%3B%0A%7D%0A&version=beta) ``` rust trait Num {} impl Num for i32 {} fn main() { &0i32 as *const Num | labels: E-easy, A-diagnostics", "label": "high", "label_id": 1} |
| {"id": "rust_27452", "text": "Entry point `_ZSt24__throw_out_of_range_fmtPKcz` not found in `libstdc++6.dll` | I cloned and compiled https://github.com/steveklabnik/rustbook on Windows 32bits. When trying to run the `rustbook.exe` executable, I get an error about entry point `_ZSt24__throw_out_of_range_fmtPKcz` not found in `libstdc++6.dll` (the exact message is in french for me). Happens", "label": "medium", "label_id": 2} |
| {"id": "rust_27454", "text": "Rust assumes PATH_MAX is not a lie in a few places | See http://insanecoding.blogspot.ca/2007/11/pathmax-simply-isnt.html for some background. Basically, `PATH_MAX` just doesn't work. Currently. Rust uses `PATH_MAX` in a few important places. ./src/libstd/sys/unix/fs.rs:377:`let mut buf = vec![0;libc::PATH_MAX as usize];` ./src/lib | labels: P-mediumlabelmediumlabel_id |
| idrust_27455textCompiler segfault / illegal instruction: llvm: Assertion `Ty && \' failed. | ## Environment #### Local Environment ``` Darwin genesis.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64 rustc 1.0.0 (a59de37e9 2015-05-13) (built 2015-05-14) ``` #### Playpen Environment This was tested 01/07/20 | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_27456", "text": "Warn for functions that should 'obviously' be unsafe | As a noob writing FFI code I have more than once made a mistake something like this ``` rust fn foo(pointer: *const u32) -> u32 { unsafe { *pointer + 1 } } ``` Clearly `foo()` should have been marked unsafe, as a caller can demonstrate by writing the following safe code: ``` rust", "label": "medium", "label_id": 2} |
| {"id": "rust_27457", "text": "Possible error about variance in the nomicon | [In the paragraph about the variance of `&mut T`](https://github.com/rust-lang/rust/blame/master/src/doc/tarpl/subtyping.md#L97) > (...) If `&mut T` was variant over T, then `&mut &'a str` would be a subtype of `&mut &'static str`, > **since `&'a str` is a subtype of `&'static st", "label": "medium", "label_id": 2} |
| {"id": "rust_27462", "text": "trim and related giving unexpected behavior on strings with many nulls | ``` #[test] fn validate_trim() { let s: &str = \"QUIT\\r\\n\"; let s2: &str = \"\\x51\\x55\\x49\\x54\\x0d\\x0a\"; let buf: [u8; 6] = [ 81u8, 85u8, 73u8, 84u8, 13u8, 10u8 ]; let buf2: [u8; 16] = [ 0x51u8, 0x55u8, 0x49u8, 0x54u8, 0x0Du8, 0x0Au8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]; let input: &str ", "label": "medium", "label_id": 2} |
| {"id": "rust_27463", "text": "io::Take's BufRead::fill_buf always attempts to fill the inner buffer | Even if self.limit is 0, fill_buf will attempt to read from the underlying BufRead, possibly causing additional blocking read(2) calls from split/read_until/etc: ``` use std::os::unix::io::FromRawFd; use std::fs::File; use std::io::BufReader; use std::io::BufRead; use std::io::Wrlabelmediumlabel_id |
| idrust_27465textStabilization of weak pointers | Currently, both `alloc::rc::Weak` and `alloc::arc::Weak` are unstable. The somewhat vague reason for this is that _weak pointers may not belong in this module_. Now this has been addressed multiple times in #24028 and I have been observing this situation for a few months. Howeverlabelquestionlabel_id |
| idrust_27466textstd::ptr::null() should perhaps use `llvm::ConstantPointerNull` rather than `0 as *const T` | - http://llvm.org/docs/doxygen/html/classllvm_1_1ConstantPointerNull.html But I know of no platform where `0 as *const T` is wrong! Maybe not that important... - http://stackoverflow.com/questions/12126252/what-does-nvidia-gpu-do-with-device-memory-0x0 - https://software.intel.colabelquestionlabel_id |
| idrust_27467textlink_section attribute seems to be broken | I compile the code below: ``` rust #[link_section = \] pub static MULTIBOOT_HEADER: multiboot::Header = multiboot::Header { magic: multiboot::HEADER_MAGIC, flags: HEADER_FLAGS, checksum: (-((multiboot::HEADER_MAGIC + HEADER_FLAGS) as i32) as u32), header_addr: 0labelmediumlabel_id |
| idrust_27468textCompiler outputs error in pieces, creating spaghetti output. | Output: ``` $ cargo test -- --nocapture Compiling unrar v0.1.0 (file:///Users/danyel/workspace/rust/unrar) src/archive.rs:151:17: 151:21src/archive.rs:151:17: 151:21 error: error: expected one of `!`, `.`, `::`, `;`, `{`, `}`, or an operator, found `Some`expected one of `!`, `.`, | labels: A-diagnosticslabelmediumlabel_id |
| idrust_27471textdocs: add `meta` to the list of valid designators | The documentation [says](https://doc.rust-lang.org/reference.html#macro-by-example): > Valid designators are item, block, stmt, pat, expr, ty (type), ident, path, tt (either side of the => in macro rules). `meta` is presumably a valid designator as well. Regards, Ivanlabellowlabel_id |
| idrust_27472textinto_ascii_lowercase shouldn't be deprecated | We really really need it for performance in Servo.", "label": "medium", "label_id": 2} |
| {"id": "rust_27477", "text": "Expressions involving blocks do not parse well | ``` rust 0; // OK 0 + 1; // OK {0} + 1; // Error: unexpected token: `+` ({0} + 1); // OK ``` @copy and @durka found this issue on IRC. I baked cookies for them! Also, @tsion found this interesting corner case: ``` // Is `*` a multiplication? Or a dereference? Currently it parses ", "label": "medium", "label_id": 2} |
| {"id": "rust_27478", "text": "A block evaluated as a function is not directly callable | ``` rust fn f() {} f(); // OK {f}(); // Error: expected `()`, found `fn()` let a = {f}; a(); // OK ``` Another corner case found here! | labels: A-diagnostics, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_27479", "text": "Link failure due to exporting function with a non-exported return type | This code snippet causes a link failure. I am guessing it is because the return type of foo is not publicly exported from the crate it is causing a link failure in the test. I tried this (reduced) code: lib.rs ``` rust mod helper { pub struct Foo; impl Foo { pub fn baz(&self) { }", "label": "medium", "label_id": 2} |
| {"id": "rust_27480", "text": "ICE in borrow checker | https://play.rust-lang.org/?gist=23de822c03921663ae66&version=nightly . Error message: ``` <anon>:110:25: 110:60 error: cannot assign to `*entry` because it is borrowed <anon>:110 *entry = FragmentRepr::Enum(discrs); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note: in expansion of if le | labels: I-ICE, A-borrow-checker", "label": "high", "label_id": 1} |
| {"id": "rust_27481", "text": "Overflow error for valid trait implementation | Playpen: https://play.rust-lang.org/?gist=8e86843e775a046c9cb7&version=stable AFAICT, the impl shouldn't cause an overflow error. | labels: A-trait-systemlabelmediumlabel_id |
| idrust_27482textInternal compiler error with &[[bool]] | Hi! When I was writing my own version of Game of Life, I made new function which caused message: ``` C:\\Users\\User\\projects\\testi2>cargo build Compiling testi2 v0.1.0 (file:///C:/Users/User/projects/testi2) ... some warnings... error: internal compiler error: unexpected panic notlabelhighlabel_id |
| idrust_27484textbuggy code generated when initializing a [Vec<_>;..] | The following code non-deterministically either works, goes into an infinite loop, or seg-faults, on both my mac environment and on https://play.rust-lang.org/, in all three channels. However, only in Debug mode -- it works fine in all three cases in Release. It also works fine ilabelmediumlabel_id |
| idrust_27485textrustc produces N^2 error messages for multiple mutable borrows | ``` rust fn main() { let mut x = 1; let mut addr; loop { match 1 { 1 => { addr = &mut x; } 2 => { addr = &mut x; } 3 => { addr = &mut x; } 4 => { addr = &mut x; } 5 => { addr = &mut x; } 6 => { addr = &mut x; } 7 => { addr = &mut x; } 8 => { addr = &mut x; } 9 => { addr = &mut x; | labels: A-diagnosticslabelmediumlabel_id |
| idrust_27486textICE when attempting to borrow non-existent item associated with type for argument | The following code generates an internal compiler error: ``` rust struct Mozilla; fn some_function(c: &Mozilla) {} fn main() { some_function(&Mozilla::PHANTOM); } ``` As far as I can tell: - One must be attempting to borrow (`&`) the value - It must be a non-existent name associalabelhighlabel_id |
| idrust_27487textBorrow checker gets confused with a mutable pointer which should be moved | ``` rust pub struct FragmentRepr(Vec<FragmentRepr>); pub fn accepted(mut entry: &mut FragmentRepr) { loop { let FragmentRepr(ref mut discrs) = *{entry}; entry = &mut discrs[0]; } } pub fn rejected(mut entry: &mut FragmentRepr) { loop { let FragmentRepr(ref mut discrs) = *entry; e | labels: A-borrow-checker, C-bug, fixed-by-NLLlabelmediumlabel_id |
| idrust_27489textunescaped quotation marks in macro-processed doc comments | It seems like one of the recent fix to macro handling of doc comments (perhaps [this](https://github.com/rust-lang/rust/pull/26777)) was a bit overzealous in not parsing the string, so that embedded quotation marks don't get escaped. It doesn't show up unless `stringify!` is call | labels: T-rustdoclabelmediumlabel_id |
| idrust_27492textrust-release-1.1.0 cannt configure on osx 10.11(beta 4) | the ./configure output is : configure: looking for configure programs configure: found program cmp configure: found program mkdir configure: found program printf configure: found program cut configure: found program head configure: found program grep configure: found program xarglabelmediumlabel_id |
| idrust_27497textis_instantiable check is broken by nested types | ## STR ``` Rust struct Foo<T>(T, Box<Bar<Bar<Foo<T>>>); struct Bar<T>(T); fn main() { println!(\); } ``` ## Results `Foo` is uninhabitable, but the uninhabitability error doesn't trigger. Removing one of the `Bar`-s does make it trigger. This is rather suprising. Th | labels: I-needs-decision, T-lang", "label": "medium", "label_id": 2} |
| {"id": "rust_27501", "text": "still some unneeded integer suffixes in the docs | I noticed recently that the FFI chapter still has `1u32` in places, from before integer fallback existed. That, along with any other suffixes, should be removed. (I'm not sure how many there are, exactly, but looking around for more while those get fixed is a Good Idea)labellowlabel_id |
| idrust_27506textPathBuf set_extension returns bool, builder pattern impossible | I think that returning bool when calling `set_extension` is weird because it breaks the builder pattern that you have with most other methods. For example I wanted to use it in my project, I have to change the extension from `.md` to `.html`. My first try was to do it like this: labelmediumlabel_id |
| idrust_27510text\ section comes before \ in TRPL | The [Concurrency](http://doc.rust-lang.org/nightly/book/concurrency.html) chapter of TRPL gives some background on `Send` and `Sync`, describing them as traits and giving a summary of their properties and how they allow preservation of memory safety in a concurrent context. But tlabelquestionlabel_id |
| idrust_27511textrepr C newtype for empty enum | It's currently legal to define the following type, even though `repr(C)` on empty enums is forbidden. ``` rust enum No {} #[repr(C)] struct Yes(No); ``` | labels: A-type-system", "label": "medium", "label_id": 2} |
| {"id": "rust_27513", "text": "Missing information when spanning E0282 | The function call note_obligation_cause seems to be missing after [this line](https://github.com/rust-lang/rust/blob/master/src/librustc/middle/traits/error_reporting.rs#L349-L352) but is present [here](https://github.com/rust-lang/rust/blob/master/src/librustc/middle/traits/erro | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_27514", "text": "Failing debuginfo test | The test that was restored in #27500 fails for me: ``` failures: ---- [debuginfo-gdb] debuginfo/gdb-pretty-struct-and-enums.rs stdout ---- NOTE: compiletest thinks it is using GDB version 7.7 error: line not found in debugger output: $13 = Some = {\"abc\"} status: exit code: 0 comm | labels: A-debuginfo, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_27517", "text": "Add `ByNeed` and `Predicate` traits | #18424 \"Implement collections reform\" was closed with one part left not implemented yet: > Tracking issue for rust-lang/rfcs#235, there are a number of sub-issues associated with this: > > [...] > > Backwards compatible changes that will require additional language features: > - | labels: B-RFC-approved, T-libs-api", "label": "medium", "label_id": 2} |
| {"id": "rust_27522", "text": "Bad span for self type | The high end of the span of `&SomeType` in ``` rust trait Foo { fn handler(self: &SomeType); } ``` is incorrectly set to `BytePos(0)`. | labels: A-diagnostics, A-trait-system, E-needs-test", "label": "medium", "label_id": 2} |
| {"id": "rust_27523", "text": "docs: clarify `PhantomData` vs \"phantom types\" statement | In the documentation for [`PhantomData`](https://doc.rust-lang.org/stable/core/marker/struct.PhantomData.html), it states that: \"Though they both have scary names, PhantomData<T> and \"phantom types\" are unrelated.\" This seems to not be an accurate description of the relationship ", "label": "low", "label_id": 3} |
| {"id": "rust_27526", "text": "Docs: nomicon: missing word in send-and-sync.md | In `send-and-sync.md`, there is a sentence where some word(s?) seem to be missing: > This means that they are unsafe to implement, and other unsafe code can that they are correctly implemented. (I suppose it's something like \?) r? @Gankro PS:labellowlabel_id |
| idrust_27532textNullable field optimization does the Wrong Thing when faced with associated types | ## STR ``` Rust use std::mem; trait Mirror { type Image; } impl<T> Mirror for T { type Image = T; } struct S1<T>(<T as Mirror>::Image); struct S2<T>(T); fn main() { println!(\, mem::size_of::<Option<S1<&u8>>>()); println!(\, mem::size_of::<Option<S2<&u8>>>())labelmediumlabel_id |
| idrust_27537textDocument interaction of std APIs with OS syscalls | @aturon and I have long had the desire to audit all of our various `std::{io, process, env, fs, os}` APIs with what they're actually doing on all platforms. This is very helpful for getting more information about the precise semantics of the API in various corner cases as well as", "label": "medium", "label_id": 2} |
| {"id": "rust_27541", "text": "Rust does not dynamically export functions in Android shared library | I've been trying to compile Rust for Android and call exported JNI functions directly from Java, without a C++ shim in between. I found that if I marked a function as `#[no_mangle] pub extern \` it would show up in the symbol table just like JNI exported functions in C++, but i | labels: O-androidlabelmediumlabel_id |
| idrust_27543textRustc produces bad binaries on Fedora 14, Centos 6.6, 32 bit | I think it's because of the TLS setup not working properly Here's a (sorry, screenshot) of vimdiff of readelf of a working and non-working binary https://i.imgur.com/zfdDYss.png -- Both compiled with the same rustc binary, but different host OSes. I believe this is related to htt | labels: T-libs-apilabelmediumlabel_id |
| idrust_27554textExplicit OIBIT impls hide the default impls | ``` rust #![allow(dead_code)] trait Foo {} struct A<T>(T); unsafe impl<T: Foo> Sync for A<T> {} // Comment this line and the code compiles trait IsSync: Sync {} struct X; impl IsSync for A<X> {} // error: the trait `Foo` is not implemented for the type `X` [E0277] fn main() {} `` | labels: A-type-system, A-trait-system, P-medium, T-langlabelmediumlabel_id |
| idrust_27559textMisleading \ warning message | We got the following warning message: ``` Shell warning: variant is never used: `Foo`, #[warn(dead_code)] on by default ``` For this code: ``` Rust enum Something { Foo, NotFoo } fn main() { match Something::NotFoo { Something::Foo => {} _ => {} } } ``` This warning could mislead | labels: A-lintslabelmediumlabel_id |
| idrust_27560textSpan output should be shortened to three lines (w/ ellipsis) unless --verbose | The compiler reports spanned warnings and errors with the full span of the responsible code. While that makes it abundandly clear where the error arose, it also makes the output very verbose by default. Since we have a `--verbose` command line flag, I propose that the compiler sh | labels: A-diagnosticslabelmediumlabel_id |
| idrust_27561textInvalid error message for E0423 | Example: ``` Rust struct Foo { x: u8 } println!(\, Foo); // error: `Foo` is a structure name, but this expression uses it like a function name ``` The error message is incorrect. | labels: A-diagnosticslabelmediumlabel_id |
| idrust_27567textpretty test should not specify --crate-type=lib when typechecking | Since the early days of pretty tests (77be30fa737c6b55faf3a52fbd2050f5b35ebb02) they were compiled as libraries so that they did not require a main function. By now they also run on all the run pass test, which all have a main and there is (or soon will be) at least one run pass labelmediumlabel_id |
| idrust_27569textEnd of macro invocation before expected produces EOF | ``` rust fn main() { let message = \; println!(\, message/); } ``` This gives the following compile error: ``` <anon>:3:34: 3:35 error: unexpected token: `<eof>` <anon>:3 println!(\, message/); ^ ``` I think this is slightly misleading: it's not an EOF a | labels: C-enhancement, A-diagnostics, A-parser, A-macros", "label": "low", "label_id": 3} |
| {"id": "rust_27570", "text": "mem::transmute is too restrictive | Because `mem::transmute` checks its constraints before monomorphization, it fails for types containing fields whose type is determined by a generic parameter: > cannot transmute to or from a type that contains unsubstituted type parameters It's great that it attempts to catch errlabelmediumlabel_id |
| idrust_27578textTracking issue for the `use_group_as` RFC | Tracking issue for rust-lang/rfcs#1219. Intention is to permit syntax like: ``` rust use std::io::{ Error as IoError, Read, Write } ``` the semantics of which are fairly self-explanatory. | labels: B-RFC-approvedlabelmediumlabel_id |
| idrust_27579textProjections, lifetimes, and WF tracking issue (RFC 1214) | ### Tracking issue for rust-lang/rfcs#1214 - [x] rust-lang/rust#26406 - [x] ~~rust-lang/rust#24622~~ - [x] ~~rust-lang/rust#23442~~ - [x] ~~rust-lang/rust#21748~~ - [x] ~~rust-lang/rust#25692~~ - [x] ~~rust-lang/rust#21953~~ - [x] ~~rust-lang/rust#27592~~ - [ ] Just take implied | labels: A-type-system, B-RFC-approved, T-lang, T-compiler, C-tracking-issue, S-tracking-needs-summarylabelcritical_buglabel_id |
| idrust_27580textLeading plus for string to integer parsing | The `parse::<i32>()` function (and all its cousins for other integer types) fail for strings starting with a `+` with `ParseIntError { kind: InvalidDigit }`. Failing snippet: ``` fn main () { assert_eq!(\.parse::<i32>().unwrap(), 42); } ``` The same error occurs with the symm | labels: P-low, I-needs-decision, T-libs-apilabelquestionlabel_id |
| idrust_27581textRedundant mut checking does not work for lazily initialized variables | The following piece of code contains a redundant `mut`, but triggers no warning: ``` rust fn main() { let mut a; a = 13; println!(\, a); } ```labelmediumlabel_id |
| idrust_27583textApparent regression in implied bounds | In the RFC 1214 branch, I found that at some point after a rebase (where a new snapshot was introduced), a new implied bound was needed. I believe this is specific to stage0, but I am not sure. I didn't have time to minimize or dig deeply, so i've marked the offending bound for n | labels: A-type-systemlabelhighlabel_id |
| idrust_27585textTracking issue for `read_exact` (RFC #980) | https://github.com/rust-lang/rfcs/pull/980 | labels: B-RFC-approved, T-libs-api, final-comment-periodlabelmediumlabel_id |
| idrust_27587textThe Rust Reference - no mention of #[cfg(target_env)]. | Title says it all. cc @steveklabniklabelmediumlabel_id |
| idrust_27589textDocs: & in colored method signatures not rendered correctly on chrome in windows 10 | When rendering [the documentation to any standard library class](https://doc.rust-lang.org/std/collections/struct.LinkedList.html) with Chrome Version 44.0.2403.130 m (64-bit) - the latest release on Windows 10, the & character is obviously not rendered correctly, as demonstrated | labels: T-rustdoclabellowlabel_id |
| idrust_27590textv1.2.0 error when building rustc for ios targets | Cannot seem to get the same targets to compile on v1.2.0, with the same commands used for v1.1.0 ``` bash git clone git@github.com:rust-lang/rust.git cd rust git checkout 1.2.0 ./configure --target=armv7-apple-ios,armv7s-apple-ios,i386-apple-ios,aarch64-apple-ios,x86_64-apple-ioslabelquestionlabel_id |
| idrust_27591text[Nightly 1.4.0-4f33e43cb 2015-08-05] Compiler panic when mis-using Zero trait | Attempting to misuse a trait can cause a compiler panic. The offending code is a simplified version of what I was working on. I tried this code: ``` fn rem_is_zero<T: Eq + Rem + Zero>(n: T, m: T) -> bool where <T as Rem>::Output: Zero + Eq { let z = <T as Rem>::Output::zero(); // | labels: I-ICE, regression-from-stable-to-nightlylabelcritical_buglabel_id |
| idrust_27592textformat_args! returned from a closure causes corruption/crash | The following code causes an abort in the generated executable, due to a bad jump in `::std::fmt::write` (indirect call to 0x1) This is present on stable, beta, and nightly, both with and without optimisation on. (from my tests in playpen) ``` rust fn write<'a, F: ::std::ops::FnO | labels: A-type-system", "label": "high", "label_id": 1} |
| {"id": "rust_27593", "text": "Error message for mutating field of immutable struct could be clearer | ``` rust struct Foo { pub v: Vec<String> } fn main() { let f = Foo { v: Vec::new() }; f.v.push(\"cat\".to_string()); } ``` The above code gives this compile error: ``` rust <anon>:8:5: 8:8 error: cannot borrow immutable field `f.v` as mutable <anon>:8 f.v.push(\"cat\".to_string()); ^ | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_27594", "text": "False negative comparing targets with equivalent paths | Imagine a directory structure such as: ``` ├── main.rs ├── target.json ├── libthing/ │ ├── lib.rs ``` Where `main.rs` depends on the separate crate `thing` ``` cd libthing/ && rustc lib.rs --target ../target.json rustc main.rs --target target.json --extern thing=libthing/libthing", "label": "medium", "label_id": 2} |
| {"id": "rust_27597", "text": "broken links in nightly docs search result | Searching https://doc.rust-lang.org/nightly/std/ for something from the `collections` module (i.e. `into_boxed_slice` produces links to the documentation of `core_collections::...` as well as `collection::...`, where the `core_collections::...` entries are listed first and more i | labels: T-rustdoc", "label": "low", "label_id": 3} |
| {"id": "rust_27598", "text": "std implementation of panic might not detect double panicking | Implementation of `std::panicking::on_panic` may panic and not detect it is double-panicking, entering endless loop of panicking and overflowing stack.", "label": "medium", "label_id": 2} |
| {"id": "rust_27599", "text": "Backport #27582 to beta | #27582 Needs to be back ported (I'm on a mobile device, and I forgot our protocol for nominating back ports. Just wanted to ensure this doesn't fall through the cracks.)", "label": "medium", "label_id": 2} |
| {"id": "rust_27601", "text": "Shift operators: signed RHS, Wrapping impl | **1. Shift operators are defined for signed RHS types** The following fails to compile: `1u32 << -1i32`; this compiles: `let i = -1i32; 1u32 << i` but panics due to overflow in debug mode and evaluates to `0` or `2147483648` in release mode, depending on whether the `u32` value i", "label": "question", "label_id": 4} |
| {"id": "rust_27602", "text": "thread 'rustc' panicked at 'assertion failed: index.end <= self.len()', ../src/libcore/slice.rs:544 | $ rustc --version rustc 1.2.0 (082e47636 2015-08-03) $ RUST_BACKTRACE=1 cargo build 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/rust/blob/master/CONT", "label": "high", "label_id": 1} |
| {"id": "rust_27604", "text": "Confusing error message when using arithmetic operators on different number types | ``` rust fn main() { let x : f32 = 1.0; let y = x / 10; //error: the trait `core::ops::Div<_>` is not implemented for the type `f32` } ``` The error message is confusing because it reads as though you cannot divide `f32`s at all when the real issue is that you can't divide a `f32 | labels: A-diagnosticslabelmediumlabel_id |
| idrust_27606textWhen are we getting the \ for struct inheritance | Aka virtual structs, [this](https://github.com/rust-lang/rfcs/blob/master/text/0341-remove-virtual-structs.md), although relatively old, said that there might be a general mechanism in the future. When is the future and what is the general mechanism?labelmediumlabel_id |
| idrust_27607textRustdoc should display the `since` version for stable items | You can't tell when something like `FromRawFd` was stabilized without going into the source: https://doc.rust-lang.org/stable/std/os/unix/io/trait.FromRawFd.html | labels: T-rustdoc", "label": "medium", "label_id": 2} |
| {"id": "rust_27608", "text": "Wrong \"Private type in exported type signature\" error | Consider this code: ``` rust mod a { pub mod x { pub fn return_x() -> ::X { ::X } } } struct X; fn main() { let _value = a::x::return_x(); } ``` It fails to compile with the following error: ``` test.rs:3:30: 3:33 error: private type in exported type signature test.rs:3 pub fn re", "label": "medium", "label_id": 2} |
| {"id": "rust_27610", "text": "std::sync::Once has way more barriers than necessary | I believe that (comments removed) ``` rust pub fn call_once<F>(&'static self, f: F) where F: FnOnce() { if self.cnt.load(Ordering::Acquire) < 0 { return } let prev = self.cnt.fetch_add(1, Ordering::Acquire); if prev < 0 { self.cnt.store(isize::MIN, Ordering::Release); return } le | labels: I-slow, C-enhancement, T-libs-apilabellowlabel_id |
| idrust_27614textBorrow checker overly conservative when assigning to a parent reference | Consider the following simplified testcase. This is some Rust translation of the C idiom `while ((p = p->next))`. ``` struct List { next: Option<Box<List>> } fn bar(p: &mut List) { let n = match (*p).next { Some (ref mut q) => &mut **q, None => p }; bar(n); } ``` The code compilelabelmediumlabel_id |
| idrust_27616textborrowck is unsound in the presence of `&'static mut`s | ## STR ``` Rust use std::mem; fn leak<T>(mut b: Box<T>) -> &'static mut T { // isn't this supposed to be safe? let inner = &mut *b as *mut _; mem::forget(b); unsafe { &mut *inner } } fn evil(mut s: &'static mut String) { // create alias let alias: &'static mut String = s; let inn | labels: T-lang", "label": "medium", "label_id": 2} |
| {"id": "rust_27619", "text": "Intermittent with backtrace-debuginfo.rs | http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/6036/steps/test/logs/stdio from https://github.com/rust-lang/rust/pull/27617 ``` failures: ---- [run-pass] run-pass/backtrace-debuginfo.rs stdout ---- error: test run failed! status: exit code: 101 command: i686-unkn", "label": "medium", "label_id": 2} |
| {"id": "rust_27620", "text": "btree: Reliance on structure layout | The function `collections::btree::node::Node::as_slices_internal_mut` relies on structure layout of two relatively unrelated structures to be the same, which is considered a bad thing™: ``` #[inline] pub fn as_slices_internal_mut<'b>(&'b mut self) -> MutNodeSlice<'b, K, V> { unsalabelmediumlabel_id |
| idrust_27621textconfigure should make sure that LLVM FileCheck exists | Trying to package rust 1.2 into Debian & Ubuntu, I get the following test failures: ``` running 4 tests test [codegen] codegen/coercions.rs ... FAILED test [codegen] codegen/stores.rs ... FAILED test [codegen] codegen/loads.rs ... FAILED test [codegen] codegen/function-arguments.labelmediumlabel_id |
| idrust_27623textTcpStream fails to connect on pre-resolved socket address. | <short summary of the bug> I tried this code: ``` rust use std::net::{TcpStream, ToSocketAddrs}; fn main() { // all good let mut stream = TcpStream::connect(\).unwrap(); // resolving the address works let addr = \.to_socket_addrs() .unwrap() // unwrap relabelmediumlabel_id |
| idrust_27626textextern crate foo with use self::foo doesn't work inside a function | EDIT (@steveklabnik) see https://github.com/rust-lang/rust/issues/27626#issuecomment-263955318 This code fails and rustc doesn't tell you why: ``` rust fn main() { extern crate rand; use self::rand::Rng; } ``` ([playpen](http://is.gd/xYyadr)) I think it should at least warn, assu | labels: C-enhancement, A-diagnostics, A-resolvelabellowlabel_id |
| idrust_27627textInvestigate dynamic Vec growth strategy for jemalloc hugs | Facebook's alternative C++ STL uses a rather dynamic strategy to ostensibly be friendly for common workloads and jemalloc's size classes. While most of FBVector's stuff is hacking around the fact the move/copy constructors are Awful, this seems applicable to us. See: - https://gi | labels: I-slow, C-enhancement, A-collections, T-libs-api", "label": "low", "label_id": 3} |
| {"id": "rust_27628", "text": "loads.rs & stores.rs tests are failing with LLVM 3.6.1 | ``` ---- [codegen] codegen/stores.rs stdout ---- error: verification with 'FileCheck' failed status: exit code: 1 command: /usr/lib/llvm-3.6/bin/FileCheck -input-file=x86_64-unknown-linux-gnu/test/codegen/stores.ll /home/sylvestre/dev/debian/rustc.git/src/test/codegen/stores.rs s | labels: A-LLVM", "label": "medium", "label_id": 2} |
| {"id": "rust_27629", "text": "Float expressions confusing with trait method calls | ``` fn main() { // Both asserts give: // 'assertion failed: `(left == right)` (left: `-2`, right: `-3`)' assert_eq!( -2.4_f32.floor(), (-2.4_f32).floor() ); assert_eq!( -2.4_f64.floor(), (-2.4_f64).floor() ); } ``` rustc 1.2.0 (082e47636 2015-08-03) binary: rustc commit-hash: 082", "label": "medium", "label_id": 2} |
| {"id": "rust_27631", "text": "index out of range unexpected panic | I tried this code (my little follow up learning rust and ogl) ``` #[macro_use] extern crate glium; extern crate num; extern crate image; extern crate nalgebra; use std::io::Cursor; fn main() { use glium::{DisplayBuild, Surface}; use nalgebra::*; use num::traits::Float; let displa | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_27632", "text": "Add \"How to build documentation\" section. | It'd be helpful for people who want make documentation pull requests that aren't just typo's to be able to build the documentation, and preview it themselves. Adding a \ about how documentation for the main repo should be built, would be helpful.labelmediumlabel_id |
| idrust_27637textImprove documentation of std.io.ErrorKind variants | On the [std.io.ErrorKind](http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html) documentation page, there's a list of error kinds along with descriptions of what the kinds mean. I personally got confused by what the _new_ variant `InvalidData` actually means from that desc | labels: E-easy", "label": "low", "label_id": 3} |
| {"id": "rust_27639", "text": "Rust 'const iter' results in 'for'-errors | having the following code ``` rust fn main() { const iter: i32 = 5; for i in 0..10 { println!(\"{}\", i); } } ``` produces the following error: ``` rust src/main.rs:4:5: 6:6 error: type mismatch resolving ` as core::iter::IntoIterator>::IntoIter == i32`: expected struct `core::ops: | labels: A-macros", "label": "medium", "label_id": 2} |
| {"id": "rust_27640", "text": "Exporting a function as main does not work as expected | ``` mod foo { pub fn bar() { } } pub use foo::bar as main; ``` does not compile due to ``` error: main function not found aborting due to previous error ``` The expected behaviour would be that the compiler treats the global symbol `main` which resolves to `foo::bar` as the main ", "label": "medium", "label_id": 2} |
| {"id": "rust_27645", "text": "ERROR:rbml::reader: failed to find block with tag 258 while compiling 1.2 for arm-unknown-linux-gnueabi | While compiling rust 1.2.0 on a Ubuntu 15.04 virtualbox VM for arm-unknown-linux-gnueabi, I ran into a panic compiling src/librbml/libs.rs at line [395](https://github.com/rust-lang/rust/blob/master/src/librbml/lib.rs#L395). My configuration and build commands: ``` ./configure -- | labels: I-ICE, A-metadata", "label": "high", "label_id": 1} |
| {"id": "rust_27646", "text": "x86 MSVC does not use SSE(2) | @cmr noticed this on IRC. [On `i686-pc-windows-gnu`](https://github.com/rust-lang/rust/blob/master/src/librustc_back/target/i686_pc_windows_gnu.rs) and in fact on all other `i686-*` triples (except iOS, which is technically called `i386-*`), a SSE2-capable microarchitecture is as", "label": "medium", "label_id": 2} |
| {"id": "rust_27654", "text": "Note message after error recommends using inaccessible private fields. | The following code: ``` rust pub mod animal { pub struct Dog { pub age: usize, dog_age: usize, } impl Dog { pub fn new(age: usize) -> Dog { Dog { age: age, dog_age: age * 7 } } } } fn main() { let dog = animal::Dog::new(3); let dog_age = dog.dog_age(); //let dog_age = dog.dog_age", "label": "medium", "label_id": 2} |
| {"id": "rust_27656", "text": "Confusing move behavior | ``` rust struct Foo { bar: u32, } fn main() { let mut foo = Foo { bar: 10 }; let foo2 = foo; // <-- moved here foo.bar = 20; // <-- but still works! println!(\"{}\", foo.bar); // <- failed because `foo` has been moved } ```", "label": "medium", "label_id": 2} |
| {"id": "rust_27660", "text": "\"Expected operator, found `/`\" when passing operator to macro | ``` rust macro_rules! apply_op { ( $op:tt ) => {{ 4 $op 5 }}; } fn main() { let _ = apply_op!(/); } ``` gives: ``` <anon>:2:24: 2:27 error: expected one of `.`, `;`, `}`, or an operator, found `/` <anon>:2 ( $op:tt ) => {{ 4 $op 5 }}; ^~~ ``` The same thing happens for other oper | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_27661", "text": "string interpolation | things like: ``` rust let name = \"Anton\".to_string(); print!(\"hello {}\",name); ``` are very akward and verbose. What about scala-like string interpolation? ``` rust let name = \"Anton\".to_string(); print!(s\"hello $name\"); // s is put before string to tell that it is a string inter", "label": "medium", "label_id": 2} |
| {"id": "rust_27667", "text": "Feedback on Rust Vec<T> documentation from a beginner | Was: https://github.com/rust-lang/rust-www/issues/89, from @gnzlbg, submitted January 19th 2015. --- Hi, I just tried rust for the first time. From the description of the language, I decided to try a dynamic array first, since in my head this is the most important data structure ", "label": "low", "label_id": 3} |
| {"id": "rust_27669", "text": "\"source trait is private\" error with `writeln!` only when `println!` isn't used | This error is related to https://github.com/rust-lang/rust/issues/22050, not sure if it's a dupe. Some of the following code snippets rely on the [term](https://crates.io/crates/term) library (but the issue seems to be in Rust, not `term`). The following builds fine: ``` rust fn | labels: E-easy, E-needs-test", "label": "low", "label_id": 3} |
| {"id": "rust_27671", "text": "try!() on iterator element cause compiler crash | When using the try!() macro, directly on an iterator element. The compiler crashes, and fails to tell what is wrong with the code. I tried this code: ``` rust for try!(element) in elements { // Do stuff here } ``` Cargo crashed when attempting to compile the code. Commenting that | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_27673", "text": "Write::write_fmt causes page fault on a bare metal | My experimental code crashes when running on bare x86_64-metal (page fault when IDT is not yet set), but works perfectly on aarch64. By careful tracing I figured out that the cause of this page fault consists of corrupted address (much higher than 0x200_000, while only the first ", "label": "medium", "label_id": 2} |
| {"id": "rust_27675", "text": "object-safe traits can have associated types with unchecked bounds | ## STR ``` Rust trait Foo { type Assoc: PartialEq<Box<Self>>; } impl Foo for u32 { type Assoc = Box<u32>; } fn foo<T: Foo+?Sized>(u: Box<T>, v: T::Assoc) -> bool { &v == &u } fn main() { let bar: Box<Foo<Assoc=Box<u32>>> = Box::new(4); foo(bar, Box::new(5)); } ``` ### Result ``` | labels: A-type-system, I-ICE, A-trait-system, P-high, T-compiler, I-unsound", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_27681", "text": "Update installing-rust.md with the newer release response | Currently, when issuing rustc --version, it provides the updated version; namely, rustc 1.2.0 (082e47636 2015-08-03). Update the docs to reflect this.", "label": "low", "label_id": 3} |
| {"id": "rust_27683", "text": "Strange compile error | My Code is: ``` rust use std::collections::HashMap; use std::path; use std::fs; use std::error::Error; use std::io::{BufReader, BufRead}; use std::ops::Deref; fn read_code_file() -> HashMap<String, String> { let mut airport_codes = HashMap::new(); let path = path::Path::new(\"Airp", "label": "medium", "label_id": 2} |
| {"id": "rust_27685", "text": "`rustdoc` panics on unicode character inside code-block | `rustdoc` panics on HORIZONTAL ELLIPSIS inside a code-block ... `````` /// ``` /// All those things … /// ``` `````` ... while it accepts them otherwise : ``` /// /// All those things … /// /// > All those things … /// /// ### All those things … /// /// `All those things …` /// `", "label": "medium", "label_id": 2} |
| {"id": "rust_27686", "text": "`--extern` broken for indirect dependencies | alpha.rs ``` rust pub struct Test; ``` beta.rs: ``` rust extern crate alpha; pub use alpha::Test; ``` gamma.rs ``` rust extern crate beta; pub use beta::Test; ``` Now, run the following ``` mkdir -p bin rustc alpha.rs -o bin/libalpha.rlib --crate-type lib rustc beta.rs -o bin/lib", "label": "medium", "label_id": 2} |
| {"id": "rust_27692", "text": "need more coercions for composed iterator types that have Fns | Rust's problems with returning the complicated types that result from iterator composition are well-known. - See e.g. https://github.com/rust-lang/rfcs/pull/105 - (with possible follow-on tracking at https://github.com/rust-lang/rfcs/issues/518 , though most of the conversation s | labels: A-type-system, C-enhancement, A-inferencelabellowlabel_id |
| idrust_27695textUnresolved import error on struct vs unite-like struct | ``` rust pub use m::A; mod m { use super::*; pub struct A; //pub struct A { // a: bool //} } ``` The code compile with first definition of A, but not the second. This may be related to #26873.labelmediumlabel_id |
| idrust_27697textAdding Deref impl affects lifetime bounds of other methods | From https://users.rust-lang.org/t/does-implementing-deref-affect-the-lifetime-bounds-of-all-other-methods/ --- Code: ~~http://is.gd/AkyE699~~ http://is.gd/AkyE69 If the Deref is removed, the code compiles. Presumably, the inclusion of the Deref implementation on the trait object | labels: A-type-system, A-lifetimes, E-needs-test, T-compiler, C-buglabelmediumlabel_id |
| idrust_27700textTracking issue for allocation APIs | ## Current status Final incarnation of `std::heap` is being proposed in https://github.com/rust-lang/rfcs/pull/1974, hopefully for stabilization thereafter. Open questions for stabilization are: * Is it required to deallocate with the *exact* size that you allocate with? With the | labels: T-libs-api, B-unstablelabelquestionlabel_id |
| idrust_27701textTracking issue for libcore + no_std stabilization | This issue is intended to represent the outstanding issues for stabilizing libcore and allowing its usage on stable Rust. There are a number of features currently associated with libcore: - `core` - `core_char_ext` - `core_prelude` - `core_slice_ext` - `core_str_ext` (note that ` | labels: T-lang, T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27702textTracking issue for f32/f64 support in libcore | This issue is largely targeted at tracking the state of `core_float` in libcore, but it raises the question of how much floating point support should be in libcore. Right now we don't explicitly depend on many external functions, but a number of functions are exposed as bindings | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27703", "text": "Tracking issue for stabilizing randomness | Long ago we had `std::rand` and nowadays we have `extern crate rand`. This is such core functionality it likely wants to move back into the standard library at some point, and in the meantime this issue serves as a tracking issue for the `rand` feature in the standard library. Th | labels: T-libs-api, B-unstable, C-tracking-issue", "label": "medium", "label_id": 2} |
| {"id": "rust_27704", "text": "Tracking issue for OsStr conversions | This is a tracking issue for stabilizing the `convert` feature in the standard library, which is primarily associated with converting `OsStr` and `OsString` to byte or string types. Due to the length of discussions on #27390 and #27657 this will likely required an RFC to move for | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27705", "text": "Tracking issue for DNS in std::net | This is a tracking issue for the `lookup_addr` and `lookup_host` unstable features in the standard library. These are currently the only exposed support for DNS as a public interface. Functions like `TcpStream::connect` already expose the ability to resolve names via passing a st | labels: T-libs-api, final-comment-period, B-unstable, C-tracking-issue", "label": "question", "label_id": 4} |
| {"id": "rust_27706", "text": "Tracking issue for std::fs::canonicalize | This is a tracking issue for the unstable `fs_canonicalize` feature in the standard library. There are a number of reasons it is not currently stable: - The implementation on Unix isn't technically memory safe. - The implementation on Windows returns some quite odd paths which ar | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27707textTracking issue for fs::walk_dir | This is a tracking issue for the `fs_walk` unstable feature in the standard library. Some of the open questions currently are: - There are many many ways to walk a directory, and there probably wants to be something like a `WalkBuilder` structure. - The current walking strategy h | labels: T-libs-api, final-comment-period, B-unstablelabelquestionlabel_id |
| idrust_27708textTracking issue for `as_unsafe_cell` stabilization | The `Cell::as_unsafe_cell` and `RefCell::as_unsafe_cell` methods return a reference to the underlying `UnsafeCell` in both cases. It's not clear what the use cases are for these methods and whether they can be achieved in some alternative way. If you are using these methods, plea | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27710", "text": "Tracking issue for fs::DirBuilder | This is a tracking issue for the unstable `dir_builder` feature in the standard library. The current purpose of this is to provide access to platform-specific options such as modes on Unix or security attributes on Windows. The current `create_dir` and `create_dir_all` APIs are b | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27711", "text": "Tracking issue for `drain` stabilization | The `drain` method was originally proposed in [collections reform 2](https://github.com/rust-lang/rfcs/pull/509) and then adjusted in a [follow-up RFC](https://github.com/rust-lang/rfcs/pull/574). The main remaining question for the API is the traits it uses to accept various kin | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27712", "text": "Tracking issue for `fs_mode` stabilization | The `fs_mode` feature refers to platform-specific constants for file access modes exported in `std::os`. While these constants are OK as-is, we don't have a clear overall vision for which constants should be included in `std::os` or how they should be organized. Before we stabili | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27713textTracking issue for custom hashers in HashMap | This is a tracking issue for the unstable `hashmap_hasher` feature in the standard library. This provides the ability to create a HashMap with a custom hashing implementation that abides by the `HashState` trait. This has already been used quite a bit in the compiler itself as we | labels: A-collections, T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27714textTracking issue for `str_utf16` stabilization | The `str_utf16` feature tracks APIs like `str::utf16_units` that support utf16 encoding. These APIs are working well today, but it would be good to have a clear picture of the final state of APIs we'd like to have for various string encodings in `std`, and how that relates to oth | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27715", "text": "Tracking issue for Scoped TLS | This is a tracking issue for the unstable `scoped_tls` feature in the standard library. The known open questions about this API are: - Is it useful enough to be stabilized? It doesn't look like there's been much usage yet. - Currently the API only accepts sized type parameters, b | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27716", "text": "Tracking issue for `thread_local_state` stabilization | This feature allows you to query a thread-local variable for its state: http://static.rust-lang.org/doc/master/std/thread/enum.LocalKeyState.html, which will then tell you what may happen if you try to read from the variable. The functionality is somewhat niche, but occasionally | labels: T-libs-api, final-comment-period, B-unstable, C-tracking-issue", "label": "medium", "label_id": 2} |
| {"id": "rust_27717", "text": "Tracking issue for static synchronization primitives | This is a tracking issue for the unstable `static_mutex`, `static_condvar`, and `static_rwlock` features in the standard library. Each of these represents a separate `StaticFoo` type (next to the type `Foo`) to provide a synchronization primitive that can be constructed in a stat | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27718", "text": "Tracking issue for `Rc`/`Arc` stabilization | There are a number of unstable features related to `Rc` and `Arc`, including both weak references and uniqueness. An [RFC to remove weak pointers](https://github.com/rust-lang/rfcs/pull/1232) failed, and the current consensus seems to be to stabilize these APIs after nailing down | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27719", "text": "Tracking issue for `recover` stabilization | The `recover` function is able, on a single thread, to recover from a panic. There are numerous controversies around this API, including the bounds it applies to its closure, its safety, and its location within `std`. An [open RFC](https://github.com/rust-lang/rfcs/pull/1236) see | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27720", "text": "Tracking issue for OpenOptionsExt on Windows | This is a tracking issue for the unstable `open_options_ext` feature in the standard library. Currently Unix has a stable extension trait for setting the mode of a file but Windows has not stabilized any of its functionality. The current set of methods on the Windows extension tr | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27722", "text": "Tracking issue for `path_prefix` stabilization | The `Path::prefix` method allows you to extract a `Prefix` from a path, if any -- which is relevant only on Windows, where the prefix gives e.g. volume information. It's already possible to get this information through the `components` iterator, so it's not clear whether this add | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27724", "text": "Tracking issue for {min,max} on iterators | This is a tracking issue for the unstable `iter_cmp` feature in the standard library. This is the ability to get the min or max elements out of an iterator via a custom closure for comparisons. Some open questions are: - Is `_by` the right suffix here? The stable `<[T]>::sort_by` | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27725", "text": "Tracking issue for `path_ext` stabilization | The `PathExt` trait provides a number of methods on paths that conveniently connect it to the `std::fs` API. While these methods are largely fine, there is some question as to how many of them there should be; the rationale for the exact selection of methods is currently a bit mu | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27726", "text": "Tracking issue for access to Formatter alignment | Tracking issue for the `fmt_flags_align` feature, which is [`fmt::Formatter::align`](https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html#method.align) and the associated enum. | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period", "label": "medium", "label_id": 2} |
| {"id": "rust_27727", "text": "Tracking issue for `path_components_peek` stabilization | The `path::Components::peek` method allows you to peek at the next component in the iterator without actually consuming it. There's no strong reason for it to remain unstable, except that the conventions around such methods are a bit unclear. | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27728textTracking issue for formatting with a radix | This is a tracking issue for the unstable `fmt_radix` feature in the standard library. These functions provide the ability to format a number in an arbitrary radix. Note that base 2, 8, and 10, and 16 are already supported via various formatting flags. Needs a decision about whet | labels: T-libs-api, final-comment-period, B-unstablelabelquestionlabel_id |
| idrust_27729textTracking issue for `as_slice` stabilization | Over time, the way that you convert e.g. a vector to a slice has transformed repeatedly. With deref coercions, it's usually implicit, but there are still some cases where you need to do it explicitly. The `as_slice` method follows the usual conversion conventions, but has been so | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27730", "text": "Tracking issue for `NonZero`/`Unique`/`Shared` stabilization | We currently have three internal types, `NonZero`, `Unique` and `Shared`, that are very useful when working with unsafe Rust code. Ultimately, the hope is to have a clear vision for semi-high-level, but unsafe programming using types like these. None of the current APIs have gone | labels: T-libs-api, B-unstable, C-tracking-issue", "label": "medium", "label_id": 2} |
| {"id": "rust_27731", "text": "Tracking issue for SIMD support | This is a tracking issue for the unstable `core_simd` feature in the standard library. SIMD support is quite a thorny topic, but it's largely covered in https://github.com/rust-lang/rfcs/pull/1199, being implemented in https://github.com/rust-lang/rust/pull/27169, and @huonw will | labels: T-libs-api, B-unstable, A-SIMD, C-tracking-issue, Libs-Tracked, A-target-featurelabelquestionlabel_id |
| idrust_27732textTracking issue for DST coercions (coerce_unsized, unsize) stabilization | [DST coercions](https://github.com/rust-lang/rfcs/pull/982) were the last part of DST to land, and are still undergoing [some changes](https://github.com/rust-lang/rfcs/pull/1234). Before stabilization, at the very least the API surface here needs some scrutiny from the libs team | labels: A-DSTs, T-lang, T-libs-api, B-unstable, B-RFC-implemented, C-tracking-issuelabelcritical_buglabel_id |
| idrust_27733textTracking issue for `borrow_state` stabilization | The `RefCell` API offers a way to determine the state of the borrow, to avoid panics on additional borrowing. It's not clear how useful this API is in practice, but it's otherwise ready for stabilization. ----- **EDIT:** @KodrAus Before stabilization: - [ ] Add a concrete, motiva | labels: T-libs-api, B-unstable, C-tracking-issuelabelmediumlabel_id |
| idrust_27734textTracking issue for concrete errors in the standard library | This is a tracking issue for the unstable `str_parse_error` and `utf8_error` features in the standard library. Some various small error types popped up once `FromStr` had an associated error type and haven't been considered too closely for stabilization. Some thoughts are: - Are | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27735", "text": "Tracking issue for `IntoCow` stabilization | **NOTE**: `IntoCow` has been deprecated, but you can get the same conversion by using the `Cow::Owned` constructor, like so: `Cow::Owned(vec![1, 2, 3])`. # The `IntoCow` trait is a custom conversion trait for working with `Cow`; the custom nature is needed to deal with trait cohe | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27736", "text": "Tracking issue for f{32,64}::from_str_radix | This is a tracking issue for the unstable `float_from_str_radix` feature in the standard library. These functions I believe were added to mirror the functionality on integers, but it's unclear what these functions are actually doing in terms of radixes. There's also a [discussion | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27737", "text": "Tracking issue for `iter_order` stabilization | The `iter` module has an `order` submodule for performing comparisons on iterators. Ideally, these would instead just be implementations of e.g. the `PartialOrd` trait, but that trait passes by shared reference, and iterators must be mutated to be compared. It'd be good to explor | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27738textTracking issue for reentrant mutexes | This is a tracking issue for the unstable `reentrant_mutex` feature in the standard library. Currently this flavor of mutex is not exposed at all in the standard library (it's private in the `sys`module), but it's an often-useful form of a mutex. We should decide whether or not t | labels: T-libs-api, B-unstablelabelmediumlabel_id |
| idrust_27739textTracking issue for `Zero`/`One`/`iter_arith` stabilization | We currently have `Zero` and `One` traits that are meant to work with `Add` and `Mul` and support iterator operations like `sum`, as well as the current `step_by` API. It would be good to have a more comprehensive vision for this kind of trait before stabilization; an RFC would b | labels: T-libs-api, final-comment-period, B-unstablelabelquestionlabel_id |
| idrust_27740textTracking issue for std::slice::bytes | This is a tracking issue for the unstable `slice_bytes` feature in the standard library. This module has some various helper methods for dealing with blocks of bytes in an efficient fashion, but they seem particularly one-off and not necessarily fitting in with the rest of the de | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27741textTracking issue for `step_by` stabilization | Update (@SimonSapin): this is now the tracking issue for an iterator adaptor based on `Iterator::nth`: ```rust pub trait Iterator { fn step_by(self, step: usize) -> StepBy<Self> } ``` The `Step` trait used for making ranges iterators is now tracked at https://github.com/rust-lang | labels: P-medium, E-mentor, T-libs-api, B-unstable, E-help-wanted, C-tracking-issuelabelmediumlabel_id |
| idrust_27742textTracking issue for slice_splits | This is a tracking issue for the unstable `slice_splits` feature in the standard library. These functions were added in [RFC 1058](https://github.com/rust-lang/rfcs/pull/1058) and implemented in https://github.com/rust-lang/rust/pull/26966. These probably just need to bake for aw | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27743textTracking issue for str::match_indices | This is a tracking issue for the unstable `str_match_indices` feature in the standard library. This function should largely be good to go except for the note indicating that the returned iterator should probably yield different types of values to stay consistent with other method | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27744textTracking issue for `push_all` stabilization | The `Vec::push_all` method special-cases pushing a slice onto a vector, and historically has performed much better than using `extend` (depending on how LLVM optimizations are working out). We need to offer a method with maximal performance somehow, but ideally this would come fr | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27745textTracking issue for type_id stabilization | The method `get_type_id` in `Any` is intended to support reflection. It's currently unstable in favor of using an associated constant instead. | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period", "label": "question", "label_id": 4} |
| {"id": "rust_27746", "text": "Tracking issue for `cell_extras` stabilization | The `Ref` type connected to `RefCell` supports some methods for changing the type of the reference, such as `map` and `filter_map`. While `map` is clearly fully general, `filter_map` is somewhat of a special case hooked into `Option`. To make it fully general would likely require | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27747", "text": "Tracking issue for `slice_concat_ext` stabilization | The [SliceConcatExt](http://static.rust-lang.org/doc/master/std/slice/trait.SliceConcatExt.html) trait offers methods `concat` and `join` on slices. For somewhat technical reasons, it wasn't possible to make these inherent methods. The methods themselves are stable, but the trait | labels: T-libs-api, B-unstable, C-tracking-issue, finished-final-comment-period, disposition-close, A-slicelabelmediumlabel_id |
| idrust_27748textTracking issue for `wait_timeout_with` stabilization | The [`wait_timeout_with` method](http://static.rust-lang.org/doc/master/std/sync/struct.Condvar.html#method.wait_timeout_with) allows you to wait on a `CondVar` with a particular timeout, but also to cancel waiting based on a closure you pass in. It's not clear if this API is bro | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27749", "text": "Tracking issue for `Reflect` stabilization | The `Reflect` trait is currently unstable. It was intended to narrow the use of things like `Any` for runtime introspection, to help retain parametricity properties. However, with [impl specialization](https://github.com/rust-lang/rfcs/pull/1210) these properties would go away an | labels: T-lang, T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27750", "text": "Tracking issue for `clone_from_slice` stabilization | The `clone_from_slice` method clones a slice into another, using the `clone_from` method, which in principle can be more efficient than using `clone`. It's not clear whether this method, or `clone_from`, are seeing any use at all. | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27751textTracking issue for `raw` stabilization (`raw::TraitObject`) | The `std::raw` module exports some representation details for the purposes of transmuting and taking things apart. Stabilizing these means pinning down the representation details forever. One possibility is to instead provide various conversions, rather than asking people to use | labels: A-trait-system, T-lang, T-libs-api, B-unstable, C-tracking-issue, Libs-Trackedlabelquestionlabel_id |
| idrust_27752textTracking issue for `float_extras` stabilization | There are a number of floating point methods that are reexported from cmath, without a strong naming convention on the Rust side, or a clear rationale for which methods are included and which are not. Ideally, someone who works with floating point, and these methods in particular | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27753textTracking issue for `num_bits_bytes` stabilization | The `BITS` and `BYTES` constants for e.g. `i32` are currently unstable, due to lack of clarity around: - Should these be associated constants of the type instead? - Is there a better way to get at these via e.g. `size_of`? cc @eddyb | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27754textTracking issue for `str_char` stabilization | The `str` type offers a number of `char`-oriented methods, many of which can be replaced by uses of `char_indices`. It's not clear how widely used these methods are, or whether there are significant downsides over using `char_indices`. This API area needs a comprehensive re-evalu | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27755", "text": "Tracking issue for `wrapping` stabilization | The `std::num::wrapping` module provides a trait, `OverflowingOps`, that permits overflowing arithmetic on primitive types and tells whether an overflow occurred. Other methods, like `saturating_add` and `wrapping_add`, are included directly as inherent methods on these types. It | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27756", "text": "Mistaken warning when working around `E0386` restrictions regarding mutable references in immutable containers. | While writing the detailed diagnostics for `E0386` (cannot assign to data in an immutable container, #24407), I came across a possible mistaken warning. `E0386` is about forbidding mutation of a mutable reference stored in an immutable container: ``` rust let mut x: i64 = 1; let ", "label": "medium", "label_id": 2} |
| {"id": "rust_27759", "text": "rustdoc unstable should show feature name and issue | rustdoc currently shows unstable things like the following (for [`Result::expect`](http://doc.rust-lang.org/stable/std/result/enum.Result.html#method.expect)): > Unstable: newly introduced It could also include the name of the feature and a link to the tracking issue, e.g. > Unst | labels: E-easy, T-rustdoc", "label": "low", "label_id": 3} |
| {"id": "rust_27764", "text": "Tracking issue for CStr => str conversions | This is a tracking issue for the `cstr_to_str` unstable feature in the standard library. These methods are probably ready to just get stabilized as-is. | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27765", "text": "Tracking issue for collection append methods | This is a tracking issue for the unstable `append` feature in the standard library. It's somewhat unclear if these methods _need_ to be stabilized, but it's also fairly clear that they're not going to change from their current form. They will likely go into FCP soon. cc @Gankro. | labels: E-easy, T-libs-api, final-comment-period, B-unstablelabellowlabel_id |
| idrust_27766textTracking issue for collection split_off methods | This is a tracking issue for the unstable `split_off` feature in the standard library. It's somewhat unclear if these methods need to be stabilized, but it's also fairly clear that they're not going to change from their current form. They will likely go into FCP soon. cc @Gankro. | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27767", "text": "Tracking issue for VecDeque::retain | This is a tracking issue for the unstable `vec_deque_retain` feature in the standard library. This is probably ready to just be stabilized as-is. cc @Gankro | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27768", "text": "Tracking issue for Box::{into_raw, from_raw} | This is a tracking issue for the `box_raw` unstable feature in the standard library. These methods are functionally ready to go but may need to settle on some names. Other candidates (like those that `CString` chose) are `into_ptr` and `from_ptr`. These shouldn't be stabilized un | labels: E-easy, T-libs-api, final-comment-period, B-unstablelabellowlabel_id |
| idrust_27769textTracking issue for CString::{from_ptr, into_ptr} | This is a tracking issue for the unstable `cstr_memory` feature in the standard library. These methods are likely ready to go as-is modulo naming. Their names should be consistent with `Box::{from_raw, into_raw}` (currently inconsistent). cc #27768 | labels: E-easy, T-libs-api, final-comment-period, B-unstablelabellowlabel_id |
| idrust_27770textTracking issue for Result::expect | This is a tracking issue for the unstable `result_expect` feature in the standard library. This is likely ready to just be stabilized as-is | labels: T-libs-api, B-unstablelabelmediumlabel_id |
| idrust_27771textTracking issue for some Duration-taking functions | This is a tracking issue for some small Duration-taking functions in the standard library, specifically the `park_timeout` and `thread_sleep` functions. Now that `Duration` is stabilized these are likely ready to be stable as-is. | labels: E-easy, T-libs-api, final-comment-period, B-unstablelabellowlabel_id |
| idrust_27772textTracking issue for Condvar::wait_timeout | This is a tracking issue for the unstable `wait_timeout` feature in the standard library. An open question here is whether the tuple return value with a `bool` is appropriate or whether an `enum` of some form should be returned instead. cc @sfackler | labels: T-libs-api, final-comment-period, B-unstablelabelquestionlabel_id |
| idrust_27773textTracking issue for the socket timeout functions | This is a tracking issue for the unstable `socket_timeout` feature in the standard library. Now that the `Duration` type is stable it may be the case that these methods can just be stabilized as-is. | labels: E-easy, T-libs-api, final-comment-period, B-unstablelabellowlabel_id |
| idrust_27774textTracking issue for slice::{ref_slice, mut_ref_slice} | This is a tracking issue for the unstable `ref_slice` feature in the standard library. These functions seem fairly innocuous but it's also somewhat questionable how useful they are. They're probably ready for either stabilization or deprecation as-is. cc @nikomatsakis | labels: T-libs-api, final-comment-period, B-unstablelabelquestionlabel_id |
| idrust_27775textTracking issue for converting slice iterators to slices | This is a tracking issue for the unstable `iter_to_slice` feature in the standard library. The `into_vec` adaptor for `vec::IntoIter` was recently removed, and these may also want to be removed. It's somewhat unclear how useful it is to have iterators enhanced with this kind of f | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27776", "text": "Tracking issue for viewing Result/Option as slices | This is a tracking issue for the unstable `as_slice` feature in the standard library. These functions enable viewing a `Result<T, U>` and `Option<T>` as some form of `[T]` (both shared and mutably). In each case an array of at most one item will be returned. It's somewhat unclear | labels: E-easy, T-libs-api, final-comment-period, B-unstablelabellowlabel_id |
| idrust_27777textTracking issue for iter::range_inclusive | This is a tracking issue for the unstable `range_inclusive` feature in the standard library. This will likely be deprecated and removed if https://github.com/rust-lang/rfcs/pull/1192 is accepted. Otherwise this will likely be deprecated and removed in favor of a builder-style int | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27778textTracking issue for FixedSizeArray trait | This is a tracking issue for the unstable `fixed_size_array` feature in the standard library. This is likely to be deprecated and removed in favor of generic integers one day, and in the meantime there are not many consumers of it. | labels: T-libs-api, B-unstable, C-tracking-issue, finished-final-comment-period, disposition-close, A-const-genericslabelmediumlabel_id |
| idrust_27779textTracking issue for placement new | This is a tracking issue for the unstable `placement_new_protocol` feature in the standard library, and `placement_in_syntax`/`box_syntax` in the compiler. (@pnkfelix adds below:) Things to decide / finalize before stabilization: - [ ] placement-in syntax, e.g. `in PLACE { BLOCK | labels: B-RFC-approved, T-lang, T-libs-api, B-unstable, C-tracking-issuelabelmediumlabel_id |
| idrust_27780textTracking issue for <*mut T, *const T>::{as_ref, as_mut_ref} | This is a tracking issue for the unstable `ptr_as_ref` feature of the standard library. These functions allow unsafely converting raw pointers to optional safe references, returning `None` if they're null. I would personally vote for removing these, but there's certainly some usa | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27781textTracking issue for char::from_u32_unchecked | This is a tracking issue for the unstable `char_from_unchecked` feature of the standard library. This API is relatively new and needs some time to bake, but it's likely to just be stabilized as-is. | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27782", "text": "Tracking issue for DebugTuple::formatter | This is a tracking issue for the unstable feature `debug_builder_formatter` in the standard library. This method was add relatively recently, and my thoughts on it are: - It seems odd to have this function only on `DebugTuple` and no other builders. - It does seem reasonable to a | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27783", "text": "Tracking issue for location of facade crates | We probably don't want to indefinitely have a large number of facade crates which are all unstable, so we should eventually stabilize these crates, fold them back into the standard library, or find a good middle ground in which they can all reside. The current set of crates consi | labels: T-libs-api, B-unstable, C-tracking-issuelabelmediumlabel_id |
| idrust_27784textTracking issue for char encoding methods | This is a tracking issue for the unstable `unicode` feature and the `char::encode_utf{8,16}` methods. The interfaces here are a little wonky but are done for performance. It's not clear whether these need to be exported or not or if there's a better method to do so through iterat | labels: T-libs-api, final-comment-period, B-unstable, E-help-wantedlabelmediumlabel_id |
| idrust_27785textTracking issue for Box<str>/String conversions | This is a tracking issue for the unstable `box_str` feature in the standard library. These functions were recently added and probably just need to bake for a bit, but other than that I believe they're ready for stabilization (modulo the naming in https://github.com/rust-lang/rust | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27787", "text": "Tracking issue for sorted collection ranges | This covers `btree_range` and `collections_bound`. Both try to address the combinatorics over inclusive/exclusive/none bounds on ordered queries. I am significantly unsatisfied with the current solution, which is `btree.range(Bound(&K), Bound(&K))`. This pushes all the combinator | labels: T-libs-api, final-comment-period, B-unstable, E-help-wanted", "label": "question", "label_id": 4} |
| {"id": "rust_27788", "text": "Tracking issue for VecDeque Extras | This covers the `deque_extras` blanket feature, which should probably be sharded more in the future. It covers: - `truncate` - `resize` - `as_slices` - `as_mut_slices` - `swap_back_remove` - `swap_front_remove` Some notes: - `truncate` and `resize` are strange because they aren't | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27790textTracking issue for Vec::resize | This is a tracking issue for the unstable `vec_resize` feature in the standard library. To the best of my knowledge there's no blocker for this beyond \"we should decide to have it or not\". cc @Gankro | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27791", "text": "Tracking issue for str escaping | This is a tracking issue for the unstable `str_escape` feature in the standard library. The open questions I know of here are: - Do we want to support these relatively arbitrary ways to escape strings? Note that these same methods for escaping characters are already stable. - Are | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period", "label": "question", "label_id": 4} |
| {"id": "rust_27792", "text": "Tracking issue for str::split_at | This is a tracking issue for the unstable `str_split_at` feature in the standard library. These are just mirrors of the slice `split_at` methods so I suspect that they will just be stabilized as-is. | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27793", "text": "Tracking issue for str::slice_mut_unchecked | This is a tracking issue for the unstable `str_slice_mut` feature in the standard library. The major open question here is to what extent we want to support `&mut str` in the standard library. Currently the support is likely falling short in a number of `&str` vs `&mut str` metho | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27794", "text": "Tracking issue for extra linked list methods | This is a tracking issue for the unstable `linked_list_extras` methods in the standard library. cc @Gankro, perhaps you can fill this in some more? The specific methods in question are: - `IterMut::insert_next` - `IterMut::peek_next` | labels: B-RFC-approved, A-collections, T-libs-api, B-unstable, C-tracking-issue, Libs-Tracked", "label": "question", "label_id": 4} |
| {"id": "rust_27795", "text": "Tracking issue for creating BTree{Map,Set} with a B | This is a tracking issue for the unstable `btree_b` feature in the standard library. cc @Gankro, perhaps you can fill in the details here? | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27796", "text": "Tracking issue for unix::FileTypeExt | This is a tracking issue for the unstable `file_type_ext` feature in the standard library. I think this is basically good to go, it'll likely expand over time but otherwise it's pretty self explanatory. | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27797", "text": "Tracking issue for consumption into OS handles | This is a tracking issue for the `into_raw_os` feature in the standard library which allows consuming I/O primitives to gain ownership of the underlying resource. I believe this is basically ready to be stabilized as-is. | labels: E-easy, T-libs-api, final-comment-period, B-unstable", "label": "low", "label_id": 3} |
| {"id": "rust_27798", "text": "Tracking issue for sync::Semaphore | This is a tracking issue for the unstable `semaphore` feature of the standard library. - Should we have this kind of semaphore? - Should we allow negative counts? - Should there be an RAII guard for a \"resource\"? Decision! | labels: T-libs-api, final-comment-period, B-unstable", "label": "medium", "label_id": 2} |
| {"id": "rust_27799", "text": "Tracking issue for Duration::span | This is a tracking issue for the unstable `duration_span` feature of the standard library. Known open questions are: - Is this the right place for this API? - Is this the right name? - Should the closure be able to return a value? - Should various other system clocks be exposed? | labels: T-libs-api, final-comment-period, B-unstable", "label": "question", "label_id": 4} |
| {"id": "rust_27800", "text": "Tracking issue for channel selection | This is a tracking issue for the unstable `mpsc_select` feature in the standard library. Known points: - The API is unsafe, and should probably never be stabilized. - Servo apparently makes very heavy use of this API, so it can't be removed without replacement currently. - The co | labels: T-libs-api, B-unstable, C-tracking-issue, finished-final-comment-period, disposition-closelabelmediumlabel_id |
| idrust_27801textTracking 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 \, just an IPv4 or IPv6 address. - We have no stable APIs producing this value. - Some old | labels: T-libs-api, final-comment-period, B-unstablelabelmediumlabel_id |
| idrust_27802textTracking 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-issuelabelmediumlabel_id |
| idrust_27805textMissing snapshots for Bitrig, FreeBSD 32-bit and FreeBSD 64-bit | This issue is for adding the snapshots.labelmediumlabel_id |
| idrust_27809textTracking 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", "label": "question", "label_id": 4} |
| {"id": "rust_27810", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27811", "text": "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", "label": "question", "label_id": 4} |
| {"id": "rust_27815", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27817", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27819", "text": "'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-ICElabelhighlabel_id |
| idrust_27820textmacro_rules ICE with bare $crate | Playpen link: http://is.gd/Q53a7Tlabelmediumlabel_id |
| idrust_27824textFloating 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-langlabelquestionlabel_id |
| idrust_27828textType 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", "label": "medium", "label_id": 2} |
| {"id": "rust_27829", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27830", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27831", "text": "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.labelmediumlabel_id |
| idrust_27832textMacro 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", "label": "medium", "label_id": 2} |
| {"id": "rust_27840", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27842", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27844", "text": "'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", "label": "high", "label_id": 1} |
| {"id": "rust_27848", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27852", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27854", "text": "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 tlabelmediumlabel_id |
| idrust_27859textf32 \ 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.)labelmediumlabel_id |
| idrust_27861textNo 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() labelmediumlabel_id |
| idrust_27862textPipe 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-rustdoclabelmediumlabel_id |
| idrust_27863textCannot 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", "label": "medium", "label_id": 2} |
| {"id": "rust_27865", "text": "Change `BTreeMap` to use parent pointers | This will require nodes to have a stable address. CC #26227 @Gankro.", "label": "medium", "label_id": 2} |
| {"id": "rust_27868", "text": "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", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_27872", "text": "`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", "label": "medium", "label_id": 2} |
| {"id": "rust_27873", "text": "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 \ {} } ``` ``` <anon>:3:12: 3:17 error: illegal ABI: expected one of [cdecl, stdcall, fastcall, aapcs, win64, Rust | labels: T-langlabelmediumlabel_id |
| idrust_27874textICE 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-ICElabelhighlabel_id |
| idrust_27876textrustdoc 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-rustdoclabelmediumlabel_id |
| idrust_27878textSegfault 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 #labelhighlabel_id |
| idrust_27879textrustc --color=never prints colours | ``` rustc --color=never error: no input filename given ``` the “error:” in the message above is coloured red. | labels: A-frontendlabelmediumlabel_id |
| idrust_27886textBitrig x86_64 test failures. | After the new snapshots landed, test failures showed up. | labels: O-x86_64labelmediumlabel_id |
| idrust_27889textborrowck 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-checkerlabelmediumlabel_id |
| idrust_27890textICE 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-closureslabelhighlabel_id |
| idrust_27895textinternal compiler error: literals of different types in range pat | code: ``` fn main() { let i = 5; let index = 6; match i { 0...index => println!(\), _ => println!(\), } } ``` 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-testlabelhighlabel_id |
| idrust_27898textRust1.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 resolvlabelmediumlabel_id |
| idrust_27899textSmall 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-langlabelmediumlabel_id |
| idrust_27901textassertion 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-systemlabelhighlabel_id |
| idrust_27906textDrop 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`), everythinglabelmediumlabel_id |
| idrust_27908textTracking issue for drop_in_place | This calls the \ 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-unstablelabelmediumlabel_id |
| idrust_27909textWrite nomicon dot-operator section | https://doc.rust-lang.org/nightly/nomicon/dot-operator.htmllabelmediumlabel_id |
| idrust_27910textWrite nomicon Implementing Arc and Mutex chapter | https://doc.rust-lang.org/nightly/nomicon/arc-and-mutex.htmllabelmediumlabel_id |
| idrust_27911textRewrite nomicon references section | https://doc.rust-lang.org/nightly/nomicon/references.html This involves solving the incredibly difficult question of \. CC @aturon @arielb1 @nikomatsakis @pnkfelix @sunfishcodelabelquestionlabel_id |
| idrust_27917textBook: \ explanation could be more prominent/thorough | \ 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`.labelmediumlabel_id |
| idrust_27918textBroken 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", "label": "question", "label_id": 4} |
| {"id": "rust_27923", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27925", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27928", "text": "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()", "label": "medium", "label_id": 2} |
| {"id": "rust_27932", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27933", "text": "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", "label": "question", "label_id": 4} |
| {"id": "rust_27936", "text": "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?", "label": "question", "label_id": 4} |
| {"id": "rust_27940", "text": "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-langlabelmediumlabel_id |
| idrust_27941textChanging 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-requestlabelmediumlabel_id |
| idrust_27942textDestructionScopeData 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-diagnosticslabelmediumlabel_id |
| idrust_27946textCode 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-easylabellowlabel_id |
| idrust_27949text`==` 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-testlabelquestionlabel_id |
| idrust_27950textCan `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", "label": "medium", "label_id": 2} |
| {"id": "rust_27951", "text": "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(", "label": "medium", "label_id": 2} |
| {"id": "rust_27952", "text": "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-windowslabelmediumlabel_id |
| idrust_27953textTrait 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", "label": "medium", "label_id": 2} |
| {"id": "rust_27954", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27955", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27958", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27959", "text": "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:  after set RUST_TEST_NOCAPTURE=1 in console tests output without co", "label": "medium", "label_id": 2} |
| {"id": "rust_27963", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27964", "text": "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-roadblocklabellowlabel_id |
| idrust_27965textNo 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", "label": "medium", "label_id": 2} |
| {"id": "rust_27967", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27969", "text": "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", "label": "low", "label_id": 3} |
| {"id": "rust_27970", "text": "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", "label": "question", "label_id": 4} |
| {"id": "rust_27973", "text": "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:labelmediumlabel_id |
| idrust_27977textSupply 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", "label": "medium", "label_id": 2} |
| {"id": "rust_27979", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_27985", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_27987", "text": "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 \, 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", "label": "low", "label_id": 3} |
| {"id": "rust_27989", "text": "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-ICElabelhighlabel_id |
| idrust_27990textIncorrect 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-diagnosticslabelmediumlabel_id |
| idrust_27993textToOwned 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 \ fail to work since you get back a `&str`. The reason seems to be that the general implementation of `ToOwned` folabelmediumlabel_id |
| idrust_27996textIntoIterator 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`?", "label": "medium", "label_id": 2} |
| {"id": "rust_27997", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_28002", "text": "\"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", "label": "high", "label_id": 1} |
| {"id": "rust_28005", "text": "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", "label": "question", "label_id": 4} |
| {"id": "rust_28008", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28011", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28012", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28014", "text": "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", "label": "low", "label_id": 3} |
| {"id": "rust_28018", "text": "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-windowslabelquestionlabel_id |
| idrust_28019textmake 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: \ \ \ \ \, : , : 2} |
| {: , : {:?}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : data\data\Match\No match\, : , : 2} |
| {: , : platform-intrinsic\, : , : 2} |
| {: , : , : , : 2} |
| {: , : Hi!\Hi!\Hi!\, : , : 2} |
| {: , : , : , : 2} |
| {: , : Hi!\main_real.rs\macro-use-include\0.1.0\, : , : 2} |
| {: , : , : , : 3} |
| {: , : /usr/share/dict/words\{}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : lhs\, : , : 2} |
| {: , : , : , : 2} |
| {: , : Usage: foo (--help | --version) Options: -h, --help Show this message --version Show the version of foo \, : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : (absolute) path to thlabelmediumlabel_id |
| idrust_28098textReport 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-diagnosticslabelmediumlabel_id |
| idrust_28099textICE 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-ICElabelhighlabel_id |
| idrust_28100textUpdate 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", "label": "medium", "label_id": 2} |
| {"id": "rust_28104", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_28105", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28108", "text": "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() { ", "label": "medium", "label_id": 2} |
| {"id": "rust_28109", "text": "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; } ^~~~~~~~~ ```", "label": "medium", "label_id": 2} |
| {"id": "rust_28110", "text": "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", "label": "question", "label_id": 4} |
| {"id": "rust_28111", "text": "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-windowslabelmediumlabel_id |
| idrust_28112textShould we default to jemalloc on OpenBSD, FireflyBSD and Bitrig? | Supported since [jemalloc 4.0](https://github.com/jemalloc/jemalloc/releases/tag/4.0.0)labelquestionlabel_id |
| idrust_28113textICE 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-ICElabelhighlabel_id |
| idrust_28114textLLVM 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", "label": "medium", "label_id": 2} |
| {"id": "rust_28118", "text": "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-systemlabelmediumlabel_id |
| idrust_28120textsimplify 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. blabelmediumlabel_id |
| idrust_28121textExtend 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-lintslabelmediumlabel_id |
| idrust_28124textMulti-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-diagnosticslabelmediumlabel_id |
| idrust_28126textMethods 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-compilerlabelmediumlabel_id |
| idrust_28127textCommand::{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 paslabelmediumlabel_id |
| idrust_28133textIncorrect/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", "label": "question", "label_id": 4} |
| {"id": "rust_28134", "text": "#![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", "label": "medium", "label_id": 2} |
| {"id": "rust_28139", "text": "HIR: tracking issue for HIR-related things. | Initial landing: #28138 | labels: metabug, T-compiler, A-HIR", "label": "medium", "label_id": 2} |
| {"id": "rust_28140", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28141", "text": "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-HIRlabelmediumlabel_id |
| idrust_28142textHIR: 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-HIRlabelmediumlabel_id |
| idrust_28143textHIR: 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", "label": "medium", "label_id": 2} |
| {"id": "rust_28144", "text": "HIR: remove ids from the AST | I think only the HIR needs ids. | labels: A-HIR", "label": "medium", "label_id": 2} |
| {"id": "rust_28145", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28147", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28150", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_28151", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_28153", "text": "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", "label": "question", "label_id": 4} |
| {"id": "rust_28154", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28157", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28158", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28159", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28160", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28166", "text": "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` alslabelmediumlabel_id |
| idrust_28168textfunctional 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-diagnosticslabelmediumlabel_id |
| idrust_28169textlink.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: \, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : ok\, : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : test\1\, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : Got: {}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : implement raw fat pointer comparisons\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : tuple\0.0\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : make docs\, : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : \\n\\r,\, : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : test\test\, : , : 1} |
| {: , : Compiler Plugins\, : , : 3} |
| {: , : \let _ = \drop\drop\drop\, : , : 2} |
| {: , : \, : , : 4} |
| {: , : , : , : 2} |
| {: , : IN V!\{}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : cc\-Wl,--as-needed\-m64\-L\/hlabelmediumlabel_id |
| idrust_28343textrustc 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-ICElabelquestionlabel_id |
| idrust_28344textType 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", "label": "high", "label_id": 1} |
| {"id": "rust_28347", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_28352", "text": "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-diagnosticslabelmediumlabel_id |
| idrust_28356textTracking 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-unstablelabelquestionlabel_id |
| idrust_28359textImprove [..] 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", "label": "low", "label_id": 3} |
| {"id": "rust_28360", "text": "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-buglabelmediumlabel_id |
| idrust_28361textCalling 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", "label": "medium", "label_id": 2} |
| {"id": "rust_28362", "text": "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-buglabelmediumlabel_id |
| idrust_28363textHRTB 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.labelmediumlabel_id |
| idrust_28365textCompiler 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 -labelhighlabel_id |
| idrust_28367textList 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 thilabelmediumlabel_id |
| idrust_28373textSomehow 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-requestlabelquestionlabel_id |
| idrust_28374textSipHasher::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: ``` labelquestionlabel_id |
| idrust_28377textICE: 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-ICElabelhighlabel_id |
| idrust_28378texttype 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-diagnosticslabelmediumlabel_id |
| idrust_28379textField 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-buglabelmediumlabel_id |
| idrust_28380textInformation 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.", "label": "medium", "label_id": 2} |
| {"id": "rust_28382", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28384", "text": "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", "label": "medium", "label_id": 2} |
| {"id": "rust_28385", "text": "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:labelmediumlabel_id |
| idrust_28387textUnwinding in a drop() implementation skips remaining drops | Given this: ``` rust struct S; impl Drop for S { fn drop(&mut self) { println!(\); panic!(\); } } struct T; impl Drop for T { fn drop(&mut self) { println!(\); } } fn main() { let t = T; let s = S; } ``` The output is: ``` Dropping S thread '<main>' panilabelmediumlabel_id |
| idrust_28388textPrivacy, 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.labelmediumlabel_id |
| idrust_28394textInvalid \ 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:2labelmediumlabel_id |
| idrust_28397textInternal 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-ICElabelhighlabel_id |
| idrust_28398textPlacing 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", "label": "medium", "label_id": 2} |
| {"id": "rust_28402", "text": "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", "label": "question", "label_id": 4} |
| {"id": "rust_28405", "text": "rustc --version --verbose does not report LLVM version used | labels: A-frontend, C-enhancement", "label": "low", "label_id": 3} |
| {"id": "rust_28409", "text": "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 ", "label": "high", "label_id": 1} |
| {"id": "rust_28410", "text": "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", "label": "high", "label_id": 1} |
| {"id": "rust_28412", "text": "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\, : , : 2} |
| {: , : $ c\unknown macro variable `c`\{} {}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : But wait, what about unwrap used in unwrap-double?\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : used\when used by immutable reference from ...\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : less than 25\exactly 25\above 25\, : , : 4} |
| {: , : https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html#method.fmt\https://doc.rust-lang.org/nightly/std/fmt/trait.Display.html#tymethod.fmt\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : function calls in statics\, : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : is_a_symlink\is symlink? {}\, : , : 2} |
| {: , : , : , : 4} |
| {: , : Hello\World\World\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : cargo test\, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 1} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : rust-intrinsic\, : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : d\\=d\, : , : 2} |
| {: , : C\C\C\, : , : 2} |
| {: , : if let\Pattern Matching\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : {}\{}\, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : hello\test\te | labels: T-lang, C-feature-requestlabelmediumlabel_id |
| idrust_28609textLifetime bounds on structs do not entirely constrain impl fns | ``` rust struct Foo<'a, 'b: 'a>(&'a &'b i32); impl<'a, 'b> Foo<'a, 'b> { fn foo(&self) {} } ``` compiles. As far as I can tell, the bound on 'b is checked in the definitions of the functions, but isn't checked in the use of them. As a concrete example of this Kimundi/scoped-threa | labels: P-high, T-compiler, I-unsound", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_28614", "text": "llvmdeps.rs isn't regenerated after a reconfigure | Even after a ``` make clean ./configure ... ``` `${TARGET}/rt/llvmdeps.rs` isn't regenerated when building. This can cause weird build errors. Presumably it needs to depend on something, but I'm not sure what at the moment.labelmediumlabel_id |
| idrust_28624textColors messed up in compiler output | ``` $ vim src/lib.rs (BROWN BEGIN)src/lib.rs:153 fn function(&self) -> <result> { src/lib.rs:154 <code> src/lib.rs:155 if <code> { src/lib.rs:156 <code> src/lib.rs:157 } else { src/lib.rs:158 <code> ... warning: (BROWN END)method is never used: `function`, #[warn(dead_code)] on b | labels: A-frontendlabelmediumlabel_id |
| idrust_28625textintrinsicck is broken in the presence of associated types | The compiler told me to report it, so here goes ;) I tried to compile this code using `cargo build`: https://gist.github.com/fizyk20/4cf1665a18ff800584f1 This is the only file in the crate. Cargo.toml looks like this: ``` [package] name = \ version = \ authors = | labels: I-ICE, E-needs-testlabelhighlabel_id |
| idrust_28627textInstallation is broken when custom relative libdir path starts with lib/ or when libdir is changed during installation | Gentoo uses installation of multiple rust versions side by side based on the possibility to install libraries to custom locations. At the moment because of this bug (its first part) we need to apply [patch](https://github.com/gentoo/gentoo-rust/blob/master/dev-lang/rust/files/rus | labels: O-linuxlabelmediumlabel_id |
| idrust_28628textTracking issue for forbidding wildcard deps on crates.io | Tracking issue for https://github.com/rust-lang/rfcs/pull/1241 | labels: B-RFC-approved, T-libs-apilabelmediumlabel_id |
| idrust_28630textWishlist: Include syntactically complete examples for every example in the rust-lang book. | The book as it is is wonderful, thank you. I am here to inquire about the possibility of having a second book that includes verbose examples. I know fn main() was left out of the examples for readability but if each example was syntactically complete I could spend a lot less timelabelmediumlabel_id |
| idrust_28639textNot able to compile on Windows in MinGW anymore | ``` $ make ... compile: x86_64-pc-windows-gnu/rustllvm/ArchiveWrapper.o link: x86_64-pc-windows-gnu/rt/rustllvm.lib rustc: x86_64-pc-windows-gnu/stage0/bin/rustlib/x86_64-pc-windows-gnu/lib/librustc_llvm C:/Users/Nick/GitHub/rust/x86_64-pc-windows-gnu/rt/llvmdeps.rs:78:38: 78:54 labelmediumlabel_id |
| idrust_28641textwhy does rustc on OSX use LC_UNIXTHREAD instead of LC_MAIN? | I've noticed that `/usr/local/bin/rustc` on OSX (Yosemite in my case) uses the (I believe deprecated) `LC_UNIXTHREAD` load command to specify the entry point and C runtime initialization routines instead of the standard `LC_MAIN`. Is there a particular reason for this?", "label": "medium", "label_id": 2} |
| {"id": "rust_28643", "text": "the book attributes page isn't practically useful | The [attributes section](http://doc.rust-lang.org/nightly/book/attributes.html) doesn't cover how these rules are applied to typically used libraries or binaries and should be expanded. For example, why does this case fail? It's trying to apply that feature to the enclosing modullabelquestionlabel_id |
| idrust_28644textHIR: Move lifetime elision to HIR lowering | If we can | labels: A-HIRlabelmediumlabel_id |
| idrust_28647textrustdoc weird formatting | Rustdoc does something weird to inline code segments I tried this code: ``` rust /// This function, `test`, is a test. pub fn test() {} ``` I expected to see this happen: (Taken on Rust 1.0) , but am lacking hands-on problem solving with Rust as I learn. I'd love to see (or help out with) something similar to the [interactive golang tour](https://tour.golang.org/welcome/1). I'm interested if anyone is alr", "label": "medium", "label_id": 2} |
| {"id": "rust_28653", "text": "Confusing error when using unsized types without indirection | ``` rust fn foo(arg: Foo) {} //Foo is a trait fn bar (arg: [i32]) {} fn quz (arg: str) {} ``` All those functions return the following error: **the trait `core::marker::Sized` is not implemented for the type...** This is confusing for a beginner, because it makes you think you ne | labels: C-enhancement, A-diagnostics, T-compiler, D-papercut, D-newcomer-roadblock", "label": "low", "label_id": 3} |
| {"id": "rust_28657", "text": "libsyntax: Name can be made NonZero | Spawned from https://github.com/rust-lang/rust/pull/28642 `Name` is an index into the string interner's internal array. The first element of this array can be reserved and `Name` will always contain non-zero index. It will make `Option<Name>` and `Option<Ident>` commonly encounte | labels: A-parserlabelmediumlabel_id |
| idrust_28658textlibsyntax: Implementation of PartialEq on Ident is not well behaved | Spawned from https://github.com/rust-lang/rust/pull/28642 There's no one true way to compare `Ident`s. They can be compared non-hygienically (`id1.name == id2.name`), hygienically (`mtwt::resolve(id1) == mtwt::resolve(id2)`), or even member-wise (`id1.name == id2.name && id1.ctxt | labels: A-parser", "label": "medium", "label_id": 2} |
| {"id": "rust_28659", "text": "libsyntax: Consider using Names instead of most Idents in AST datastructures | Spawned from https://github.com/rust-lang/rust/pull/28642 Similar to https://github.com/rust-lang/rust/issues/6993 `Ident`s are strictly necessary for `PathSegment`, `PatIdent` (hygienic identifiers) and `ExprWhile`, `ExprLoop`, `ExprBreak`, `ExprAgain`(hygienic labels). All othe | labels: A-parser", "label": "medium", "label_id": 2} |
| {"id": "rust_28660", "text": "Hint the generic type and possible bounds on the unimplemented trait error | ``` rust fn f<T>(x: T) { x + 4; } fn g<T>(x: T) { println!(\"{}\", x); } fn h<T>(x: T) { trait X {} fn hh<T:X>(x: T) {} hh(x); } ``` Codes like these currently do not point to the original declaration of `T` for missing trait bounds. In some cases rustc even does not indicate which | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_28667", "text": "Cannot build rustc on systems that use musl libc | Hey, currently it's not possible to build `rustc` on Alpine Linux because it is based on musl libc. The main problem is that your shipped LLVM version does not contain the patches needed to compile on musl libc. ``` /tmp/rustc-beta/src/llvm/lib/Support/DynamicLibrary.cpp: In stat | labels: A-LLVMlabelquestionlabel_id |
| idrust_28670textinternal compiler error with a unknown value in a slice | struct with unknow value from enum in slice variable I tried this code: ``` rust #[repr(C)] #[derive(Copy, Clone)] pub enum Ipc { CREAT = 0o0001000, // POSIX NOWAIT = 2048, // POSIX } pub struct MsgBuf { pub mtype: u32, pub mtext: [u8; Ipc::MSG_BUFF as usize], // <- The error is | labels: A-resolve, I-ICElabelhighlabel_id |
| idrust_28671textEmpty link name at llvmdeps.rs | Hi everyone. I tried to build rust from github source (). But, I faced below error. configure option is here. ``` shell ./configure --target=i686-unknown-linux-gnu,x86_64-unknown-linux-gnu --enable-clang ``` Then ``` shell rustc: x86_64-unknown-linux-gnu/stage0/lib/rustlib/x86_64labelmediumlabel_id |
| idrust_28676text[Windows] Wrong ABI when interfacing with C code | [Here is a gist containing the entire source code if you want to reproduce](https://gist.github.com/tomaka/0949b94ee9b6b8b6799d). When calling the function `foo` defined like this in C: ``` c typedef struct { size_t a; size_t b; size_t c; size_t d; } Foo; size_t foo(void* a, void | labels: O-windowslabelmediumlabel_id |
| idrust_28684textemphasize that &mut is a distinct type from & in the book | Most if not all the book's discussions on [borrowing](http://doc.rust-lang.org/nightly/book/references-and-borrowing.html) and [mut](http://doc.rust-lang.org/nightly/book/mutability.html) focus on type binding of this sort: ``` rust let i = &mut 3; let j = &7; ``` [Mutability](ht", "label": "question", "label_id": 4} |
| {"id": "rust_28687", "text": "Rules for matching against variable unclear. | When you have a match statement against a variable the behaviour is unexpected. [I tried this code:](http://is.gd/7AZ2lx) ``` fn main() { let x = 'x'; let c = 'c'; match c { x => println!(\"Bug? {} {}\", x, c), } println!(\"x: {}\", x) } ``` #### I expected to to see this happen: Eit", "label": "medium", "label_id": 2} |
| {"id": "rust_28690", "text": "Constraining associated type of super trait seems impossible | I just tried to do something like this ``` rust use std::ops::{ Deref, DerefMut }; trait Array: Deref + DerefMut where <Self as Deref>::Target = [Self::Item] { type Item; } ``` and various variations of it including ``` rust trait Array: Deref<Target = [Self::Item]> + DerefMut { ", "label": "question", "label_id": 4} |
| {"id": "rust_28692", "text": "Tuple struct patterns can match unit structs | This compiles on stable and nightly, but it shouldn't: ``` rust struct S; fn main() { let S(..) = S; } ``` | labels: T-langlabelmediumlabel_id |
| idrust_28693textClarify in the book that indexing into a vector must be done with a usize | Someone came into the channel today confused at how to index into a vector. Their problem was that the variable that they wanted to use as an index was an `i8`. Casting actually crossed their mind, but they gave up after trying `v[foo as i32]` and `v[foo as isize]`. The page at hlabelmediumlabel_id |
| idrust_28695textrustdoc search on local machine does not work on Google Chrome on Windows | When documentation is generated for a local project everything works fine except the searching. I looked in the Chrome Console and saw that main.js was generating an error.  a list of results comes up. When you clear the search bar/press the X button it probably should clear the results to allow you to view the original page. Anyone know how to fix this? | labels: T-rustdoc, C-enhancement", "label": "low", "label_id": 3} |
| {"id": "rust_28699", "text": "jemalloc seems to be holding onto enormous quantities of memory, causing the appearance of a memory leak | @frankmcsherry came in today asking about help diagnosing a memory leak in timely-dataflow. His program was sitting on 7GB (as observed through the system monitor) with no apparent reason. Eventually we guessed that maybe the allocator was being greedy behind the scenes, and that | labels: A-allocators", "label": "medium", "label_id": 2} |
| {"id": "rust_28700", "text": "ICE in coreutils: ERROR:rbml::reader: failed to find block with tag 56 | When trying to update uutils/coreutils to HEAD, I got this ICE: ``` ERROR:rbml::reader: failed to find block with tag 56 error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://githu | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_28701", "text": "Clarify a sentence in the Iterators section of the book | In the [Iterators section](https://github.com/rust-lang/rust/blame/master/src/doc/trpl/iterators.md#L284-L285) of TRPL where it is talking about `take(n)` the page says, \"Note that this has no side effect on the original iterator.\" It's not really clear what this is trying to conlabelmediumlabel_id |
| idrust_28704textPossible error in example on subtyping and variance in nomicon | The following piece of code is present at the end of variance chapter in nomicon: ``` rust use std::cell::Cell; struct Foo<'a, 'b, A: 'a, B: 'b, C, D, E, F, G, H> { a: &'a A, // variant over 'a and A b: &'b mut B, // invariant over 'b and B c: *const C, // variant over C d: *mut labelmediumlabel_id |
| idrust_28706textWrong definition of identifiers in Rust Reference | Rust reference says: > An identifier is any nonempty Unicode2 string of the following form: > - The first character has property XID_start > - The remaining characters have property XID_continue The problem with this is that `_` (LOW LINE) is not XID_start (reference: http://www.labelmediumlabel_id |
| idrust_28708textcommand-line help for -{W,A,D,F} is ambiguous (suggests presence of non-existent 'all' option) | I downloaded the rust 1.3.0 distribution; `rustc -W help` says, in part: ``` Available lint options: -W <foo> Warn about <foo> -A <foo> Allow <foo> -D <foo> Deny <foo> -F <foo> Forbid <foo> (deny, and deny all overrides) ``` The documentation here for `-F` suggests to me that `-F | labels: A-frontend, E-easylabellowlabel_id |
| idrust_28709text'-A unused' does not turn off warnings for unused attributes | Running `rustc` with `-A unused` to turn off complaints about various unused bits in code left the `unused-attribute` warning in place: ``` /usr/local/bin/rustc -O --crate-type staticlib -A unused -o libMP4Metadata.a /home/froydnj/src/gecko-dev.git/media/libstagefright/binding/MP | labels: A-frontend, A-lintslabelmediumlabel_id |
| idrust_28710textmake check-stage1 is currently not working | Lots of [discussion](https://internals.rust-lang.org/t/stage1-tests-and-landing-pads/2606/10) as well as [proposed](https://github.com/rust-lang/rust/pull/28206/files) [fixes](https://github.com/rust-lang/rust/pull/27417). Looks like the best solution for now (from the discuss thlabelquestionlabel_id |
| idrust_28712textRustdoc does not compile code pieces if they are not separated from the surrounding text | The following is a perfectly valid Markdown, however, Rustdoc does not compile the piece of code (and, naturally, it is not run as a test with `cargo test`): `````` rust /// This is a test: /// ```rust /// let x = SomeUnknownStructure::new(); /// ``` `````` This, however, does wo | labels: T-rustdoc, T-dev-toolslabelmediumlabel_id |
| idrust_28713textrustc apparently optimizes away the loop in 3.3 | I just implemented the code in section 3.3 to compare Ruby to Rust. It appears that rustc optimizes away the inner loop of the thread, because I kept increasing the limit and the completion time remained constant. I introduced a simple if statement in the loop, and then I got explabelmediumlabel_id |
| idrust_28714textRustc does not build with clang | ``` clang++ -O2 -Wall -Werror -g -fPIC -m64 -Qunused-arguments -fno-rtti -Qunused-arguments -c -o x86_64-unknown-linux-gnu/rustllvm/ExecutionEngineWrapper.o -I//usr//include -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -fPIC -fvisibili | labels: A-LLVM, C-feature-requestlabelmediumlabel_id |
| idrust_28716text--emit dep-info is a little difficult to use | The compiler's `dep-info` output doesn't work quite as one might expect when coming from the land of gcc/clang, for example: 1. If only a `dep-info` file is generated, the output filename is pretty unlikely to what's going to be compiled later on: ``` $ rustc foo.rs --emit dep-in", "label": "medium", "label_id": 2} |
| {"id": "rust_28718", "text": "cfg_target_features not working | How to replicate: ``` $git clone https://github.com/valarauca/getcup.git $cd getcup $cargo build $target/debug/getcup SSE2 compatible ``` Doesn't matter what order the flags are in. Tested on Linux 3.19.0-28, x86_64, i7-4790, built with rustc 1.5.0-nightly (7bf4c885f 2015-09-26) labelmediumlabel_id |
| idrust_28720textDeref issue and stack overflow | ``` rust use std::fmt; use std::ops::Deref; #[derive(Clone)] pub struct FileKey(pub String); impl fmt::Display for FileKey { fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { write!(f, \, self) } } impl Deref for FileKey { type Target = str; fn deref<'a>(&'a selabelmediumlabel_id |
| idrust_28721textHigher ranked lifetimes cannot cross type boundaries | This currently does not compile: ``` rust struct Message<'a> { data: &'a u32, } struct Handler<T>(Option<Box<Fn(T)>>); struct Cfg { handler: for<'a> Handler<Message<'a>>, // error: `Handler` is not a trait [E0404] } ``` This precludes a lot of useful patterns. | labels: A-lifetimeslabelmediumlabel_id |
| idrust_28726textAsk for bringing back the `std::rt::unwind::try` | Since Rust does not have officially support coroutines, so I attempted to made several crates that supports coroutine scheduling and non-blocking I/O. - https://github.com/rustcc/coroutine-rs - https://github.com/zonyitoo/coio-rs - https://github.com/zonyitoo/simplesched But theslabelquestionlabel_id |
| idrust_28728textLLVM loop optimization can make safe programs crash | The following snippet crashes when compiled in release mode on current stable, beta and nightly: ``` rust enum Null {} fn foo() -> Null { loop { } } fn create_null() -> Null { let n = foo(); let mut i = 0; while i < 100 { i += 1; } return n; } fn use_null(n: Null) -> ! { match n | labels: A-LLVM, P-medium, I-needs-decision, T-compiler, I-unsound, E-mediumlabelcritical_buglabel_id |
| idrust_28733textFailed to build with rodio | When trying to build my simple file with rodio i get this error: ``` thread 'rustc' panicked at 'assertion failed: self.appropriate_rvalue_mode(bcx.ccx()) == ByValue', ../src/librustc_trans/trans/datum.rs:767 ``` And it was caused by: ``` Caused by: Process didn't exit successful | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_28734", "text": "Proper tab stops for preformatted text | Currently we advance by eight spaces for each tab character ('\\t', U+0009) in preformatted text: https://github.com/servo/servo/blob/master/components/gfx/text/shaping/harfbuzz.rs#L514 Instead, tabs should advance to the next multiple of the tab-stop width: > All tabs (U+0009) ar", "label": "medium", "label_id": 2} |
| {"id": "rust_28735", "text": "--emit dep-info should support emitting \"phony\" dependencies for input files | Running something like: ``` rustc --emit dep-info -o x.o lib.rs ``` will produce a depfile containing a rule like: ``` x.o: /path/to/lib.rs /path/to/a.rs /path/to/b.rs ``` This output has a problem: if `a.rs` is deleted from the filesystem and dependencies on it erased from `lib.", "label": "question", "label_id": 4} |
| {"id": "rust_28737", "text": "Intermittent borrow checker bug | Yay for non-determinism: ``` ../src/librustc/middle/expr_use_visitor.rs:283:9: 287:10 error: cannot infer an appropriate lifetime for lifetime parameter `'tcx` due to conflicting requirements ../src/librustc/middle/expr_use_visitor.rs:283 ExprUseVisitor { ../src/librustc/middle/e | labels: A-borrow-checker, T-compilerlabelmediumlabel_id |
| idrust_28739textAdd high level summary at the top of crates/modules in the book | [crates and modules](http://doc.rust-lang.org/nightly/book/crates-and-modules.html) has a lot of info which is buried deep in the text. It'd be good to have a few major points that the text covers highlighted at the top, perhaps with bullet points or something. - The crate is the", "label": "medium", "label_id": 2} |
| {"id": "rust_28740", "text": "does extern keyword actually affect a function's calling convention? | According to [the Book](https://doc.rust-lang.org/stable/book/rust-inside-other-languages.html#a-rust-library) > The pub means that this function should be callable from outside of this module, and the extern says that it should be able to be called from C. That’s it! Not a wholelabelmediumlabel_id |
| idrust_28747textstd::fs::OpenOptions::mode() is affected by the current umask | Just what it says on the tin. I'm not sure if this is intentional, but if it is, there should definitely be a way to open a file with an unmasked mode. `rustc --version --verbose`: ``` rustc 1.3.0 binary: rustc commit-hash: unknown commit-date: unknown host: x86_64-apple-darwin r", "label": "medium", "label_id": 2} |
| {"id": "rust_28750", "text": "libsyntax/librustc_front: Some visitor methods don't have access to span information | Namely: ``` visit_struct_def visit_enum_def visit_generics visit_arm (can use span of inner Expr, but it's bad) ``` \\+ maybe ``` visit_trait_ref (can use span of inner Path, acceptable) visit_ty_param_bound (can use span of inner Lifetime or PolyTraitRef, acceptable) visit_lifeti", "label": "medium", "label_id": 2} |
| {"id": "rust_28751", "text": "Compiler panic when taking the pointer of a static mut variable | I'm trying to reproduce [this bit of C code](https://gist.githubusercontent.com/Snaipe/db898ece69435f88760c/raw/a7aaf63021b42dad836dc4ee76316722b046e1ac/goal.c) into [Rust](https://gist.githubusercontent.com/Snaipe/db898ece69435f88760c/raw/a7aaf63021b42dad836dc4ee76316722b046e1ac | labels: I-ICElabelhighlabel_id |
| idrust_28752textToggle stack unwinding without printing error message | Is it possible to toggle stack unwinding without printing error message to stderr? I am working on a coroutine library and I want to manually unwind the stack when destroying coroutines. But now I could only use `panic!` to do the trick.labelmediumlabel_id |
| idrust_28756textGuidance on writing code that deadlocks for Dining Philosophers | Is it possible to compile code that deadlocks in Rust? I'm trying to break the [Dining Philosophers](https://doc.rust-lang.org/book/dining-philosophers.html) code and get it to deadlock but I can't seem to get it to freeze up. I've tried switching the forks of the last philosophe", "label": "medium", "label_id": 2} |
| {"id": "rust_28766", "text": "Compiler segfaults when boxing a ZST from an external crate | # Demonstration I uploaded a repo with the simplest possible case I could come up with that demonstrates this issue [here](https://github.com/kylewlacy/rust-segfault). Here's how it works: ``` sh $ rustc --version --verbose rustc 1.4.0-dev (d2e13e822 2015-09-15) binary: rustc com | labels: I-ICElabelhighlabel_id |
| idrust_28773textThere should be a Box<Error+Send+Sync> -> Box<Error> From conversion | This conversion is done implicitly, but implicit conversions aren't done in generic lookup. This means that ``` rust fn foo() -> Result<(), Box<Error + Send + Sync>> { try!(Err(\"foo\")) } fn bar() -> Result<(), Box<Error>> { try!(foo()); } ``` will fail, which is obnoxious and mea", "label": "medium", "label_id": 2} |
| {"id": "rust_28774", "text": "Possible wrong \"value assigned to `something` is never read\" warning | I learning rust and write my own simple macros. (This macros just fills my matrix like vec! fills Vec<T>) ``` #[derive(Debug)] struct MatrixXf { rows: usize, cols: usize, values: Vec<f32> } macro_rules! mat { [ $($( $x: expr ),*);* ] => {{ let mut tmp_vec = Vec::new(); let mut ro | labels: A-macros", "label": "medium", "label_id": 2} |
| {"id": "rust_28775", "text": "Unexpected behaviour of std::convert::From | I've confused by this: ``` rust use std::convert::From; pub trait MyFrom<T> { fn from(T) -> Self; } enum Chameleon { Red, Green, Blue } // This works impl MyFrom<Chameleon> for Chameleon { fn from(h: Chameleon) -> Chameleon { h } } // But this doesn't! // error: conflicting imple", "label": "medium", "label_id": 2} |
| {"id": "rust_28776", "text": "effect checking should really be using `expr_ty_adjusted` | Reproduced on: `rustc 1.5.0-nightly (6108e8c3e 2015-09-28)` ``` Rust unsafe fn blow_up() { *(0xcccccccc as *mut u8) = 0; } fn main() { (&blow_up)(); } ``` | labels: I-unsound", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_28777", "text": "Wrapping expr in curly braces changes the operator precedence | [This program](http://is.gd/rdq1jt) prints different values depending upon whether the `v1` or `v2` initializer is surrounded by curly braces: ``` rust fn main() { let v1 = { 1 + {2} * {3} }; // 9, indicating a parse of (1 + 2) * 3 let v2 = 1 + {2} * {3} ; // 7, indicating a pars | labels: A-parser, P-medium, T-lang, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_28784", "text": "Parsing inconsistencies (lambda, proc, return) | I found more inconsistencies between `rustc` and `parser-lalr`. I also noticed that Rust allows return expressions and lambda expressions to end with a struct literal, even when they're in a nostruct context. This seems inconsistent to me. Lambdas (the two parsers disagree): ``` | labels: E-easy, A-parser, P-low, T-lang, T-compiler, C-buglabellowlabel_id |
| idrust_28794textUnloading a Rust dylib with TLS used segfaults on OSX | [Example code](https://gist.github.com/overdrivenpotato/cdbd413085792c012190) The problem here is that we register a TLS destructor via `_tlv_atexit` when TLS is referenced the first time after it is used (e.g. when the dylib's function is called), but then when `dlclose` happens | labels: O-macos, A-thread-locals, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_28796", "text": "Tracking issue for FnBox() | This is a tracking issue for the `fn_box` feature and `FnBox` trait, which allows a `Box<FnOnce(...) -> _>` closure to be invoked via the `\"rust-call\"` sugar. I'm not sure what the primary concerns are. All I know is it'd be really, really nice if we could invoke a `Box<FnOnce()> | labels: T-lang, T-libs-api, B-unstable, C-tracking-issue, finished-final-comment-period, disposition-close", "label": "medium", "label_id": 2} |
| {"id": "rust_28799", "text": "Linker Error on nightly msvc 32bit, maybe related to FnBox | On rustc says rustc 1.5.0-nightly (f5a015892 2015-10-01) Demo project: https://github.com/kosta/fnbox-test When I do `cd fnbox_main; cargo run` on Mac OS (same nightly as be), it says: ``` Running `target/debug/test-fnbox` 3 + 2 = Ok(5) ``` When I do the same on Windows 7 64bit u", "label": "medium", "label_id": 2} |
| {"id": "rust_28800", "text": "Hidden type shows up in rustdoc | On https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html and other pages, one might find implementors such as: ``` rust impl Ord for Big32x36 impl Ord for Big8x3 ``` But these types are not exported and should be hidden from the documentation. | labels: T-rustdoc", "label": "medium", "label_id": 2} |
| {"id": "rust_28801", "text": "Regression in type inference of casting in constants | This works in stable, beta and nightly: ``` rust let x: *mut () = (0 as *const usize) as *const _ as *mut _; ``` This only works in stable: ``` rust const x: *mut () = (0 as *const usize) as *const _ as *mut _; ``` But in beta and nightly results in: ``` <anon>:2:47: 2:55 error: | labels: T-compiler", "label": "high", "label_id": 1} |
| {"id": "rust_28803", "text": "Unclear description in closure section of Rust Book | The first section on https://doc.rust-lang.org/stable/book/closures.html can be difficult to understand for novice programmers, particularly the line \"Anonymous functions that have an associated environment are called ‘closures’, because they close over an environment.\" It's difflabelmediumlabel_id |
| idrust_28804textimproper_ctypes ICE: ast_ty_to_ty_cache was incomplete after typeck! | [playpen repro](http://is.gd/w76hjp) ``` rust extern { fn f(_: &(::std::any::Any + Send)); } fn main() { } ``` ``` error: internal compiler error: unexpected panic thread 'rustc' panicked at 'ast_ty_to_ty_cache was incomplete after typeck!', ../src/librustc_lint/types.rs:391 stac | labels: I-ICElabelhighlabel_id |
| idrust_28809textassociated constants should support references to outer type parameters | associated constants should support references to outer type parameters Here is an example, adapted from the `Zeroable` trait from `core::non_zero` ([playpen](http://is.gd/hf1VIN)): ``` rust #![feature(associated_consts)] trait Zble { const Z: Self; } impl Zble for i32 { const Z: | labels: A-resolve, P-medium, A-associated-items, T-compilerlabelquestionlabel_id |
| idrust_28810textAudit iterator specializations for side effects | After some discussion about https://github.com/rust-lang/rust/pull/28125 the libs subteam decided that iterator adaptors should always preserve the same semantics in terms of the convenience methods and such. This was not audited for when all the initial specializations landed, s | labels: P-medium, T-libs-apilabelquestionlabel_id |
| idrust_28822textconst fn with `_` as an arg name vomits | ## Doesn't work: ``` rust #![feature(const_fn)] fn main(){} const fn size_ofs(_: usize) { } ``` ``` <anon>:3:19: 3:20 error: arguments of constant functions can only be immutable by-value bindings [E0022] <anon>:3 const fn size_ofs(_: usize) { } ^ <anon>:3:19: 3:20 help: see the | labels: E-easy, E-mentor, A-const-eval", "label": "low", "label_id": 3} |
| {"id": "rust_28824", "text": "Macro designators listed but not explained | In https://doc.rust-lang.org/reference.html#macro-by-example the various designators available for macro construction are listed, but they are not explained. The closest I could find was https://danielkeep.github.io/practical-intro-to-macros.html:  | If I have an associated type that impls some trait or is some other known type, I can't treat it as so. Example ([playpen link](http://is.gd/he7Phw)): ``` rust trait DoNothing { type Output; } struct Bob; impl Bob { fn print() { println!(\); } } impl DoNothing for Bob { | labels: A-associated-itemslabelmediumlabel_id |
| idrust_28830textBuild fails against LLVM 3.7.0 | Broken by 27dd6dd3dbe92debaac7d54c8405a3d3af1c4daf in #28500. ``` /home/wthrowe/computing/rust/src/rustllvm/RustWrapper.cpp: In function ‘LLVMOpaqueValue* LLVMRustBuildLandingPad(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef, unsigned int, const char*, LLVMValueRef)’: /home/wthrowe/c | labels: A-LLVMlabelmediumlabel_id |
| idrust_28834textShouldn't the book be in a separate repo ? | I think that with this separation we could make the book more like the progit2 book and so make it more easy translate it in various languages", "label": "low", "label_id": 3} |
| {"id": "rust_28835", "text": "Avoid use of 'just' in trpl | Hi! I'm just reading through The Rust Programming Language Book (TRPL) and I noticed usage of the word 'just' a few times: \. I've written a bit on this word but to keep it short; I feel that this is quite a loaded word and we could do better without ", "label": "low", "label_id": 3} |
| {"id": "rust_28837", "text": "Error \"binary operation `==` cannot be applied to type\" -> print note that PartialEq might be missing | The error ``` <std macros>:5:8: 5:18 error: binary operation `==` cannot be applied to type `core::result::Result<collections::string::String, MyError>` [E0369] <std macros>:5 if ! ( * left_val == * right_val ) { ^~~~~~~~~~ src\\lib.rs:34:3: 34:41 note: in this expansion of assert | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_28838", "text": "Cannot find serialize documentation. | There seems to be link rot in online api docs for `serialize::json`. Through various searches on google, duckduckgo, and from blocks and pages like [this stack overflow answer](http://stackoverflow.com/a/26337102) I go to the following URL: - http://doc.rust-lang.org/serialize/in", "label": "low", "label_id": 3} |
| {"id": "rust_28839", "text": "How to extract static reference from Option? | I have a `static Option<&'static mut Foo>` and I want to get the reference out of it. I know this is unsafe, but I can't seem to be able to figure out how to do this. First I tried this: ``` pub trait Foo { } static mut _foo: Option<&'static mut Foo> = None; pub fn get_foo() -> & | labels: regression-from-stable-to-nightly, P-high, T-langlabelcritical_buglabel_id |
| idrust_28843textBuild fails on Windows/MSYS2 | Your Windows build instructions are out of date. First of all, the set of commands doesn't install GCC, so that has to be done separately. But even after that, there are plenty of issues that prevent compilation. Please verify compilation on Windows and update the build instructi | labels: O-windows", "label": "medium", "label_id": 2} |
| {"id": "rust_28844", "text": "ICE from macro invocation with empty comment | [Playpen link](http://is.gd/udtdjR) ``` rust fn main() { println!(/**/); } ``` Output: ``` 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/rust/blob/mast", "label": "high", "label_id": 1} |
| {"id": "rust_28848", "text": "Inherent static methods can be called with a non-well-formed Self-type | **UPDATE:** This has been fixed, but a test is still needed. [See the comment below for instructions.](https://github.com/rust-lang/rust/issues/28848#issuecomment-294848720) ------- ## STR ``` Rust struct Foo<'a, 'b: 'a>(&'a &'b ()); impl<'a, 'b> Foo<'a, 'b> { fn xmute(a: &'b ()) | labels: E-easy, A-type-system, E-needs-test, E-mentor", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_28850", "text": "Allocator inconsistency between bin and dylib | I recently had a problem with a dylib causing a segfault when triggering drop in an object passed to it from a rust binary. jethrogb on the #rust irc channel found out that rustc build the dylib with alloc_system and the binary with alloc_jemalloc leading to all kinds of memory p", "label": "medium", "label_id": 2} |
| {"id": "rust_28851", "text": "four-byte uncode characters confuse `'` | This Rust program: ``` fn main() { let len = 'ஶ்ரீ'.len_utf8(); } ``` contains `TAMIL SYLLABLE SHRII (śrī)`, aka `U+0BB6 U+0BCD U+0BB0 U+0BC0`. When trying to compile this program, I get this error: ``` text 2:20: 2:22 error: unterminated character constant: '. 2 let len = 'ஶ்ரீ' | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_28853", "text": "#28669 caused regression compiling pinyin crate on nightly | See https://tools.taskcluster.net/task-inspector/#UFk2m1UJRweSxQNABRB84w/0 ; I've confirmed the issue locally, although I haven't managed to reduce it. For reference, the error message: ``` Compiling pinyin v0.0.4 (file:///home/crate) src/lib.rs:157:24: 157:29 error: cannot infer | labels: P-high, T-libs-api, regression-from-stable-to-beta", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_28854", "text": "Nightly regression: lifetime error with autoderef | Testcase: ``` rust use std::collections::HashMap; pub fn named_lints<'a>(names: &[&str], transforms: &'a HashMap<&'static str, u32>) -> Option<&'a u32> { transforms.get(&names[0]) } fn main(){} ``` ``` <anon>:5:20: 5:29 error: cannot infer an appropriate lifetime due to conflicti | labels: regression-from-stable-to-nightly, P-high, T-compiler", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_28859", "text": "unsupported target triples | Running a NetBSD instance on AWS 6.1.5 Just did a new git clone - After running the ./configure receiving an unsupported target triples \"x86_64-unknown-netbsd\" found here is the error in its entirety ``` configure: looking for configure programs configure: found program 'cmp' con", "label": "question", "label_id": 4} |
| {"id": "rust_28860", "text": "Rustdoc doesn’t expand macros properly when generating docs | I have defined a macro to bind constants: ``` rust #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct Const(pub i32); macro_rules! bind_constant { ($NAME:ident, $value:expr) => { pub const $NAME: Const = Const($value); } } bind_constant!(A, 10i32); bind_constant!(B, 20i32); | labels: T-rustdoc", "label": "low", "label_id": 3} |
| {"id": "rust_28862", "text": "Book contradicts itself | In chapter [2.3 Dining Philosophers](https://doc.rust-lang.org/book/dining-philosophers.html) the `map` function is used to call a closure for every philosopher. The closure however is only executed for its side effects (it doesn't actually calculate anything). The chapter on [itlabelmediumlabel_id |
| idrust_28870textMultiple extern fn with same name should not error out | See https://github.com/rust-lang/rust/issues/16403#issuecomment-66864518 and that issue in general. Currently for each `extern fn` we generate a rust ABI function containing function body and a `C` ABI trampoline to the rust function. However we do not mangle the rust ABI functiolabelmediumlabel_id |
| idrust_28871textAssociated type regression? unable to infer enough type information about `_` | rustc seems to accept this under stable, but not beta or nightly. [playpen repro](http://is.gd/uijdR8) ``` rust trait T { type T; } struct S; impl T for S { type T = S; } trait T2 { type T: Iterator<Item=<S as T>::T>; } ``` ``` error: unable to infer enough type information about | labels: A-associated-items, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_28879textcargo new --vcs git doesn't init a branch, if alread inside a tree | I was slightly surprised by this: ``` % cd /tmp % git init a Initialized empty Git repository in /private/tmp/a/.git/ % cd a/ % cargo new --vcs git -v --bin b % ls -a b . .. Cargo.toml src ``` Perhaps this is working as intended but I would have liked at least a warning.", "label": "medium", "label_id": 2} |
| {"id": "rust_28881", "text": "Possibly-incorrect coherence error with blanket impl bounded by a trait with type param | This fails to compile: ``` rust trait Base<X> {} trait Foo<X> {} impl<X, T: Base<X>> Foo<X> for T {} struct Bar<T>(T); impl<T> Foo<T> for Bar<T> {} fn main() {} ``` ``` <anon>:4:1: 4:36 error: conflicting implementations for trait `Foo` [E0119] <anon>:4 impl<X, T: Base<X>> Foo<X> | labels: A-trait-system, T-lang", "label": "medium", "label_id": 2} |
| {"id": "rust_28883", "text": "Guide:mismatched types ->E0380 when cargo run in guess_game | i wrote the code ,but error occured when cargo run,this error is :mismatched types E0380,i know why this occured,because rust book have tell me,the point is :why i wrote code as like rust book,it can't cargo run success? i wrote this code follow the example: let guess: u32 = gueslabelmediumlabel_id |
| idrust_28890textAdd style to rustdoc/rustbook | I'm working to add a dark theme on both rustbook and rustdoc. I'll also add a list to allow switching between styles without impacting the global interface. cc @steveklabnik | labels: T-rustdoclabelmediumlabel_id |
| idrust_28899textSpanning algorithm assumes all codepoints have width equal to 1 | ``` /tmp/test.rs:2:23: 2:23 error: invalid unicode character escape /tmp/test.rs:2 let a = \; ^ /tmp/test.rs:3:37: 3:37 error: invalid unicode character escape /tmp/test.rs:3 let a = \; ^ error: aborting due to 2 previous errors ``` the first elabelmediumlabel_id |
| idrust_28901textInadequate error handling in make_place(). | Currently the only way to handle failed pointer creation when making a place is to panic, like IntermediateBox does. For some use cases, panicking is unacceptable. There needs to be a way to indicate that it is impossible to allocate an object into a container without crashing thlabelmediumlabel_id |
| idrust_28903textbogus span with iterator adapter chain | Playpen: https://play.rust-lang.org/?gist=aca803a41435a13b5a72&version=nightly Something is wrong with the error here. The call to `map` is wrong, but the error refers to `filter`. | labels: A-diagnosticslabelmediumlabel_id |
| idrust_28912textLLVM lint: Memory reference address is misaligned | This is a subissue of #7463. ``` rust pub enum H<A, B> { L(A), R(B), } pub fn test() -> H<i32, i64> { H::L(0) } ``` Compile with `rustc -C passes=lint` and you get: ``` Undefined behavior: Memory reference address is misaligned call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* get | labels: A-LLVMlabelmediumlabel_id |
| idrust_28917textImproving installation on local directory by updating LD_LIBRARY_PATH | When installing rust in a local directory on linux (not /usr/local but /home/name/rust for example), it is necessary to update LD_LIBRARY_PATH with the path to the rust libraries. For example, in bash: > export LD_LIBRARY_PATH=\:$LD_LIBRARY_PATH An improvement oflabelmediumlabel_id |
| idrust_28918textIllegal instruction when building rust 1.3 on Debian 8 Jessie 64bits and using system-wide LLVM 3.5 | When building rust 1.3 on debian Jessie 64-bit **with the LLVM software provided by the distribution**, compilation fails with an illegal instruction error. When rust is built with the bundled LLVM, no error occurs. Rust Build has been configured with : `./configure --prefix=/optlabelmediumlabel_id |
| idrust_28924textLink error when cross-compiling to ARM with --crate-type dylib: Relocations in generic ELF (EM: 40) | `rustc lib.rs -g --crate-type dylib --target arm-linux-androideabi` fails with the following error, even if `lib.rs` is an empty file: ``` error: linking with `cc` failed: exit code: 1 note: \ \ \ \ \, : , : 2} |
| {: , : dsp\, : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : thread 'rustc' has overflowed its stack\, : , : 1} |
| {: , : --enable-debug --enable-optimize\fnfn\fnfn\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : foo.txt\, : , : 2} |
| {: , : , : , : 2} |
| {: , : blessed\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : non_ascii_idents\, : , : 3} |
| {: , : , : , : 2} |
| {: , : C\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : test\, : , : 2} |
| {: , : , : , : 2} |
| {: , : foo\bar\exepcted\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : /a/b/c\{:?} {:?}\\{:?} {:?}\\{:?} {:?}\{:?} {:?}\, : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : -clang -debug -doc -libcxx\, : , : 2} |
| {: , : , : , : 1} |
| {: , : test\1.0.0\test\1.0.0\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : +\-\+\f32 OK: {}\f32 Error: {}\-\f64 OK: {}\f64 Error: {}\Error: invali | labels: regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_29043textConfusing error message calling indirect function pointer | Hi, When compiling this code ``` Rust extern crate libc; #[repr(C)] pub struct ApiFromC { some_data: *mut libc::c_void, some_function: extern fn(data: *mut libc::c_void), } struct RustAPI { api_from_c: *mut ApiFromC, } impl RustAPI { fn call_c_api(&self) { unsafe { (*self.api_fro | labels: A-diagnosticslabelmediumlabel_id |
| idrust_29048textNightly regression: Incorrect \ warning | Testcase: ``` rust use std::marker::PhantomData; pub struct WebDriverHttpApi<U> { _routes: PhantomData<U>, } impl <U> WebDriverHttpApi<U> { pub fn new(extension_routes:Vec<(&str, U)>) -> WebDriverHttpApi<U> { for &(ref _url, ref _extension_route) in extension_routes.iter() {} uni | labels: A-lifetimes, regression-from-stable-to-nightly, P-high, T-lang, T-compilerlabelcritical_buglabel_id |
| idrust_29049textPerhaps document breaking changes better | Now that breaking changes are much more rare, and preceded by long discussion of how the breakage can be worked around, it may be worthwhile to provide a single document that lists: - Summary of the change. - Information that helps you identify that it is indeed _this_ change thalabelquestionlabel_id |
| idrust_29052textICE when installing Rust 1.3.0 on El Capitano via homebrew | Error is: ``` Compiling crates-io v0.1.0 (file:///private/tmp/rust--cargo20151014-72976-7pfg6i) 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/rust/blob | labels: I-ICElabelhighlabel_id |
| idrust_29053textUnsoundness in borrowck around deref and mutable refs | Stable and nightly happily compile the following: ``` rust fn main() { let x: &'static str = \"x\"; { let y = \"y\".to_string(); let ref mut x = &*x; *x = &*y; } println!(\"{:?}\", x); } ``` Running the program on my local Ubuntu machine yields: ``` thread '<main>' panicked at 'index 0 | labels: E-easy, E-needs-test, P-medium, T-compiler, A-MIR, I-unsoundlabelcritical_buglabel_id |
| idrust_29056textTraits are not implemented for functions with higher-ranked lifetime bounds | Also the error is really confusing, because the compiler omits the troublesome bound in the error message. ``` rust trait IsClone: Clone {} impl IsClone for fn(&()) {} //~^ error: the trait `core::clone::Clone` is not implemented for the type `fn(&())` impl IsClone for for<'a> fn", "label": "medium", "label_id": 2} |
| {"id": "rust_29057", "text": "Using enum with trait causes crash | The following code ``` rust trait U {} enum T { Data(U) } fn f(t: &T) {} fn main() {} ``` causes a crash: ``` 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- | labels: I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_29063", "text": "[Docs] Terminology inconsistency between 'iterator adapters' and 'iterator adaptors' | ## Context After having first read about iterators the TRPL book, it called my attention the scarce number of matching results in the API docs for a query like \"iterator adapters\". Curiously enough, it looks like the term used there is \"adaptors\" instead of adapters. ## Data - Ap", "label": "low", "label_id": 3} |
| {"id": "rust_29064", "text": "dead_code false positive on matched enum | [This code](http://is.gd/17G7yv) produces a dead code warning for the entire enum, but it isn't dead because the match expression refers to it. Or do I have the wrong definition of \? (I generally assume when rustc says \ it means \.) `` | labels: A-lintslabelmediumlabel_id |
| idrust_29067textAllow pub access to underlying 'Read' member of Take or Chain | I asked this as [a question on StackOverflow](http://stackoverflow.com/questions/33114619/access-to-components-of-a-read-wrapped-by-take-or-chain), and it was suggested that I raise an issue. I'm writing a Rust implementation of the Google Brotli decompression algorithm, which us | labels: T-libs-api, E-help-wanted", "label": "question", "label_id": 4} |
| {"id": "rust_29071", "text": "Parsing inconsistencies with semi-statements in expressions | ``` x = if true { 10u32 } else { 20u32 } as () ``` parses as ``` x = (if true { 10u32 } else { 20u32 } as ()) ``` but ``` if true { 10u32 } else { 20u32 } as () ``` parses as ``` if true { 10u32 } else { 20u32 }; as () ```", "label": "medium", "label_id": 2} |
| {"id": "rust_29073", "text": "Arithmetic operation overflowed in rustc_trans::trans::cabi_x86_64 | I'm getting an \ ICE in librustc_trans/trans/cabi_x86_64.rs on line 454 when building stage1 libstd on 64-bit Ubuntu. Likely related to #27017.labelmediumlabel_id |
| idrust_29077textdoc/style/changing directory is outdated. | The directory https://github.com/rust-lang/rust/tree/master/src/doc/style/changing has a pre-1.0 page attached to it, and the post-1.0 page talks about higher kinded types. Given that nobody's mentioned this yet, I don't think this chapter of the style guide is even useful, and slabelmediumlabel_id |
| idrust_29078textcalling `std::mem::drop` on a `Copy`-struct should give a warning | Currently [code like this](http://is.gd/cICPIS) ``` rust fn main() { let i = 3; for _ in 0..10 { println!(\, i); std::mem::drop(i); } } ``` compiles without any warnings. What's happening, is that a copy of the object gets passed into std::mem::drop. I'd doubt this could be th | labels: A-lintslabelmediumlabel_id |
| idrust_29084textICE: \ with macro and two files, no backtrace | Compiling the following two files results in an ICE without a backtrace: - lib.rs: ``` rust macro_rules! foo { ($d:expr) => {{ fn bar(d: u8) { } bar(&mut $d); }} } mod m; ``` - m.rs: ``` rust fn f() { foo!(0u8); } ``` Compiled with the command: `rustc lib.rs --crate-type lib` Res | labels: I-ICElabelhighlabel_id |
| idrust_29088textConfusing error message for non-ASCII byte literals | Playpen: http://is.gd/DB2ZBU Code like `b'→'` that puts a unicode character in a byte literal gets a confusing error message: ``` <anon>:2:7: 2:8 error: byte constant must be ASCII. Use a \\xHH escape for a non-ASCII byte: \\u{2192} <anon>:2 b'→' ^ ``` A lot of people read this as | labels: A-diagnosticslabelmediumlabel_id |
| idrust_29092textSegfault in a compiler-generated Drop impl | I've tried reducing this code in various ways, and unfortunately the original seems to already be the smallest that fails! Removing variants from `Term` causes it to not exhibit itself, as does removing cases from the outer `match` in `small_eval`. It reproduces on latest nightly | labels: I-crash, A-codegen", "label": "high", "label_id": 1} |
| {"id": "rust_29093", "text": "Global const expr with macro causes compiler panic | I would like to have compile-time evaluation of my const values from the environment variables. I wonder whether I had some grammar mistakes, however the compiler panics. This occurs all stable, beta, and nightly versions (from play.rust-lang.org). I tried this code: ``` const DE | labels: I-ICE, T-compiler", "label": "high", "label_id": 1} |
| {"id": "rust_29094", "text": "Ambiguous elided lifetime error claims non-elided lifetime is elided | ``` rust struct Thing<'a>(&'a ()); fn func1<'a>(_arg: &'a Thing) -> &() { unimplemented!() } fn func2<'a>(_arg: &Thing<'a>) -> &() { unimplemented!() } ``` gives ``` test.rs:3:34: 3:37 error: missing lifetime specifier [E0106] test.rs:3 fn func1<'a>(_arg: &'a Thing) -> &() { unim | labels: C-enhancement, A-diagnostics", "label": "low", "label_id": 3} |
| {"id": "rust_29095", "text": "Incorrect shadowed label warnings | This may be a byproduct of not having non-lexical lifetimes, but this code generates a bunch of shadowed label warnings that are not accurate (control is not within the block of the allegedly shadowed label at the point the new label is declared): ``` match 0 { 0 => { 'quux: loop | labels: A-diagnosticslabelmediumlabel_id |
| idrust_29097textShadowed label warning should be a hardwired lint | There's no way to turn off the shadowed label warning: http://is.gd/0e3wQf. We should add a `SHADOWED_LABEL` lint to [builtin.rs](https://github.com/rust-lang/rust/blob/293966694c3c8e0c7028e8f54340fbc328d85bff/src/librustc/lint/builtin.rs), and convert the `span_warn` [here](http | labels: A-lints", "label": "medium", "label_id": 2} |
| {"id": "rust_29101", "text": "impl default type param fallback not firing without explicitly typed expression context | One of the big motivations for default type parameter fallback ([RFC #213](https://github.com/rust-lang/rfcs/blob/master/text/0213-defaulted-type-params.md)) was for future-proofing our API's: We wanted to be able to stabilize an api like `Vec<T>`, with the expectation that futurlabelmediumlabel_id |
| idrust_29103textNightly borrowck regression | The following code compiles on stable and beta but not on the current nightly: ``` rust #[derive(Clone)] struct S; impl S { fn borrow(&self) -> Vec<&Self> { vec![self] } fn borrow_mut(&mut self, _: &S) { } } fn main() { let mut s = S; for x in s.borrow().into_iter().cloned().coll | labels: regression-from-stable-to-nightly, P-high, T-compilerlabelcritical_buglabel_id |
| idrust_29106text`Arc` and `Rc` are dropck-unsound | ``` rust use std::sync::Arc; struct Foo<'a>(&'a String); impl<'a> Drop for Foo<'a> { fn drop(&mut self) { println!(\, self.0); } } fn main() { let (y, x); x = \.to_string(); y = Arc::new(Foo(&x)); } ``` Output after compiling with `rustc 1.5.0-nightly (6cdf31b12 2015-1 | labels: T-libs-apilabelmediumlabel_id |
| idrust_29107textunsafe const fn declaration order | The [recent implementation](https://github.com/rust-lang/rust/pull/28827#issuecomment-148083432) uses the syntax `unsafe const fn`, but the RFC says `const unsafe fn`. | labels: A-parser, T-langlabelmediumlabel_id |
| idrust_29115textextern \ causes ICE | I tried this code ``` Rust extern \ { fn foo(); } pub extern fn bar() { unsafe { foo(); } } ``` I get this error back ``` error: internal compiler error: unimplemented foreign functions with Rust ABI note: the compiler unexpectedly panicked. this is a bug. note: we would app | labels: I-ICElabelhighlabel_id |
| idrust_29116textICE in stable `1.3.0` - ERROR:rbml::reader: failed to find block with tag 37 | The ICE occurs when I `cargo build` a personal project. Here's the stack trace: ``` Compiling timeline v0.1.0 (file:///Users/Mitch/Programming/Rust/jen/timeline) ERROR:rbml::reader: failed to find block with tag 37 error: internal compiler error: unexpected panic note: the compil", "label": "high", "label_id": 1} |
| {"id": "rust_29120", "text": "Bad span for expression literal in match arm | The span assigned to the _expression_ `10` in ``` rust match x { 10 => 20, _ => 25, } ``` is `10 =>`, where one would expect it to be `10`. The _pattern_ `10` is correctly assigned the span `10`.", "label": "medium", "label_id": 2} |
| {"id": "rust_29121", "text": "Hint when using a static method on an instance is wrong | I wrote `Box::new(telemetry_t::new()).into_raw()` and got this output: ``` src/lib.rs:41:34: 41:44 error: no method named `into_raw` found for type `Box<telemetry_t>` in the current scope src/lib.rs:41 Box::new(telemetry_t::new()).into_raw() ^~~~~~~~~~ src/lib.rs:41:34: 41:44 not | labels: A-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_29122", "text": "ICE: `Result::unwrap()` on an `Err` value: Utf8Error | Compiler crashes while compiling https://github.com/CrystalGamma/rusttype/tree/bugrep0 using Cargo. Cargo version: cargo 0.6.0-nightly (18e496a 2015-10-17) rustc version: 1.3.0 ``` thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 5labelmediumlabel_id |
| idrust_57247textfalse positive non-exhaustive patterns: pattern guarded outside of match | ````rust pub fn func(a: Option<i32>, b: Option<i32>) { if a.is_some() || b.is_some() { match &(a,b) { /* 7 | match &(a,b) { | ^^^^^^ pattern `&(None, None)` not covered */ // (None, None) => {} // will never match due to if-condition (Some(_a), None) => {} (None, Some(_b)) => {} labelmediumlabel_id |
| idrust_57248textfalse negative unused_mut | ````rust struct SomeStruct { path: std::path::PathBuf, } impl SomeStruct { fn path_exists(&mut self) -> bool { // false negative unused_mut // path.exists() does not need mutable reference: // pub fn exists(&self) -> bool { ... } self.path.exists() } } fn main() { let mut s = Som | labels: A-lintslabelmediumlabel_id |
| |