FileTimes::set_modified does not modify the time, but returns FileTimes | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: https://doc.rust-lang.org/std/fs/struct.FileTimes.html#method.set_modified ```rust  | labels: E-easy, C-enhancement, A-filesystem, D-lack-of-suggestion


[autodiff] compiler error when differentiating functions (like powi) | Follow up of [#wg-autodiff > Simplify autodiff handling of dependencies (rlib) @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/390790-wg-autodiff/topic/Simplify.20autodiff.20handling.20of.20dependencies.20.28rlib.29/near/573014613) for @ZuseZ4 and @sgasho | labels: T-compiler, C-bug, F-autodiff


Better help text for incorrect `macro_rules!` usage | ### Code ```Rust macro_rules!(i_think_the_name_should_go_here) { () => {} } ``` ### Current output ```Shell error: macros that expand to items must be delimited with braces or followed by a semicolon --> src/lib.rs:1:13 | 1 | macro_rules!(i_think_the_name_shou | labels: A-diagnostics, A-macros, T-compiler


Misleading comments over methods on `TyCtxtEnsure` in `rustc_middle::mir::interpret::queries` | > These comments (also the one below) are wrong now -- they talk about the return value of a function that doesn't return anything! I have no idea what is going on here so if someone could make a PR to update the comments, that would be much appreciated. :) _O | labels: A-docs, C-bug, A-contributor-roadblock, A-query-system


Cleanup: go through `bootstrap.py` and make sure we specify explicit `open()` encodings | > Remark: we should go through `bootstrap.py` and make sure we specific explicit `open()` encodings, as far as I am aware there is a reasonable desire to want to make a future change in Python 3.* where `open()` defaults to UTF-8 encoding, which could break `o | labels: C-cleanup, T-bootstrap, A-Python


Rust 1.90 causes Wasm crash by out of memory | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> After updating to Rust 1.90.0, Wasm becomes to be crashed by out of memory. The reproduce senquence is | labels: I-crash, regression-from-stable-to-nightly, O-wasm, C-bug, C-external-bug


RISC-V Extension Changes coming to LLVM 22 | In LLVM 22.x, we intend to simplify how the C and Zc* extensions are handled in the LLVM backend, in the change llvm/llvm-project#155035. This should more closely align with how these instructions are specified in the RISC-V specification. In clang, we are rel | labels: A-LLVM, T-compiler, O-riscv


Tracking Issue for `rwlock_downgrade` | <!-- Thank you for creating a tracking issue! Tracking issues are for tracking a feature from implementation to stabilization. Make sure to include the relevant RFC for the feature if it has one. If the new feature is small, it may be fine to skip the RFC proc | labels: T-libs-api, C-tracking-issue


Tracking issue for enabling main rust-analyzer tests in r-l/r CI | ## Summary Currently, we only run a tiny subset of r-a tests (namely `proc-macro-srv`). We would like to make sure r-a is well-tested against Tier 1 platforms, and catch more r-a (and even rustc-induced) regressions, by running the main r-a tests as well. ## S | labels: T-bootstrap, T-infra, C-tracking-issue, A-CI, A-test-infra, T-rust-analyzer


Tracking issue for MCP 923: Run main rust-analyzer tests in rust-lang/rust CI | This is a tracking issue for MCP "Run main rust-analyzer tests in rust-lang/rust CI" (rust-lang/compiler-team#923). > [!NOTE] > Tracking issues are used to record the overall progress of implementation. > They are also used as hubs connecting to other relevant | labels: T-compiler, C-tracking-issue, B-MCP-approved


rustc miscompiled on powerpc64 after LLVM 22 update | ### Code I don't have the ability to reproduce but this comes from a `cargo install cargo-nextest` on PPC64le, building gimli. Happened with this CI run: https://github.com/rust-lang/compiler-builtins/actions/runs/21465837588/job/61827742076?pr=1064 ### Meta V | labels: A-LLVM, I-ICE, regression-from-stable-to-nightly, P-high, T-compiler, O-PowerPC


Tracking Issue for minimal const `ControlFlow` methods (`min_const_control_flow`) | <!-- Thank you for creating a tracking issue! Tracking issues are for tracking a feature from implementation to stabilization. Make sure to include the relevant RFC for the feature if it has one. If the new feature is small, it may be fine to skip the RFC proc | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period, S-tracking-ready-to-stabilize


Lint exported_private_dependencies misses public dependency via trait impl | Tracking issue: #44663, RFC: rust-lang/rfcs#1977 Cargo.toml: ```toml cargo-features = ["public-dependency"] [package] name = "playground" version = "0.0.0" edition = "2018" [dependencies] num-traits = "0.2" ``` lib.rs: ```rust pub struct S; impl std::ops::Add  | labels: A-lints, A-visibility, T-compiler, C-bug, L-exported_private_dependencies, F-public_private_dependencies


`private_interfaces` not linting RPITIT | ### Code ```Rust trait Bar {} pub trait Foo { fn foo() -> impl Bar; } fn main() {} ``` ### Current output Empty output with no warnings. ### Desired output ```Shell warning: trait `Bar` is more private than the item `Foo::foo` --> foo.rs:4:1 | 4 | fn foo() ->  | labels: A-lints, A-visibility, T-compiler, A-impl-trait, C-bug, L-private_interfaces


SIGSEGV during stage1 compilation of `proc_macro` for `i686-win7-windows-msvc` | Cross-compiling the stage1 from `x86_64-unknown-linux-gnu` to `i686-win7-windows-msvc` now seems to crash during the compilation of `proc_macro`: ``` Building stage1 library artifacts (stage1:x86_64-unknown-linux-gnu -> stage1:i686-win7-windows-msvc) Compiling | labels: I-crash, A-LLVM, T-compiler, C-bug, A-proc-macros, llvm-fixed-upstream


Reuse LTO products for incremental builds when deps are unchanged | Incremental builds with LTO (`thin` or `fat`) always take the same amount of time (~10s on [my project](https://github.com/fenollp/reMarkable-tools/tree/730e3fc2c100a713abdeebeb434a9d86aa2a48cc/marauder)) when dependencies are unchanged. It seems to take as lo | labels: A-linkage, C-enhancement, I-compiletime, T-compiler


Cryptic LTO-related error message when performing `include_bytes!` on large files | When trying to include a large (> 500MiB) binary in a program, the compiler crashes with an error message relating to LTO (Link time optimization?) I tried this code: ```rust fn main() { // the file below was generated with // $ dd if=/dev/urandom of=output.da | labels: A-codegen, A-diagnostics, T-compiler, C-bug


regression: name resolution fails to find constant? | I'm not sure if this is our fault or something in the underlying library... ``` [INFO] [stdout] error[E0425]: cannot find value `TEST_MODULE_ID` in this scope [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/abstract-t | labels: A-resolve, T-compiler, regression-from-stable-to-beta, P-critical


ICE: `DefId(..)): reachable Public > nominal Restricted(DefId(..)` | <!-- ICE: Rustc ./a.rs '' 'error: internal compiler error: compiler/rustc_middle/src/middle/privacy.rs:187:21: DefId(0:6 ~ a[1af1]::{use#1}): reachable Public > nominal Restricted(DefId(0:0 ~ a[1af1]))', 'error: internal compiler error: compiler/rustc | labels: I-ICE, A-visibility, T-compiler, C-bug, S-has-mcve, requires-debug-assertions


Regression on nightly: unused pub(crate) use::*; is not actually unused | I encountered this while trying to [bump Rust from `nightly-2026-01-09` to `nightly-2026-02-01`](https://github.com/pola-rs/polars/pull/26379) in Polars. The [CI complains](https://github.com/pola-rs/polars/actions/runs/21599607867/job/62241657031?pr=26379): ` | labels: T-compiler, C-bug, I-prioritize, L-unused_imports


Regression in 1.93.0 `the type <XYZ as Archive>::Archived has an unknown layout` | ### Code I tried the following in a new cargo project. This is minimized from a real codebase. ```toml [package] name = "broken-nightly" version = "0.1.0" edition = "2024" [dependencies] cynic-codegen = { version = "3.12.0", features = [ "rkyv" ] } [profile.de | labels: A-trait-system, A-associated-items, P-high, T-compiler, regression-from-stable-to-stable, C-bug


Bootstrap Script Error on Windows | I have tried this code on the main branch.: ```rust python x.py build --stage 1 ``` I expected to see this happen: Successful execution. Instead, this happened: Exception occurred. ### Environment ``` Windows 11 Chinese Edition ``` I think this is an encoding  | labels: T-bootstrap, C-bug, A-Python


Uninformative error message when casting usize to pointer to generic `?Sized` type | Trying to compile this code ```rust pub fn bogus_ptr<U: ?Sized>() -> *const U { 0usize as *const U } ``` produces this error message ``` error[E0606]: casting `usize` as `*const U` is invalid --> <source>:2:5 | 2 | 0usize as *const U | ^^^^^^^^^^^^^^^^^^ ``` I | labels: C-enhancement, A-diagnostics, T-compiler, D-papercut, D-terse


Rustdoc syntax highlighting of `ident !=` is displayed as a macro invocation `ident!` | # Code ```rs if layout != Layout::new::<U>() { return Err(new_value); } ``` [Click here to view this live](https://docs.rs/tokio-util/0.7.18/src/tokio_util/sync/reusable_box.rs.html#106) # Expected Outcome The `layout !=` part is displayed in black. # Actual O | labels: T-rustdoc, C-bug, A-rustdoc-ui


"Size::sub: 0 - 8 would result in negative size" ICE on sparc | <!-- 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-SPARC, C-bug, A-ABI


ICE in sparc64 `fn_abi_of_instance` | I tried the following code: ```rust #[repr(transparent)] #[derive(Default)] struct Wrapper2<T>((), T); type T = (i8, i16, f32); extern "C" fn test(x: Wrapper2<T>) {} fn main() { test(Default::default()); } ``` Building this for the sparc64-unknown-linux-gnu ta | labels: I-ICE, T-compiler, O-SPARC, C-bug, A-ABI


sparc64 has incorrect ABI for struct containing f64 and f32 | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> **I tried this code**: ```rust // with --target=sparc64-unknown-linux-gnu #[repr(C)] pub struct Double | labels: P-medium, T-compiler, I-unsound, O-SPARC, C-bug, A-ABI


error message for inherent `impl` on `type` that is external could be more explanatory | ### Code ```Rust use std::rc::Rc; pub struct Foo; pub type Function = Rc<Foo>; impl Function { } ``` ### Current output ```Shell error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined --> src/lib.rs:6:1 | 6 | impl | labels: A-diagnostics, T-compiler, D-terse


Error message improvement: Manual reborrowing with `&mut *variable` | In this testcase, I wanted to reborrow `outer`, but accidentally wrote `&mut outer` instead of `&mut *outer`. However, the error's suggestion was ```try removing `&mut` here``` which wouldn't have worked. It would be better to have the suggestion ```try adding | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-papercut, D-newcomer-roadblock, D-invalid-suggestion


Tracking Issue for assert_matches | <!-- Thank you for creating a tracking issue! Tracking issues are for tracking a feature from implementation to stabilization. Make sure to include the relevant RFC for the feature if it has one. If the new feature is small, it may be fine to skip the RFC proc | labels: T-libs-api, C-tracking-issue


Tracking issue for MCP 918: Promote tvOS/watchOS/visionOS to Tier 2 | This is a tracking issue for MCP "Promote tvOS/watchOS/visionOS to Tier 2" (rust-lang/compiler-team#918). > [!NOTE] > Tracking issues are used to record the overall progress of implementation. > They are also used as hubs connecting to other relevant issues, e | labels: T-compiler, C-tracking-issue, S-tracking-unimplemented, O-apple, B-MCP-approved


Unable to build `core` for `powerpc64-ibm-aix` | `cargo +nightly check --target powerpc64-ibm-aix -Zbuild-std=core` (checking the libc crate but that shouldn't matter) is now printing a number of errors like: ```text error: branch target not a multiple of four (242) error: branch target not a multiple of fou | labels: A-LLVM, regression-from-stable-to-nightly, T-compiler, O-PowerPC, WG-llvm, I-prioritize


LLVM crash in vectorizer when compiling GameCube emulators | code: https://codeberg.org/hazelwiss/solstice/src/commit/34059d531fb8675c6a5b8dc5990ff748c8063ebc ``` error: rustc interrupted by SIGSEGV, printing backtrace /home/nora/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/librustc_driver-1c4195dec9454671.so | labels: I-crash, A-LLVM, regression-from-stable-to-nightly, P-high, C-bug, S-has-mcve


"Out of memory" error when accessing files from wasm32-wasip2 in rust 1.93.0 | <!-- Title: wasm32-wasip2: fd_close missing from compiled component in 1.93.0, causing file descriptor leak --> Rust 1.93.0 stable produces `wasm32-wasip2` components that are missing the `fd_close` import from `wasi_snapshot_preview1`. File descriptors are ne | labels: regression-from-stable-to-stable, C-bug, P-critical, T-libs, O-wasi, O-wasip2


std::fs::create_dir_all will stack overflow with big paths | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust std::fs::create_dir_all(big_path); ``` I expected to see this happen: doesn | labels: C-bug, T-libs, A-io


Semantically equal `Ordering` matches generate different assembly | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> https://rust.godbolt.org/z/orxr8sffq I tried this code: ```rust use std::cmp::Ordering; pub fn a(x: i3 | labels: I-slow, C-bug


[ICE]: calling a `Fn` incorrectly in `core` ICEs when making the type error diagnostic | <!-- 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, C-bug


Types inside higher-ranked binders sometimes aren't checked for WF. | The following code errors ```rust trait Trait: 'static {} fn wut() where for<'a> dyn Trait + 'a + Send:, { } fn main() { wut(); } ``` ``` error: higher-ranked lifetime error --> src/main.rs:10:5 | 10 | wut(); | ^^^^^ | = note: could not prove `for<'a> (dyn Tra | labels: A-type-system, I-ICE, A-trait-system, T-compiler, C-bug, T-types


[ICE]: `!worker_thread.is_null()` | <!-- 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, C-bug, A-parallel-compiler, I-cycle


Incorrect "implementation of `Send` is not general enough" error around AsyncFn | Here is an API that accepts an async function whose future is `Send`, e.g. as a registration mechanism for RPC handlers: ```rust /// Accept an async function that repeatedly processes an incoming reference to /// `i32`, with a future type that can be polled on | labels: C-bug


rustc 1.93.0 SIGSEGVs or ICEs during `cargo test` | I encountered repeated segmentation faults (SIGSEGV) when attempting to build my Rust project using Rust 1.93.0 with the stable-x86_64-unknown-linux-gnu toolchain. The issue persists even after completely cleaning the project and performing a fresh reinstall o | labels: I-ICE, T-compiler, C-bug


ICE: rustc_query_system: dep_graph: assertion failed (dep node index out of range) | No idea how it came into existence, but people in rust discord said it's better to submit the bug. The code can be found [here](https://github.com/olekspickle/bevy_new_third_person), but I only stumbled on it once so it is not reproducible at least for me. Ver | labels: I-ICE, T-compiler, A-incr-comp, C-bug, requires-nightly, A-parallel-compiler


A dep graph node (mir_drops_elaborated_and_const_checked) does not have an unique index | The error has been occurring sporadically for like a week or two with recent nightly versions. Unfortunately I don't have more details, please let me know if I can help somehow. ### Error output ``` thread 'rustc' panicked at /rustc/3e674b06b5c74adea662bd0b0b0 | labels: I-ICE, T-compiler, A-incr-comp, C-bug, A-parallel-compiler, A-query-system


Out of date information about Rvalue::Aggregate | ### Location rustc_middle::mir::Rvalue::Aggregate ### Summary Following #107267, the statement "Disallowed after deaggregation ..." is not valid anymore. | labels: A-docs, A-contributor-roadblock


implicit Deref coercion not happening | ```rust use std::path::{Path,PathBuf}; #[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)] pub(crate) struct PathBasedToolchain(PathBuf); impl TryFrom<&Path> for PathBasedToolchain { type Error = anyhow::Error; fn try_from(value: &Path) -> std::result::Res | labels: E-easy, A-docs, C-discussion


ICE: `unhandled node ConstArg(ConstArg ` | <!-- ICE: Rustc ./a.rs '-Zcrate-attr=feature(generic_const_exprs) -Zcrate-attr=feature(min_generic_const_args) -ooutputfile -Zdump-mir-dir=dir' 'error: internal compiler error: compiler/rustc_hir_analysis/src/collect/generics_of.rs:226:14: unhandled n | labels: I-ICE, E-needs-test, T-compiler, C-bug, F-generic_const_exprs, S-has-mcve


ICE: `bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32` | <!-- ICE: Rustc ./a.rs '' 'thread 'rustc' panicked at compiler/rustc_span/src/lib.rs:2151:17: 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32'', 'thread 'rustc' panicked at compiler/rustc_span/src/lib.rs:2151:17: 'assertion fai | labels: I-ICE, T-compiler, C-bug, S-bug-has-test


`IntoFuture` allows contradictory associated type equality bounds | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust use std::future::{IntoFuture, Ready}; async fn test<T>(t: T) -> u32 where T | labels: C-discussion, A-impossible-bounds


ICE: `thir_body queried for type_const` (via cfg_attr) | I found this with the following code: ```rust #![allow(incomplete_features)] #![feature(min_generic_const_args)] pub trait Foo { #[cfg_attr(feature = "some_feature", type_const)] const N: usize; } impl Foo for u32 { #[cfg_attr(feature = "some_feature", type_co | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions, F-min_generic_const_args


Function pointer does not fulfill the required lifetime | Function pointers have no lifetime of their own, and essentially are `'static` ([Unsafe Code Guidelines Reference](https://rust-lang.github.io/unsafe-code-guidelines/layout/function-pointers.html)), so I would expect `fn(T) -> U: 'a` to hold for any lifetime ` | labels: A-lifetimes, C-bug, T-types


[bug] When I Use tauri-plugin-http and reqwest either, I got a panic | <!-- 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, P-medium, T-compiler, regression-from-stable-to-stable, C-bug, A-coercions


ICE Unsize coercion, but `Box<{async block@file.rs}>` isn't coercible to `Box<dyn Send>` | <!-- 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, E-mentor, T-compiler, E-medium, C-bug, S-has-mcve


[ICE]: !tcx.next_trait_solver_globally() | <!-- ICE: Rustc ./2969A4590773DF5416935FBB7FE10D4070C5F412CB47CD0E21F34E735F4A479B.rs '--edition=2024 -Znext-solver=globally -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' ($TID) panicked at compiler/rustc_hir_analysis/src/collect/type_of/opaque.rs: | labels: I-ICE, T-compiler, C-bug, WG-trait-system-refactor


normalize_lexically should mention other functions that do basic normalization | ### Location https://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.normalize_lexically ### Summary both the PartialEq impl for Path and Path::components will normalize away non-leading `.` and duplicate/trailing slashes. This is "good enough" for  | labels: A-docs, T-libs


[ICE]: !self.tcx.next_trait_solver_globally() | <!-- 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, C-bug, F-type_alias_impl_trait, WG-trait-system-refactor


std::pointer::Nonnull should guarantee ABI compatibility for non-null pointer values | Can we rely on `NonNull<T>` having the same representation as `*mut T` for all non-null values of that type? In particular, can we rely on e.g. `NonNull<std::ffi::c_void>` being ABI compatible with C `void*` for non-null pointers? It seems pretty likely that t | labels: T-libs-api, A-raw-pointers, C-discussion, T-opsem


Lint regression: `dead_code` ignores `#[allow(dead_code)]` on traits | ### Code ```rust #[allow(dead_code)] trait Foo { const FOO: u32; } impl Foo for u32 { const FOO: u32 = roundtrip(0); } const fn roundtrip(x: u32) -> u32 { x } ``` https://play.rust-lang.org/?version=nightly&mode=debug&edition=2024&gist=1991c4121122ea00f92d7386 | labels: A-diagnostics, P-low, T-compiler, regression-from-stable-to-stable, L-false-positive, I-lang-radar


stable compiler should provide better advice for `Step` trait failures | ### Code ```Rust fn custom_range() { struct Foo(u32); let x = Foo(0); let y = Foo(10); for value in x..y {} } ``` ### Current output ```Shell error[E0277]: the trait bound `Foo: Step` is not satisfied --> src/lib.rs:7:18 | 7 | for value in x..y {} | ^^^^ unsat | labels: A-diagnostics, T-compiler


Unclear compiler error when `impl Trait` return value captures non-'static argument | (cc @estebank) I tried this code (the explicit `'static` lifetime is unnecessary but emphasizes the implicit `'static` requirement of `impl Trait`): ```rust fn foo<T>(a: T) -> impl Iterator<Item = String> + 'static where T: std::fmt::Display { std::iter::once( | labels: A-diagnostics, A-lifetimes, T-compiler, A-impl-trait, C-bug, D-papercut


`-Clinker-plugin-lto` is required for inlining stdlib with LTO | ## Experiment setup Considering the following code: ```rust #![no_main] extern "C" { fn ftn() -> u32; } #[unsafe(export_name = "_start")] fn _start() -> f64 { let f77 = unsafe { ftn() } as f64; f64::cbrt(f77) } ``` The code is incorrect but quite good for demo | labels: A-linkage, T-compiler, C-bug, A-LTO


Issue | <!-- Thank you for creating a tracking issue! Tracking issues are for tracking a feature from implementation to stabilization. Make sure to include the relevant RFC for the feature if it has one. If the new feature is small, it may be fine to skip the RFC proc


Missed optimization: introducing a temporary ownership move of `Vec` changes optimized code generation in `main`. | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: https://godbolt.org/z/Ts7ss7zj4 ```rust #[no_mangle] fn grow(v: &mut Vec<isize>) {  | labels: C-optimization


Tracking Issue for reflection | This is a tracking issue for an un-RFC-ed language feature experiment The feature gate for the issue is `#![feature(reflection)]`. ### About tracking issues Tracking issues are used to record the overall progress of implementation. They are also used as hubs c | labels: T-lang, T-compiler, C-tracking-issue, S-tracking-unimplemented, B-experimental


ICE: `None.unwrap()` in `tokenstream.rs` during `resolver_for_lowering_raw` | This bug was found with a fuzzer ([tree-splicer](https://github.com/langston-barrett/tree-splicer)). Reduced with [treereduce](https://github.com/langston-barrett/treereduce), then hand-reduced. [playground](https://play.rust-lang.org/?version=nightly&mode=deb | labels: I-ICE, A-parser, A-macros, T-compiler, C-bug


False postive: warning of unnecessary `unsafe` block | ### Code I tried this code: ```rust fn main() { let a = unsafe { core::arch::x86_64::__cpuid_count(0, 0) }; dbg!(a); } ``` I expected to see this happen: it compiles without warnings. Instead, this happened: it compiles with a warning of unnecessary `unsafe` b | labels: T-lang, T-libs-api, C-discussion, S-has-bisection


Array Repeat operator should not use a loop for small sizes | This likely caused poor assembly for `Simd::splat` in some circumstances: https://rust-lang.zulipchat.com/#narrow/stream/257879-project-portable-simd/topic/Very.20bad.20.60u16x8.3A.3Asplat.60.20codegen.20on.20x86_64 I opened a PR for a workaround: https://gith | labels: A-LLVM, I-slow, A-codegen, E-needs-test, T-compiler, A-SIMD


multiline cfg_attr in a doctest outputs a corrupted snippet | With following doctest, where the cfg attribute spans multiple lines, the final program is invalid: the wrapping `main` method doesn't take into account the dangling `stdsimd))]` line that closes the attribute. ```rust /// ```rust /// # #![cfg_attr(not(dox), f | labels: T-rustdoc, A-doctests


ICE: Failed to extract DefId: opt_local_def_id_to_hir_id | ### Code Can be reproduced by first building (in debug mode) `crates/yaboc-hir` of https://github.com/8051enthusiast/yabo at commit `442536c09df2fe898bfeda81a2788bf9dce9dc19` after a `cargo clean` and then building at commit `5d5d795041d55d3bcbe21c5052807711dd | labels: I-ICE, T-compiler, A-incr-comp, C-bug, S-has-mcve


[ICE]: `arg len already exists` | <!-- ICE: Rustc ./a.rs '' 'thread 'rustc' ($TID) panicked at compiler/rustc_errors/src/diagnostic.rs:359:9: 'arg len already exists'', 'thread 'rustc' ($TID) panicked at compiler/rustc_errors/src/diagnostic.rs:359:9: 'arg len already exists'' File: /t | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions


Method `SourceFile::normalized_byte_pos` is broken | I have been looking through the source of `rustc_span` and stumbled upon an inconsistent usage of byte positions. The problematic code is from [SourceFile::normalized_byte_pos](https://github.com/rust-lang/rust/blob/646a3f8c15baefb98dc6e0c1c1ba3356db702d2a/com | labels: T-compiler, C-bug


ICE due to RBV not handling RTN where trait is behind trait alias | Context: It's HIR ty lowering's job to resolve+lower RTN. However, it needs the lifetime resolutions from RBV which runs before HIR ty lowering and which (unfortunately) sort of duplicates some of HIR ty lowering code to resolve RTN itself. Now, while HIR ty l | labels: A-lifetimes, I-ICE, T-compiler, C-bug, F-trait_alias, S-has-mcve


ICEs (in debug mode) due to RBV not expanding trait aliases when collecting bound vars from supertrait bounds | 1st reproducer: ```rs #![feature(trait_alias)] trait A<'a> { type X; } trait B: for<'a> A<'a> {} trait C = B; fn f<T>() where T: C<X: Copy> {} ``` Compiler panic message w/o backtrace: ``` thread 'rustc' (47550) panicked at compiler/rustc_type_ir/src/binder.rs | labels: I-ICE, T-compiler, C-bug, F-trait_alias, S-has-mcve, T-types


Add mention that `ilog2` and `checked_ilog2` can be used to get the number of bits in an integer | ### Location - [`{integer}::ilog2`](https://doc.rust-lang.org/nightly/core/primitive.i32.html#method.ilog2) - [`{integer}::checked_ilog2`](https://doc.rust-lang.org/nightly/core/primitive.i32.html#method.checked_ilog2) - [`NonZero::ilog2`](https://doc.rust-lan | labels: A-docs, T-libs


regression: parameter may not live long enough | ``` [INFO] [stdout] error[E0310]: the parameter type `T` may not live long enough [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/cogo-0.1.2/src/yield_now.rs:35:13 [INFO] [stdout] | [INFO] [stdout] 35 | let r = resour | labels: regression-from-stable-to-beta, I-prioritize


Sub-optimal codegen: Unnecessarily dumping AVX registers to stack | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code ([example 1](https://rust.godbolt.org/z/86FfSi)), in which we have a public function | labels: I-slow, C-enhancement, A-codegen, T-compiler, A-SIMD, C-optimization


`unused_mut` false positive due to borrow-checking error | ### Code ```Rust struct Thing; impl Drop for Thing { fn drop(&mut self) {} } fn main() { let mut t; let mut b = None; loop { t = Thing; b.insert(&t); } } ``` ### Current output ```Shell warning: variable does not need to be mutable --> src/main.rs:7:9 | 7 | le | labels: A-lints, A-diagnostics, A-destructors, A-borrow-checker, T-compiler, L-unused_mut


Conflict markers with nonstandard lengths are not recognized as such | ### Code ```Rust <<<<<<<< ======== >>>>>>>> fn main() {} ``` ### Current output ```Shell error: expected identifier, found `<<` --> test.rs:1:1 | 1 | <<<<<<<< | ^^ expected identifier error: aborting due to 1 previous error ``` ### Desired output ```Shell erro | labels: A-diagnostics, T-compiler


GVN misunderstands aliasing, can create overlapping assignments (again) | This looks very similar to https://github.com/rust-lang/rust/issues/141038, but the compiler that found this has the patch that was linked to that issue. Reduced example from rustlantis, which is accepted by Miri without optimizations enabled: ```rust #![featu | labels: P-high, T-compiler, I-unsound, C-bug, A-mir-opt, I-miscompile


`*x == *y` for trait objects produce move error, so it is not equivalent to `PartialEq::eq(&*x, &*y)` even though the reference says it is | [The following code produces a move error](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=45b377544d27adffcaa1f0b38cbe22e0): ```rust trait Animal { fn noise(&self) -> String; } impl PartialEq for dyn Animal { fn eq(&self, other: &Self | labels: A-diagnostics, A-borrow-checker, T-compiler, A-docs, C-bug, A-dyn-trait


`#[expect(redundant_lifetimes)]` doesn't work when `#[derive(Debug)]` is present | Consider the following code: ```rust #![deny(redundant_lifetimes)] use std::fmt::Debug; #[derive(Debug)] pub struct RefWrapper<'a, T> where 'a: 'static, T: Debug, { pub t_ref: &'a T } ``` As expected, the compiler throws an error because the `'a` lifetime is r | labels: T-lang, C-bug, I-lang-radar


Tracking Issue for `atomic_try_update` | Feature gate: `#![feature(atomic_try_update)]` This is a tracking issue for an infallible version of `AtomicT::fetch_update` as well as a new name for the existing fallible version. When and if this gets stabilized, the existing `fetch_update` should be marked | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period


Linker-plugin-based LTO with -flto in clang not working | The original issue title was "Implement cross-language ThinLTO," #49879 but when it was stabilized, the PR title became "Stabilize linker-plugin based LTO (aka cross-language LTO)," #58057 which seems to imply that fullLTO is available. The Rustc book states,  | labels: A-LLVM, T-compiler, C-bug


LLDB testing should be disabled | Per @khyperia in https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/debuginfo.20tests.20broken.20locally/with/571307617 these tests don't run in CI. On a contributor's machine they can easily fail to pass, for reasons I am not going | labels: A-testsuite, A-debuginfo, T-compiler, C-bug


Tracking Issue for `cold_path` | Feature gate: `#![feature(cold_path)]` This is a tracking issue for `core::hint::{cold_path}`. Please also see the meta discussion at https://github.com/rust-lang/rust/issues/26179. `#![feature(likely_unlikely)]` was split to a new tracking issue: https://gith | labels: T-lang, T-libs-api, C-tracking-issue


Meta tracking issue for branch hints (RFC 1131) | Tracking and meta discussion for branch and path hinting, including: - `likely`/`unlikely` as accepted in rust-lang/rfcs#1131 (much has changed since this RFC) - `core::hint::{likely, unlikely}` https://github.com/rust-lang/rust/issues/151619 - `core::hint::co | labels: metabug, B-RFC-approved, T-lang, B-unstable, E-help-wanted, C-tracking-issue


`hir::Body`'s documentation incorrectly suggests it doesn't contain parmaeter info for closures | ### Location https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/hir/struct.Body.html ### Summary Noticed this in rust-lang/rust-clippy#12981. The documentation says "a function" which I assume was meant to imply both a function/method call and closure w | labels: T-compiler, A-docs


Local `rustc-docs` could make use of local pages for `std` types | Posting this for @blyxyas and big thanks for having spotted this issue real quick :) ### Location (URL) The same problem persists in many different pages, just to pick an example on my machine: `$RUSTUP_HOME/toolchains/nightly-aarch64-apple-darwin/share/doc/ru | labels: T-rustdoc, A-docs


Inconsistent borrow-checking and temporary lifetime behavior with async closures | I've discovered some rather strange behavior involving borrow-checking and/or temporary lifetimes of async closures. Why does it behave this way? In the snippets below, `black_box` calls are done to be really clear that const promotion isn't occurring. The fol | labels: A-borrow-checker, C-bug, A-async-closures


mGCA: Support directly represented negated literals | Follow up of #150618 and #150699. We currently support directly represented literals as a `hir::ConstArgKind::Literal` but we don't support negated literals as such a representation: ```rust #![feature(adt_const_params, min_generic_const_args)] use std::marker | labels: E-easy, E-mentor, T-compiler, A-const-generics, F-adt_const_params, T-types


ICE：expected const for `N/#0` (N/#0/0) but found Type(A<N/#0>) when instantiating args=[A<N/#0>] | <!-- 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, C-bug, F-inherent_associated_types, S-bug-has-test, requires-debug-assertions


ICE: index out of bounds: the len is 0 but the index is 0 | Here is the example code that I found: ```rust #![allow(incomplete_features)] #![feature(min_generic_const_args)] pub struct A; impl A { #[type_const] const LEN: usize = 4; #[allow(unused_braces)] fn arr() -> [u8; const { Self::LEN }] { return [0u8; const { Se | labels: I-ICE, T-compiler, C-bug, S-bug-has-test, F-associated_const_equality, F-min_generic_const_args


ICE: expected region but found Type | <!-- ICE: Rustc ./a.rs '-Zcrate-attr=feature(generic_const_exprs) -Zcrate-attr=feature(min_generic_const_args) -Zcrate-attr=feature(inherent_associated_types) -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' panicked at /rustc/30f168ef811aec63124eac67 | labels: I-ICE, T-compiler, C-bug, F-generic_const_exprs, F-inherent_associated_types, S-bug-has-test


ICE: `expected type for param #0 in [N/#0]` | <!-- 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, C-bug, F-min_generic_const_args


1.94 beta regression: "malformed `doc` attribute input" | The following errors are all the errors found in the 1.94 beta crater run that are related to the `doc` attribute. ## Error 1 ``` [INFO] [stdout] error[E0538]: malformed `doc` attribute input [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/index.crat | labels: A-attributes, P-high, T-lang, T-compiler, regression-from-stable-to-beta, C-bug


mGCA: consolidate type const checks on `tcx.is_type_const` | Under `feature(min_generic_const_args)` const items have been split into two, "const items" and "type const items". Type const items are written with the `#[type_const]` attribute applied to the syntax of a normal const item. In some places in the compiler we  | labels: E-easy, C-cleanup, E-mentor, T-compiler, A-const-generics, T-types


Unexpected result from recursive macro rule | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust macro_rules! text_token { ("{%", $($token: literal,)*) => { println!("Found | labels: A-macros, C-bug, C-discussion, T-rust-analyzer


unmangled symbols are not escaped in naked/global assembly | I tried this code: ```rust unsafe extern "C" { #[link_name = "memset]; mov eax, 1; #"] unsafe fn inject(); } #[unsafe(export_name = "memset]; mov eax, 1; #")] extern "C" fn inject_() {} #[unsafe(naked)] extern "C" fn print_0() -> usize { core::arch::naked_asm! | labels: A-codegen, C-bug


#[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


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


[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


Add conversions from Box<str> and String | Tracking issue for https://github.com/rust-lang/rfcs/pull/1152 | labels: B-RFC-approved


Shadowed variable isn't droped until the end of outer scope | ``` struct Test { n: usize } impl Drop for Test { fn drop(&mut self) { println!("dropping {}", self.n); } } fn main() { println!("Hello, world!"); let a = Test { n: 1}; println!("Hello, world 2.0!"); let a = Test { n: 2}; println!("Hello, world 3.0!"); } ``` produces ``` Hello, w


Add 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


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!("bark") } } fn speak_weak(barker: Weak<RefCell<Barker>>) { let b = barker.upgrade().unw


Chaining 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-lifetimes


Generic 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


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


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-ICE


Unexpected 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!("You entered (String): {:?}", line)


ICE "Type parameter `Bar/TypeSpace.0` (Bar/TypeSpace/0) out of range when substituting (root type=Some(Bar)) substs=Substs[types=[[];[];[]], regions=[[];[];[]]]" | 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!("Hello, world!"); } ``` I'll add the backtrace when I'll have a rust compiler (other than play.rust-lang at least).


fs::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


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


`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


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


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 [assertion


vec![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 @steveklabnik


cfg!(linux) should work | Currently you need cfg!(unix), but we use #[cfg(target_os="linux")]. I haven't tested, but we should make sure #[cfg(target_os="unix")] also works.


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


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


{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


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


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


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.


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


#[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


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-parser


The .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-bug


f32 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-diagnostics


.note.rustc dylib section flagged SHF_ALLOC on Linux (can cause crashes) | Having the metadata note section flagged "alloc" 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


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


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


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


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


`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


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


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


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?


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, which


ICE 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


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.


ICE: "Type parameter out of range when substituting in region 'b " | 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


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-windows


Where-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


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


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


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, relnotes


ICE - 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


rustc 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-ICE


Improve 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 q


Should 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-diagnostics


negate_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-diagnostics


Rustdoc 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-rustdoc


concat_idents! fails "expecting comma" | 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


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


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


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


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:~$ s


ICE compiling "solicit" 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/n


Redundant 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-diagnostics


Generic 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]>`


ICE 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-ICE


libstd: Div is not implemented for Wrapping | Is this intentional or has this been an oversight? | labels: E-easy


Add issue references to each `#[unstable]` | `#[unstable]` now supports the `issue = "NNN"` field, that allows linking it to an issue here, e.g. `#[unstable(feature = "foo", reason = "bar", issue = "1234")]`. We should use it more. The exact arrangement of which library features need issues/how those issues will be laid out


rustdoc: 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-rustdoc


Linking 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 wrong


unresolved 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-test


Rustc 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:


Do 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-system


ICE: 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-test


Document 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.r


`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-api


Rename SliceConcatExt::connect to join | Tracking issue for https://github.com/rust-lang/rfcs/pull/1102 | labels: E-easy, B-RFC-approved


Ensure 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-mentor


DST 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-high


Rename slice::{tail, init} per RFC 1058 | Tracking issue for https://github.com/rust-lang/rfcs/pull/1058 | labels: B-RFC-approved


illegal 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 ```


Unstable 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.


internal 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_variabl


LLVM 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


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 a


Explain 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


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-system


Debug 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-slow


ICE 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


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;


1.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-test


`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


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-checker


Rules 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/


Compile 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 $ ../


Allow 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.


improve 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-macros


ICE 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-ICE


Alias 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-diagnostics


Stable 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-lang


Clarify 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-docs


internal 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: unknown


Excessive 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-diagnostics


Additional 1.2. relnote items | - PR #26416 -- better error information for `std::io::Error`. cc @brson | labels: relnotes


Debug 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()`


Explicit 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


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: "PoisonError { inner:


Misleading error message on use of FnOnce<(T, U), Output=V> | [This stack overflow question](http://stackoverflow.com/questions/31353960/how-to-use-parentheses-for-generics/31354984?noredirect=1#comment50696461_31354984) shows that if one tries to declare a `FnOnce<(T, U), Output=V>` (which should be a `FnOnce(T, U) -> V`), the error messag | labels: A-diagnostics, A-closures


Cannot build rust on OS X 10.11 public beta | ``` ==> ./configure --prefix=/Users/andrewrynhard/develop/homebrew/Cellar/rust/HEAD --disable-rpath --enable-clang --release-channel=nightly configure: configure: note, user-provided CC looks like clang; CC=clang. configure: configure: CFG_USING_CLANG := 1 configure: error: bad C


for loop issue | hi, the following code just just terminates without any error...ideas? if this code is not allowed the compiler needs to create an compile error? ``` fn main() { for i in (10..0) { println!("{}", i); } } ``` playground: http://is.gd/yLCmj2 i know you could use: for i in (0..10).r


only string and byte strings supported in compare_values | When I try to compile my code, the compiler fails with "only string and byte strings supported in compare_values";. My code: ``` rust struct Foo { x: Option<i32>, y: Option<i32> } fn main() { let mut test = Foo {x: Option::None, y: Option::Some(32)}; match test { Foo {x: Some(12) | labels: I-ICE


impl<T> is not introduced in the book | There's only a few references to `impl<` in TRPL: 1. src/doc/trpl/deref-coercions.md 2. src/doc/trpl/lifetimes.md 3. src/doc/trpl/unsized-types.md None of these really mention that you use `impl<T>` to declare a typename that will participate in either the trait or item involved


quasi-quoting a block expression doesn't work | `quote_expr!(self.cx, { $result_name = Some($expr); break $loop_label; })` failed with `error: expected one of`.`,`;`,`}`, or an operator, found`'__hoare_2``(`__hoare_2`is the expected value of`$loop_label`). This failed in expansion so I couldn't get an expanded AST to find out  | labels: A-syntaxext, P-low, C-bug


404 for rustdoc [src] links for files with absolute paths | When the path to a source file as known to the compiler is absolute (which can happen with `#[path = "/…"] mod foo;` or `include!`), rustdoc fails to include the source of these files in its output. For example, the [src] link on http://doc.servo.org/script/dom/bindings/codegen/B | labels: T-rustdoc


Wrong code with assignment in match body | ``` rust fn main() { let mut c = (1, "".to_owned()); match c { c2 => { c.0 = 2; assert_eq!(c2.0, 1); } } } ``` ``` thread '<main>' panicked at 'assertion failed: `(left == right)` (left: `2`, right: `1`)', <anon>:4 playpen: application terminated with error code 101 ``` | labels: A-codegen


ICE:  'assertion failed: index < LLVMCountParams(llfn)', ../src/librustc_llvm/lib.rs:2250 | The compiler panics when trying to compile this code: ``` pub struct Foo { x: isize, y: isize } impl Foo { pub extern fn foo_new() -> Foo { Foo { x: 21, y: 33 } } } ``` This is with ``` rustc 1.3.0-nightly (67256dff6 2015-07-09) binary: rustc commit-hash: 67256dff6dd7526f0be9da50 | labels: I-ICE


Pattern guards should run at most once | ``` rust use std::cell::Cell; fn main() { let i : Cell<i32> = Cell::new(0); match 1 { 1 | _ if { i.set(i.get() + 1); false } => {} _ => {} } assert_eq!(i.get(), 1); } ``` ``` thread '<main>' panicked at 'assertion failed: `(left == right)` (left: `2`, right: `1`)', <anon>:9 playp


ICE when using macro as for loop parameter | ``` macro_rules! foo { () => () } pub fn main () { for foo!() in (1..) { } } ``` error: ``` 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/mas | labels: I-ICE, A-macros


Missing "unreachable pattern" error with range | ``` rust fn main() { match 'a' { 'a' => {} 'b' => {} 'a'...'b' => {} _ => {} } } ``` Currently compiles, but the `'a'...'b'` pattern is clearly unreachable. | labels: A-type-system, P-low


wrong error when using a unit struct as length of a repeat expression | ``` rust struct A { i: i32}; let a = [0; A{i: 42}]; ``` yields the expected ``` error: expected positive integer for repeat count, found struct [E0306] ``` while ``` rust struct B; let b = [0; B]; ``` thinks that `B` is a variable ``` error: expected constant integer for repeat c | labels: E-easy, A-diagnostics


Ownership error masks missing implementation of trait | I would expect the main function to not compile because clone() has not been implemented for struct Test. However this error is masked by: `src/main.rs:26:2: 26:7 error: cannot borrow`tests`as mutable because it is also borrowed as immutable` The error here is the missing impleme


Buildbot Request: Add one `--enable-debug --enable-optimize` bot that at least bootstraps (no tests) | Spawned off of #26484 Just as it is important to developers that we try to avoid injecting test regressions (and thus we have bors check that the regression test suite passes before every commit to master), it is also important to developers that the debug-enabled build of `rustc


Rustdoc error output is unnecessarily verbose when encountering unknown file | What `rustc` displays when encountering an unknown file: ``` /tmp $ rustc filename-that-does-not-correspond-to-a-file error: couldn't read "filename-that-does-not-correspond-to-a-file": No such file or directory (os error 2) ``` ...and what `rustdoc` displays: ``` /tmp $ rustdoc  | labels: T-rustdoc


Wrong code with assignment in match body, part 2 | ``` rust fn main() { let mut c = (1, (1, "".to_owned())); match c { c2 => { (c.1).0 = 2; assert_eq!((c2.1).0, 1); } } } ``` ``` thread '<main>' panicked at 'assertion failed: `(left == right)` (left: `2`, right: `1`)', <anon>:4 ``` CC @dotdash .


lang-item-public.rs run-pass test fails | When configured with `./configure --enable-rpath --disable-clang --disable-libcpp --enable-llvm-assertions --release-channel=dev --enable-debug --enable-optimize` on linux, running tests will fail with ``` ---- [run-pass] run-pass/lang-item-public.rs stdout ---- error: compilatio | labels: A-testsuite


Wrong size passed to free in issue-26709.rs run-pass test (yielding jemalloc assert fail) | After `./configure --enable-rpath --disable-clang --disable-libcpp --enable-llvm-assertions --release-channel=dev --enable-debug --enable-optimize` on linux, running tests will fail with: ``` ---- [run-pass] run-pass/issue-26709.rs stdout ---- error: test run failed! status: sign | labels: I-crash, A-testsuite, T-compiler


catch_panic claims that it returns Ok(()) | This appears to be false from reading the source; it looks like it actually returns the value of the closure if no panic occurs.


Rust does not allow narrowing the mutable references | Currently rust does allow to narrow the immutable references as long as the don't appear in contravariant position: ``` rust // This compiles struct Foo1<'a> { a: &'a Fn(&'static str) -> u32 } fn foo1<'a : 'b, 'b>(foo: Foo1<'a>) -> Foo1<'b> { foo } // This, correctly, does not co | labels: A-type-system, A-lifetimes


Missing shadowing diagnostic with "@" in pattern-match | ``` rust fn main() { match Some(1) { None @ _ => { } }; //let None = 1; } ``` ``` <anon>:2:19: 2:27 warning: unused variable: `None`, #[warn(unused_variables)] on by default <anon>:2 match Some(1) { None @ _ => { } }; ^~~~~~~~ ``` This is accepted, but probably shouldn't be. (A n | labels: A-lints


TRPL markup [^moving] rendered as superscript | The source markup for https://doc.rust-lang.org/book/the-stack-and-the-heap.html#the-heap contains: ``` md In this case, however, it doesn’t.[^moving] When the function is over, … [^moving]: We can make the memory live longer by transferring … ``` It’s rendered as: ``` html In th | labels: T-rustdoc


Calling a static trait method on a type doesn't mark it as used. | ``` rust enum Empty {} struct Unit; trait Run { fn run() -> u8; } impl Run for Empty { fn run() -> u8 { 0 } } impl Run for Unit { fn run() -> u8 { 1 } } fn main() { println!("{} {}", Empty::run(), Unit::run()); } ``` ``` $ rustc -V rustc 1.3.0-nightly (6d71ce536 2015-07-06) $ rus


Bad span for labeled loops | Rustc's parser does not include a loop's label in its span. So the span associated to the expression ``` rust 'somelabel: loop { whatev(); } ``` will contain only ``` rust loop { whatev(); } ``` cc @nrc | labels: E-easy, A-parser


Linkage regression in servo with 1.2 | See https://github.com/servo/servo/pull/6591#issuecomment-121256880 After some tweaks to how rustc drives the linker Servo no longer links. We should decide whether this is intentional and acceptable. | labels: regression-from-stable-to-nightly, T-compiler, relnotes


Can't define a trait with an associated type and function of the same name | This doesn't work: ``` rust trait Foo { type Bar; fn Bar(); } ``` The error you get: ``` trait_type_method_same_name.rs:3:5: 3:14 error: duplicate definition of type or module `Bar` trait_type_method_same_name.rs:3 fn Bar(); ^~~~~~~~~ trait_type_method_same_name.rs:2:5: 2:14 note | labels: A-trait-system, A-associated-items


Rust Book "Mutability" section is unclear | The explanations in src/doc/trpl/mutability.md are unclear, especially compared to the rest of TRPL, which is generally pretty great. > When a binding is mutable, it means you’re allowed to change what the binding points to. So in the above example, it’s not so much that the valu


Documentation of collections::string::String and std::string::String is off. | I noted that the documentation for `collections::string::String` and `std::string::String` is a little off. In _the_ IRC channel was said that this could be a serialization bug, so I'm reporting this here now. The differences are that in `collections::string::String` there are li | labels: T-rustdoc


running "make -j8 rustc-stage1 && make check-stage1" yields lldb error in debuginfo tests | When I run make -j8 rustc-stage1 && make check-stage1, I'm having problems during the check phase, as the lldb-debuginfo tests fail. I'm running OSX Mavericks (10.9.5), python 2.7.10 (also tried 2.7.5). The errors all look approximately like the following: ---- [debuginfo-lldb] d | labels: O-macos


Primitive binops are translated wrong when the LHS is mutated | ## STR ``` Rust fn main() { let x = Box::new(0); println!("{}", *x + { drop(x); let _ = Box::new(main); 0 }); } ``` ## Expected Results If this code compiles, it should print `0`. ## Actual Results Garbage is printed (the address of `main`, in fact). | labels: E-needs-test, P-medium, T-compiler, C-bug


Have rustc report --disable-elf-tls option | Per https://bugzilla.mozilla.org/show_bug.cgi?id=1181441#c4 we have the `--disable-elf-tls` option to support MacOS X 10.6. This requires a custom build, and therefore users need a way to detect whether a given build has that customization. For Firefox I wrote a configure feature | labels: A-frontend


Some example code not showing in rustdoc | Following #rust conversation with kimundi (just now from about 11:18pm +01:00), I found a [useful example](https://doc.rust-lang.org/stable/src/core/result.rs.html#883-890) in the source, ``` rust /// Takes each element in the `Iterator`: if it is an `Err`, no further /// element


Test makes reference to file that doesn't exist | https://github.com/rust-lang/rust/blob/e4e93196e16030ebf7a20c473849534235d676f8/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs#L12-L13 I don't think gdb-pretty-struct-and-enums.rs is still around


repr(packed) allows invalid unaligned loads | This is now a tracking issue for [RFC 1240](https://github.com/rust-lang/rfcs/blob/master/text/1240-repr-packed-unsafe-ref.md), "Taking a reference into a struct marked `repr(packed)` should become `unsafe`", but originally it was a bug report that led to the development of that  | labels: I-crash, P-medium, E-mentor, B-RFC-approved, T-lang, T-compiler


Add IntoRaw{Fd, Socket, Handle} traits | Tracking issue for https://github.com/rust-lang/rfcs/pull/1174 | labels: B-RFC-approved


Arc.clone() Method Chaining -> "borrowed value does not live long enough" | I have the following Code: ``` rust use std::sync::{Arc, RwLock}; fn main() { let mut i = 5; let arc = Arc::new(RwLock::new(i)); println!("{}", i); { let copy = arc.clone(); let local_i = *copy.read().unwrap(); println!("{}", local_i); } { let local_i = *arc.clone().read().unwrap


Compiler panicked | I got the compiler to panic. Here is the **backtrace**: ``` $ RUST_BACKTRACE=1 cargo build Compiling mdbook v0.0.1 (file:///home/mathieu/Programming/Rust/mdbook) error: internal compiler error: unexpected panic note: the compiler unexpectedly panicked. this is a bug. note: we wou


matching on std::net::AddrParseError triggers "use of unmarked library feature" | ``` rust match Ipv4Addr::from_str(blah) { Ok(ip) => Ok(ip), Err(AddrParseError(_)) => Err("cannot parse address") } ``` ``` src/main.rs:84:32: 84:33 error: use of unmarked library feature src/main.rs:84 Err(AddrParseError(_)) => Err("cannot parse address") ^ src/main.rs:84:32: 84


Incorrect codegen with shadowed constants in a match arm | From @eefriedman's comment in #27033: ``` rust fn main() { const C: u8 = 3; match 1 { C @ 2 => { println!("{}", C); } _ => {} }; } ``` ``` <anon>:4:9: 4:14 warning: unused variable: `C`, #[warn(unused_variables)] on by default <anon>:4 C @ 2 => { println!("{}", C); } ^~~~~ Switch | labels: A-codegen, T-compiler


internal compiler error: no def for path when using associated consts | ``` Rust #![feature(associated_consts)] trait Foo { const BAR: i32; fn foo(self) -> &'static i32 { &<Self>::BAR }} fn main() {} ``` ``` <anon>:3:61: 3:72 error: internal compiler error: no def for path 17 <anon>:3 trait Foo { const BAR: i32; fn foo(self) -> &'static i32 { &<Self> | labels: I-ICE, E-needs-test, A-associated-items, C-bug, A-const-eval


Mismatched signature in trait implementation with lifetimes not caught | I _think_ this shouldn't compile, but it does (in rustc 1.3.0-dev (fddfd089b 2015-07-10)): ``` rust struct Foo; trait Bar { fn get_style<'a>(&'a self, r: &'a Foo) -> &'a Foo; } impl Bar for Foo { fn get_style<'a>(&self, r: &'a Foo) -> &'a Foo { r } } fn main() {} ``` | labels: T-lang


Semantics of closures and structs do not exactly correspond | There are a few places where the semantics we enforce for closures could not be faithfully simulated by end-users. These omissions are accidental, but programs do rely on them, and removing them breaks reasonable looking programs. I identified these as part of a patch that expose | labels: A-type-system


B+ Tree in BTreeMap | Based on my knowledge regarding BTrees (I know how they are built, how they work and I also know what a B+ tree is), which I know is by far not the best, I think you might really want to use a B+ Tree](https://en.wikipedia.org/wiki/B%2B_tree) if you do not already. That would mak


Compiler crash on macro_rules | This macro code and invocation: ``` rust macro_rules! test_cases { ( $(#[$case_name:ident($($test_case:expr),+)])+ $test_name:ident ($($param_name:ident),+) $(use $paths::path;)* $test_code:block ) => (); } test_cases!( #[a(1)] t (c) { } ); ``` causes the following backtrace: ``` | labels: I-ICE


dead link in documentation | There is a dead link on [doc.rust-lang.org/[…]/trait.Copy.html](http://doc.rust-lang.org/std/marker/trait.Copy.html). If you scroll down to the implementations and click on `Fp` you run into a 404.


Have rustdoc document private items, except `use` and `extern crate` | Rustdoc defaults to only documented things that are public, i.e. things that the user of a library would care about. This is a good default, but rustdoc can also be useful to people working on large crates by documenting these crates themselves. In that case, it’s preferable to a | labels: T-rustdoc


Nested `CoerceUnsized` is not infered properly | The following piece of code does not compile: ``` Rust pub struct Callbacks { callbacks: Vec<Rc<RefCell<FnMut(i32)>>>, } impl Callbacks { pub fn register<F: FnMut(i32)+'static>(&mut self, callback: F) { self.callbacks.push(Rc::new(RefCell::new(callback))); } } ``` ([Playpen](http | labels: A-type-system


Bad interaction of smart pointers, auto-deref and closures | The following code does not compile: ``` Rust use std::rc::Rc; use std::cell::RefCell; pub struct Callbacks { callbacks: Vec<Rc<RefCell<FnMut(i32)>>>, } impl Callbacks { pub fn call(&mut self, val: i32) { for callback in self.callbacks.iter() { let mut closure = callback.borrow_m | labels: A-type-system


Warn if result of a comparison is not used | Currently Rust will not warn if the result of an "==" comparison is not used like " is_file_set == true; ". It would be very useful to have that warning. | labels: C-enhancement, A-lints


std::borrow::Borrow should have big fat warnings all over it | There are hidden assumptions around `Borrow` that don’t appear to be included in _any_ of the documentation that I can find. Most notably, `HashMap`’s use of `Borrow` requires that `K` and `Q` (`where K: Borrow<Q>`) hash the same; if they don’t, your `HashMap` will be mysteriousl


better diagnostic for `try!` in main | new Rust users try `try!` in `main()` quite a bit. Adding a better diagnostic than `()` isn't `Result` would be nice. | labels: A-diagnostics


Fulfill additional higher-kinded "outlives" predicates | Types fail to fulfill higher-kinded "outlives" predicates when the higher-kinded region is present on the left-hand side of the predicate. For example: ``` rust fn foo<T>() where for<'a> &'a T: 'a {} fn main() { foo::<i32>(); //~^ ERROR the requirement `for<'a> &'a i32: 'a` is no | labels: A-type-system, A-trait-system, E-needs-test, C-bug


make all semicolons optional, there is no need in them | Modern languages like Scala and Groovy do not enforce users to write semicolons. I think it is a right decision, because in fact semicolons are nothing more than just a redundant typing. I've been a scala developer for many years and I only needed semicolons when putting several


rustc panicks when dealing with reference to functions in enum variants | Summary of the bug is in the title I tried with this code : ``` rust enum Event { ENTRY, EXIT, } struct Data; struct State<'a> { f: Fn(&mut Data, &Event) -> &'a Signal<'a>, } enum Signal<'a> { UNHANDLED, HANDLED, TRAN(Fn(&mut Data, &Event) -> &'a Signal<'a>), } struct FSM<'a> { c | labels: I-ICE


rustdoc: items are shown as if defined in crate when reexported cross-module and cross-crate | Consider ``` rust extern crate innercrate; //defines only one public item `from_inner_crate` pub use inner::{inner_fn, from_inner_crate}; /// Top level documentation pub fn top_level(){} pub mod inner { pub use innercrate::from_inner_crate; /// Defined inside inner module pub fn  | labels: T-rustdoc, P-low, A-docs


Rust building is broken for BSD system | Starting with the latest update of LLVM, several BSD system don't be able to build rust anymore. At least: - freebsd: http://buildbot.rust-lang.org/builders/auto-freebsd10_64-1/builds/2/steps/compile/logs/stdio - bitrig: http://buildbot.rust-lang.org/builders/auto-bitrig-64-opt/b


random ICE in util::interner::StrInterner::get / print::pprust::token_to_string | A followup issue from https://github.com/hackndev/zinc/issues/332. rustc crashes inside plugin invocation as reported by @enginespot. I myself have tried the exact same OS version and rustc build and it all works fine for me, while being reproducible for @enginespot. This doesn't | labels: I-ICE


No SyntaxExtension variant can modify foreign items | `SyntaxExtension::MultiModifier` only visits true items, ImplItems, and TraitItems, not `ForeignItem`s. This makes it impossible to write syntax extensions which operate directly on foreign items (e.g. functions declared inside an `extern` block). I started work on https://github | labels: A-syntaxext, C-feature-request


Compiler bug with rustc 1.3.0-nightly (e4e93196e 2015-07-14) | Got the following with `rustc 1.3.0-nightly (e4e93196e 2015-07-14)`: ``` thread 'rustc' panicked at 'index out of bounds: the len is 92 but the index is 530', ../src/libcollections/vec.rs:1376 stack backtrace: 1: 0x108cda785 - sys::backtrace::write::ha27d712b848aedc4Eos 2: 0x108c | labels: I-ICE


Manipulating slice through &mut parameter not optimized well | When passing a `&mut &[u8]` to a function that trims elements from the start/end of the slice, the code contains pointless length checks and stack traffic. Writing the function slightly differently, or inlining it, does produce the code I'd expect. This is a minimal example ([pla | labels: I-slow, C-enhancement, A-codegen, E-needs-test, P-low, T-compiler


negate_unsigned feature gate warning should be changed to feature gate. | negate_unsigned feature gate (librustc_lint/builtin.rs) currently emits a warning instead of actual feature_gate due to backwards [compatibility concerns](https://github.com/rust-lang/rust/pull/27026#issuecomment-122787339). After some time passes this warning should be converted


rustc cannot statically link to C library | When trying to link to a static C library called `md` ``` rustc src/lib.rs [...] -L native=/path/to/md -l static=md ``` it fails: ``` error: linking with `cc` failed: exit code: 1 [...] note: /usr/bin/ld: /path/to/md/libmd.a(acosh.o): relocation R_X86_64_32 against `.data' can no


Internal crates are documented for stable but not nightly | https://doc.rust-lang.org/stable/std/ documents many crates including rustc and syntax, whereas https://doc.rust-lang.org/nightly/std/ only has std and its dependencies. This seems backwards, and opposite of what the commit message for e64b677ca66d742e7c06738bacf3a160cba827a7 / # | labels: T-rustdoc


std::process::Command.status() hangs if subprocess output is >64K characters | std::process::Command hangs in status(), even if output() was called first, if the subprocess prints more than 64K characters to stdout. This Rust program hangs between the two println!() statements, but passes if you change 65536 to 65535: ``` use std::process::Command; use std:


Extend missing_doc lint to consts and statics again. | Reverting [here](https://github.com/rust-lang/rust/pull/27160) until [this RFC](https://github.com/rust-lang/rfcs/pull/1193) is implemented. | labels: E-easy


Bad span for range | The span for the range in ``` rust for _ in 0..10 { ... } ``` is `0..10 {`, whereas it should be just `0..10`. | labels: A-parser, T-compiler


Issue with suggestion for Clone | I wrote an implementation for Clone but forgot to import it. Here's the error I got initially: ``` src/server/service.rs:123:67: 123:74 error: no method named `clone` found for type `server::service::OpenTime` in the current scope src/server/service.rs:123 s.open_times.insert(key | labels: A-diagnostics


jemalloc(?) bug while iterating std::io::Lines | I am using the following code to read from a file and print it line by line: ``` rust use machine_state::OpCode; use std::io::prelude::*; use std::io::BufReader; use std::fs::File; use std::path::Path; pub fn parse(path_string: &String) { let path = Path::new(path_string); let mu


Multiple specialisations possible but no way to select one. | In the following example ([playground](http://is.gd/nNw6gv)) I cannot specify which `new` to use. I was surprised that I could write the second implementation in the first place as [RFC#1210](https://github.com/rust-lang/rfcs/pull/1210) is not accepted yet. So there are no rules


compiler unexpectedly panicked. "this is a bug." | Two sets of this error: ``` 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 | labels: A-debuginfo, I-ICE


Improve code of conduct visibility | Rust is often credited with a great community, a code of conduct would add greatly to this. Sample: http://todogroup.org/opencodeofconduct/


Add `rustc --fatal` which stops at the first build error | (Should this be an RFC?) ## Motivation When refactoring, one may have dozens or hundreds of build errors which need to be fixed one by one. Sometimes, a build error is only a consequence of an earlier error rather than something that need to be fixed itself: ``` rust let foo = ba | labels: A-frontend, A-diagnostics, T-compiler, C-feature-request, D-verbose


internal compiler error: unexpected panic | ``` rustc --version rustc 1.3.0-dev (136c623a6 2015-07-20) 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 t | labels: I-ICE


Rust and C use different in-struct f64 alignment on x86 linux | In particular the x86 linux C ABI has f64 aligned to 8 bytes normally, but only 4 bytes while in a struct. Rust gives f64 an unconditional 8 byte alignment. In addition, the Rust struct is not padded for its size to be a multiple of its alignment, meaning that the struct's alignm | labels: O-linux, O-x86_32


ICE: coherence failed to report ambiguity: cannot locate the impl of the trait | ICE resulting from insufficiently specified/unknown types and nested matching. I tried this code: ``` rust let (printSend, printRec) = channel(); let printer = thread::spawn(move || { loop { match printRec.recv() { Ok(file) => { match file { Some(f) => println!("{}", f), None =>  | labels: A-type-system, I-ICE, A-trait-system, T-compiler


Please provide unprivileged install for RUST | For users on Windows OS without the full admin/privileged rights it is impossible to install RUST therefore please provide a possibility to install RUST by other means than MSI (installer). | labels: O-windows


Audit dependencies of libcore | Current output of `objdump -t libcore-7e44814b.rlib | grep UND` on x86-64 Linux: ``` 0000000000000000 *UND* 0000000000000000 __morestack 0000000000000000 *UND* 0000000000000000 __powidf2 0000000000000000 *UND* 0000000000000000 __powisf2 0000000000000000 *UND* 0000000000000000 cei


Inconsistent escaping of special characters between &str and &OsStr with Debug | Formatting a string containing special characters with `Debug` usually prints them escaped i.e.`"\r\n\t"`. ``` fn main() { use std::ffi::OsStr; let str = "Hello\r\n\tThere"; let os_str: &OsStr = str.as_ref(); println!("{:?}", str); println!("{:?}", os_str); } ``` This snippet run | labels: T-libs-api


ptr-ptr cast does not work well with lifetimes (lifetime widening) | ## STR ``` Rust fn foo<'a>(v: *const &'a ()) { let v: *const &'static () = v as *const &'static (); } fn main() {} ``` ## Expected result cast will be successful ## Actual Result ``` <anon>:2:33: 2:34 error: mismatched types: expected `*const &'static ()`, found `*const &'a ()` ( | labels: A-type-system, A-lifetimes, T-compiler, C-bug, A-coercions, A-raw-pointers