| {: , : Rust Bug Minimization Patterns\, : , : 0} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 1} |
| {: , : good enough\, : , : 3} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : C\_start\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : Implement cross-language ThinLTO,\Stabilize linker-plugin based LTO (aka cross-language LTO),\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : a function\, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : malformed `doc` attribute input\, : , : 0} |
| {: , : const items\type const items\, : , : 3} |
| {: , : {%\Found | labels: A-macros, C-bug, C-discussion, T-rust-analyzerlabelquestionlabel_id |
| idrust_151950textunmangled symbols are not escaped in naked/global assembly | I tried this code: ```rust unsafe extern \ { #[link_name = \] unsafe fn inject(); } #[unsafe(export_name = \)] extern \ fn inject_() {} #[unsafe(naked)] extern \ fn print_0() -> usize { core::arch::naked_asm! | labels: A-codegen, C-buglabelmediumlabel_id |
| idrust_108894text#[derive(Clone, Copy)] doesn't work | I tried this code: ```rust use std::marker::PhantomData; #[derive(Clone, Copy)] pub struct TypedAddress<T>{ inner: u64, phantom: PhantomData<T>, } pub trait Memory { fn write_value<T>(&self, offset: TypedAddress<T>, value: &T); fn return_value<T>(&self, offset | labels: A-diagnostics, A-macros, T-compiler, A-suggestion-diagnostics, D-newcomer-roadblock", "label": "medium", "label_id": 2} |
| {"id": "rust_145123", "text": "Performance regression with auto-vectorization from 1.87 onwards | ### Code I tried this code: ```rust pub fn unfilter_4(previous: &[u8], current: &mut [u8]) { let mut a_bpp = [0; 4]; let mut c_bpp = [0; 4]; for (chunk, b_bpp) in current.chunks_exact_mut(4).zip(previous.chunks_exact(4)) { let new_chunk = [ chunk[0].wrapping_a | labels: A-LLVM, T-compiler, regression-from-stable-to-stable, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_152177", "text": "[ICE]: Compiler panic while compiling ppc64le rust code in linux tree | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \"Rust Bug Minimization Patterns\" for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, T-compiler, O-PowerPC, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_152026", "text": "Tracking Issue for the Soundness Criterion | This is a tracking issue for the pre-RFC [Rust Safety Standard](https://internals.rust-lang.org/t/pre-rfc-rust-safety-standard/23963). Since there is a lack of actionable guidelines for unsafe usage, we are currently working on that. We have proposed several v | labels: C-discussion", "label": "question", "label_id": 4} |
| {"id": "rust_152150", "text": "Non-deterministic rmeta metadata ordering in rustc, continued, with fixes | This is a continuation of #151868 , which was locked for no good reason, and comments actually *removed*, again, for dubious reasons. Repro. script attached. [repro.sh](https://github.com/user-attachments/files/25086025/repro.sh) The prototype fix is broken in", "label": "question", "label_id": 4} |
| {"id": "rust_143702", "text": "Tracking Issue for `peekable_next_if_map` | Feature gate: `#![feature(peekable_next_if_map)]` This is a tracking issue for the `std::iter::Peekable::next_if_map{_mut}` functions, as a combination of `next_if()` and transformation in a single step (ACP: rust-lang/libs-team#613). ### Public API ```rust im | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period, S-tracking-impl-incomplete", "label": "question", "label_id": 4} |
| {"id": "rust_150465", "text": "regression: \"the parameter type `T` may not live long enough\" in `offset_of!` | ``` [INFO] [stdout] error[E0310]: the parameter type `T` may not live long enough [INFO] [stdout] --> src/report/data.rs:310:24 [INFO] [stdout] | [INFO] [stdout] 310 | assert_eq!(offset_of!(ReportData<T>, vtable), 0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ | labels: P-medium, A-borrow-checker, regression-from-stable-to-beta, C-bug, finished-final-comment-period, disposition-close", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_147555", "text": "Tracking Issue for AArch64 FEAT_JSCVT | The feature gate for the issue is `#![feature(\"stdarch_aarch64_jscvt\")]`. # Public API This feature covers the intrinsic from the AArch64 `\"jsconv\"` target feature > Floating-point JavaScript convert to signed fixed-point, rounding toward zero ```rust #[target | labels: T-lang, T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period, A-intrinsics", "label": "question", "label_id": 4} |
| {"id": "rust_122034", "text": "Tracking Issue for raw-pointer-to-reference conversion methods | <!-- 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", "label": "question", "label_id": 4} |
| {"id": "rust_76654", "text": "Tracking issue for const `Pin` methods | Constify methods of `core::pin::Pin` under the feature `const_pin`. Implementation: #76655 Methods in `const_pin` (stable since 1.84.0 - https://github.com/rust-lang/rust/pull/130136): - `new` - `new_unchecked` - `get_ref` - `into_ref` - `get_mut` - `get_unche | labels: T-libs-api, A-const-eval, disposition-merge, finished-final-comment-period", "label": "medium", "label_id": 2} |
| {"id": "rust_151028", "text": "ICE on nightly building futures-util | I encountered an internal compiler error when building `future-utils` on rust nightly (01/11). ### Reproduction ``` rustup toolchain install nightly git clone https://github.com/rust-lang/futures-rs.git cd futures-rs cargo +nightly doc ``` ### Meta Rust versio | labels: T-rustdoc, I-ICE, C-bug, A-intra-doc-links, regression-untriaged", "label": "high", "label_id": 1} |
| {"id": "rust_136514", "text": "ICE: pattern: `attempt to add with overflow` | <!-- ICE: Rustc ./A5635DBE231F0C3535BE7A41BE7846C6C6D75F86CAE0C9F78F9847A246403528.rs '' 'thread 'rustc' panicked at compiler/rustc_mir_build/src/thir/pattern/mod.rs:237:34: 'attempt to add with overflow'', 'thread 'rustc' panicked at compiler/rustc_mir_build/ | labels: A-diagnostics, I-ICE, E-needs-test, T-compiler, C-bug, S-has-mcvelabelhighlabel_id |
| idrust_80775textCannot build cdylib for wasm32-unknown-emscripten | Create an empty file `test.rs` and run ``` rustc -C link-args='-s SIDE_MODULE' --target wasm32-unknown-emscripten --crate-type cdylib test.rs ``` It gives the error ``` error: linking with `emcc` failed: exit code: 1 | = note: \ \ \, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : lib\, : , : 2} |
| {: , : unused variable\, : , : 0} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : \/* e */\, : , : 1} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 0} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : internal error: entered unreachable code: found `99`\, : , : 1} |
| {: , : Rust Bug Minimization Patterns\, : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : not a type parameter\, : , : 0} |
| {: , : , : , : 1} |
| {: , : no tools breakage the week before beta cutoff\no breakage\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : drop-ful\, : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : amount_clone.mul(10000.0)={}----amount_clone.mul(10000.0).floor()={}\, : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : 0.6\0.6.1\, : , : 3} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : A non-empty glob must import something with the glob's visibility\" to be a lint? | Consider the following three examples: A and C are accepted and B has a compilation error. However, the message reported in B looks more like a lint than a compilation error. A consequence of this error is that adding a non-public function to a module (e.g. the `bar` in B) may br | labels: E-easy, A-lints, A-resolve, E-mentor, T-lang", "label": "question", "label_id": 4} |
| {"id": "rust_62336", "text": "wart: non-Eq [T; 0] can be matched as if T were `#[structural_match]` | Spawned off of investigation of issue #62307 and PR #55837 We currently allow constants that are empty arrays of any type to be used as patterns in `match`. We allow this regardless of whether they are an array of an ADT that does not derive `PartialEq`/`Eq` This may be a feature | labels: T-lang, A-patterns, A-ZST, A-array", "label": "question", "label_id": 4} |
| {"id": "rust_62338", "text": "`clippy-driver` no longer builds after rust-lang/rust#61995 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#61995, I observed that the tool clippy-driver no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rust-clippy is needed to fix the fallout. cc @eddyb, do you think you | labels: P-medium, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_62342", "text": "library compilation problem on s390x | I'm getting the following error when building `Parity Ethereum`: ``` LLVM ERROR: Cannot select: 0x3ff58cd1598: i32 = SystemZISD::GET_CCMASK 0x3ff58cd13f8, Constant:i32<15>, Constant:i32<3> 0x3ff58cd13f8: i32 = srl 0x3ff58a47040, Constant:i32<31> 0x3ff58a47040: i32 = add 0x3ff58cd | labels: A-LLVM, T-compiler, C-bug, O-SystemZlabelmediumlabel_id |
| idrust_62347text`miri` no longer builds after rust-lang/rust#62335 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#62335, I observed that the tool miri has failing tests. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @Mark-Simulacrum, do you think you would | labels: P-medium, T-compilerlabelmediumlabel_id |
| idrust_62348textconst fns have no documentation | `const` functions seems to be an entirely undocumented language feature. As far as I can see, it's not mentioned anywhere in book or the reference. Judging by the release notes, they've been in the language since before 1.33, so it seems to just have been forgotten? | labels: A-docs, A-const-evallabellowlabel_id |
| idrust_62350textFFI broken with many parameters | We encountered this with WebRender, where we exposed a method in Rust to the Gecko, and the last parameters supplied appeared random on the Rust side. I made a reduced test case adapted from it that you can grab at: https://github.com/aosmond/myrustffi It is a very simple test ca | labels: A-codegen, A-FFI, O-x86_64, P-high, T-compiler, regression-from-stable-to-stablelabelcritical_buglabel_id |
| idrust_62353textICE: `rustc` crashes in a `chroot` sandbox | This error happens when running `cargo` from `bazel`, which is in turn running in a `chroot` sandbox on Centos 7. Running with `RUST_BACKTRACE=1` unfortunately makes the error disappear, so we don't know why `rustc` needs to read `/proc/self/exe` and why only when compiling DD. T | labels: I-ICE, P-medium, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_62357", "text": "Add valid examples to `std::ptr::{read,write}_unaligned` | With https://github.com/rust-lang/rust/pull/62323 the only example (that had UB and was thus invalid) in `std::ptr::read_unaligned` and `std::ptr::write_unaligned` is removed. We should add a valid example of using the aforementioned functions. cc @rust-lang/wg-unsafe-code-guidel | labels: E-easy, C-enhancement, A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_62358", "text": "Tracking issue for `Option::contains` and `Result::contains` | This is a tracking issue for `Option::contains` and `Result::contains`. The implementations are as follows: ```rust pub fn contains(&self, x: &T) -> bool where T: PartialEq { match self { Some(y) => y == x, None => false, } } pub fn contains(&self, x: &T) -> bool where T: Partial | labels: T-libs-api, B-unstable, C-tracking-issue, finished-final-comment-period, disposition-close, A-result-option", "label": "medium", "label_id": 2} |
| {"id": "rust_62361", "text": "compiler optimized out function call which has side effects ? | I found following code ```rst TcpListener::bind(\"127.0.0.1:1234\"); std::thread::sleep_ms(99999999); ``` didn't listen during running, but if I change it to ```rst let _s=TcpListener::bind(\); std::thread::sleep_ms(99999999); ``` it listened as expected, is this a blabelmediumlabel_id |
| idrust_62362text`miri` no longer builds after rust-lang/rust#62355 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#62355, I observed that the tool miri no longer builds. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @Centril, do you think you would have tim | labels: T-compilerlabelmediumlabel_id |
| idrust_62364textICE on self-referential typedef | So, while writing some _really nasty_ code for an interpreter, I ended up with an overcomplicated version of this code: ```rust use std::sync::Arc; pub enum ThingOrRef<S> where S: AsRef<Self> { ThingRef(S), Thing } pub type ThingArena<'ctx, T> = ThingOrRef<Arc<Self>>; ``` ([Playg | labels: I-ICE, regression-from-stable-to-nightly, P-high, T-compiler", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_62370", "text": "Tracking issue for Box::into_pin (feature `box_into_pin`) | This is a tracking issue for `Box::into_pin` implemented in https://github.com/rust-lang/rust/pull/57313 ```rust impl<T: ?Sized> Box<T> { pub fn into_pin(boxed: Box<T>) -> Pin<Box<T>>; } ``` | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period, Libs-Tracked", "label": "medium", "label_id": 2} |
| {"id": "rust_62373", "text": "Improve diagnostics on self types in function signature | ```rust struct A; impl A { fn foo(self: Box<Self>) {} } fn main() { A.foo() } ``` gives ```text error[E0599]: no method named `foo` found for type `A` in the current scope --> src/main.rs:8:7 | 1 | struct A; | --------- method `foo` not found for this ... 8 | A.foo() | ^^^ ``` Wh | labels: C-enhancement, A-diagnostics, A-trait-system, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_62375", "text": "Internal compiler error with enums | Hello, I found a bug while developing a project who produce an internal error. I create this code to reproduce the error: ``` struct TypeA { attr: String, attr2: usize, } struct TypeB { attr: usize, attr2: Vec<String>, } enum En { Value(TypeA), OtherValue(TypeB), None } fn main() | labels: I-ICE, E-needs-test, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_62382", "text": "Unhelpful span in async type inference error | The following snippet [(playground)](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=1af2816e9147c55126a2658e46f1453e): ```rust #![feature(async_await)] use std::future::Future; fn get_future() -> impl Future<Output = ()> { panic!() } async fn foo() { let | labels: C-enhancement, A-diagnostics, T-compiler, A-inference, A-async-await", "label": "low", "label_id": 3} |
| {"id": "rust_62386", "text": "Invalid suggestion when attempting to call async closure | The following snippet: ```rust #![feature(async_await)] fn main() { async || ({ })(); } ``` produces the following error: ``` error[E0618]: expected function, found `()` --> src/main.rs:4:14 | 4 | async || ({ | ______________^ | |______________| | || 5 | || })(); | ||______^_- ca | labels: A-closures, T-compiler, C-bug, A-async-await, A-suggestion-diagnostics, AsyncAwait-Triaged", "label": "medium", "label_id": 2} |
| {"id": "rust_62387", "text": "diagnostics: suggest iter_mut() where trying to modify .iter()'ed vector elements inplace | code: ````rust #[derive(Debug)] struct A { a: i32, } impl A { fn double(&mut self) { self.a += self.a } } fn main() { let mut v = [A { a: 4 }]; v.iter().for_each(|a| a.double()); println!(\"{:?}\", v); } ```` The code gives the following not-very-helpful warning: ```` error[E0596]: | labels: C-enhancement, A-diagnostics, T-compiler, D-newcomer-roadblock", "label": "low", "label_id": 3} |
| {"id": "rust_62389", "text": "Crater runs for Rust 1.37.0 | labels: S-waiting-on-review", "label": "medium", "label_id": 2} |
| {"id": "rust_62394", "text": "future doc in doc.rs still use await! | it supposed to be .await? https://doc.rust-lang.org/std/future/trait.Future.html > The core method of future, poll, attempts to resolve the future into a final value. This method does not block if the value is not ready. Instead, the current task is scheduled to be woken up when ", "label": "medium", "label_id": 2} |
| {"id": "rust_62395", "text": "Const generics with function pointers produces linker error. | When attempting to compile a program using const generic function pointers, I get the following linker error: ``` error: linking with `cc` failed: exit code: 1 | = note: \ \ \ \ \ \, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : value: {}\type: {}\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : /lib/something\lib/rust-1.x.x\, : , : 2} |
| {: , : Show hidden undocumented items\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : byte index 10 is not a char boundary\, : , : 0} |
| {: , : /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/codegen-nightly-backends/libr | labels: A-LLVM, T-compiler, C-buglabelmediumlabel_id |
| idrust_62529textICE rink: higher-rank trait bound (HRTB) `for<'a> ...` hits OutputTypeParameterMismatch in librustc/traits/codegen | I have seen many `OutputTypeParameterMismatch` ICEs filed, so I decided to try to make a single representative issue for all of them. * Its possible that not all of these share the same root cause. But until I see a more fine grain way to categorize them, I'm going to at least tr | labels: I-ICE, A-trait-system, P-medium, T-compiler, C-bug, A-lazy-normalizationlabelhighlabel_id |
| idrust_62530textAccount for coercions in trait resolution? | This came up in https://github.com/rust-lang/rust/pull/62528, see “Joining strings with `char`”. Reduced test case: ```rust fn takes_str(_x: &str) {} fn takes_type_parameter<T>(_x: T) where T: SomeTrait {} trait SomeTrait {} impl SomeTrait for &'_ str {} impl SomeTrait for char { | labels: A-trait-system, T-lang, A-coercions", "label": "medium", "label_id": 2} |
| {"id": "rust_62531", "text": "Missed optimization on array comparison | The godbolt link: https://godbolt.org/z/dc9o3x I think this snippet should just return `true`: ```rust pub fn compare() -> bool { let bytes = 12.5f32.to_ne_bytes(); bytes == if cfg!(target_endian = \"big\") { [0x41, 0x48, 0x00, 0x00] } else { [0x00, 0x00, 0x48, 0x41] } } ``` The ge | labels: A-LLVM, I-slow, C-enhancement, A-codegen, E-needs-test, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_62536", "text": "ICE: \"can't hash a TyVid\, : , : 1} |
| {: , : , : , : 2} |
| {: , : no type for node\Incorrect length {}\, : , : 1} |
| {: , : pub t(#\, : , : 0} |
| {: , : , : , : 4} |
| {: , : Hello\CString::new failed\, : , : 2} |
| {: , : fn foo(u: u8) { if u8 macro_rules! u8 { (u6) => { fn uuuuuuuuuuu() { use s loo mod u8 {\, : , : 0} |
| {: , : , : , : 0} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : rust-lang/rust\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : overflow evaluating the requirement\, : , : 2} |
| {: , : , : , : 2} |
| {: , : non-Scalar ConstValue encountered in super_relate_consts\, : , : 1} |
| {: , : String\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : &rc\, : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : final\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : If Youth, throughout all history, had had a champion to stand up for it\, : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : 2018\, : , : 0} |
| {: , : Self::\, : , : 2} |
| {: , : unresolved import\, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 0} |
| {: , : , : , : 0} |
| {: , : Hello, world!\, : , : 2} |
| {: , : ./x.py\/tmp/z/rust/src/bootstrap/bootstrap.py\/tmp/z/rust/src/bootstrap/bootstrap.py\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : no ImplicitCtxt stored in tls\, : , : 0} |
| {: , : , : , : 2} |
| {: , : ボルテックス\, : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : | repo is @ bf16480f9cf124630f4a4ffc6d8a57b72fbd5ce9 ```` Compiling core v0.0.0 (/home/matthias/vcs/github/rust/src/libcore) error: couldn't load codegen backend \"/home/matthias/vcs/github/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/x86_64-unknown-linux-gnu/codegen-backe | labels: A-linkage, A-LLVM, A-codegen, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_62751", "text": "ICE while switching a type definition between enum and trait | I have observed an ICE when I run `cargo check`. At that time I was switching a type definition between `enum` and `trait` on my own type. At first I was using a trait: ```rust trait Block { // ... } ``` on implementing it further I realized that I needed to use GAT, so I switche | labels: I-ICE, T-compiler, A-incr-comp, C-bug, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_62753", "text": "LinuxTools builder: sccache isn't used | The compiler time of [LinuxTool builds](https://dev.azure.com/rust-lang/rust/_build/results?buildId=3593&view=logs) are nearly 4 hours, which is due to the lack of sccache not being used. I believe that PRs don't have access to the same environment variable group as the auto buil | labels: T-infra", "label": "medium", "label_id": 2} |
| {"id": "rust_62754", "text": "LinuxTools builder: TOOLSTATE_REPO is undefined | This may or may not have the same fix as https://github.com/rust-lang/rust/issues/62753, but the LinuxTools PR builder doesn't have access to the same variables as the auto builders, which means the docker image fails at the very end (https://dev.azure.com/rust-lang/rust/_build/r | labels: T-infralabelmediumlabel_id |
| idrust_62762textSTATUS_ACCESS_VIOLATION on 'index out of bounds' Windows 7 with lto and avx | With avx and lto enabled, index out of bounds causes a STATUS_ACCESS_VIOLATION instead of a panic. Initially encountered this problem in a program using rand::thread_rng() but narrowed down to a simpler test case found in issue #51794. I tried this code: ``` fn main() { let x = [ | labels: O-windows, P-high, T-compiler, I-unsoundlabelcritical_buglabel_id |
| idrust_62763texthashbrown's trait implementations appear in std docs | Perhaps this is a known issue, but I've noticed that since `hashbrown` was integrated into the standard library, impls from that crate now [show up under the 'Implementations on Foreign Types' section of the trait docs](https://doc.rust-lang.org/std/iter/trait.IntoIterator.html#f | labels: T-rustdoc, A-collections, T-libs-api, A-docs, C-buglabellowlabel_id |
| idrust_62767textICE when use-ing enum variant after glob-importing same-named enum | [playpen](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=17237a55fd54a2981a6113425362cfce) Reproduction code: ```rust mod foo { pub enum Foo { Foo(i32), } } use foo::*; use Foo::Foo; ``` ``` thread 'rustc' panicked at 'assertion failed: directive.imported | labels: A-resolve, I-ICE, P-medium, T-compiler, C-bug, glacier", "label": "high", "label_id": 1} |
| {"id": "rust_62768", "text": "\"Foo is ambiguous\" even though it's not | [playpen](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=75fda319e5fcd1be7259ee46c608a710) Given the following code: ```rust mod foo { pub enum Foo { Foo(i32), } } use foo::*; use Foo::*; ``` The compiler claims, that the `Foo` in `use Foo::*` could eithe | labels: A-resolve, T-compiler, C-buglabelmediumlabel_id |
| idrust_62770textMinor 1.36 rustdoc regression: \\] after a link is not treated as an escape | A minor change in behavior between 1.35.0 and 1.36.0. Repro example here: ``` /// \\[This escapes both brackets\\] /// \\[[This escapes only the left bracket as of 1.36.0](https://www.google.com/)\\] pub fn example() { } ``` Run a standard `cargo doc`. In 1.36.0, the link will displa | labels: T-rustdoc, regression-from-stable-to-stable, C-buglabelcritical_buglabel_id |
| idrust_62773textstr::trim_start_matches and similar should not trust Searcher to return valid indices | For example, https://github.com/rust-lang/rust/blob/bc2e84ca0939b73fcf1768209044432f6a15c2e5/src/libcore/str/mod.rs#L3748, and the equivalent in trim_end_matches. The functions on Searcher that return these are not unsafe, and *someday* could be implemented outside the stdlib. Allabelmediumlabel_id |
| idrust_62775texttest cases under run-pass directory are not running | With the change in function should_run_successfully() of commit 54337fab39f4c610bd5e5c51cea6a965e7bd7cdb: - RunPass => true, - Ui => self.props.pass_mode == Some(PassMode::Run), + RunPass | Ui => self.effective_pass_mode() == Some(PassMode::Run), The test cases under run-pass dir | labels: A-testsuite, C-buglabelmediumlabel_id |
| idrust_62776textBuilding core on thumbv6-none-eabi fails with \ | In my project I'm using xargo to build libcore. Perhaps appropriately, the compiler warns it may crash and then promptly crashes: ``` warning: the feature `const_generics` is incomplete and may cause the compiler to crash --> /home/gui/.rustup/toolchains/nightly-x86_64-unknown-li | labels: A-LLVM, A-codegen, T-compiler, C-bug, A-const-generics", "label": "medium", "label_id": 2} |
| {"id": "rust_62779", "text": "Cross-crate re-export produces invalid rustdoc for impl Trait | In a cross-crate reexport of an `impl Trait`-accepting function, rustdoc formats it in a wrong way which is not even valid Rust. Let `crate1` be: ```rust pub trait MyTrait {} pub fn accepts_impl(_t: impl MyTrait) {} ``` Let `crate2` be: ```rust pub use crate1::{MyTrait, accepts_i | labels: T-rustdoc, A-impl-trait, C-bug", "label": "low", "label_id": 3} |
| {"id": "rust_62780", "text": "Tests related to debuginfo-both failing on sparc64 | During the past releases, a lot of bugs in the sparc64 backend have been fixed so that we're down to 59 failing tests now. One of the tests that have been failing for a long time now (don't know whether they ever passed) are ```debuginfo-both```: ``` test [debuginfo-both] debugin | labels: A-testsuite, A-debuginfo, O-SPARC, C-bug", "label": "question", "label_id": 4} |
| {"id": "rust_62781", "text": "Recent nightly versions break thumb* targets | Hey all, I've noticed in nightly-2019-07-18, rustc has begun producing symbols in the `.ARM.exidx` region, which it did not previously do. As our standard linker script does not have a linker rule for this region, building fails with with the following error: ``` = note: rust-lld | labels: A-LLVM, O-Arm, regression-from-stable-to-nightly, P-high, T-compiler, C-buglabelcritical_buglabel_id |
| idrust_62785textUndefined symbol _fltused when compiling to x86_64-unknown-uefi | Recent nightlies give the following linker error when trying to compile with the `x86_64-unknown-uefi` target: ``` error: linking with `rust-lld` failed: exit code: 1 | = note: \ \ \ \ \ \ \ \, : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : abort\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : #\#\, : , : 2} |
| {: , : #\, : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : abc\bc\{:?}\, : , : 2} |
| {: , : , : , : 1} |
| {: , : internal_uninit_const\0\hack to work around promotability\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : error: bare CR not allowed in doc-comment\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : index out of bounds: the len is 0 but the index is 1\, : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : Aborted (core dumped)\error: expected expression, found `<eof>`\, : , : 3} |
| {: , : index out of bounds: the len is 3 but the index is 4\, : , : 0} |
| {: , : =0.2.60\, : , : 0} |
| {: , : , : , : 2} |
| {: , : lexer accepted unterminated literal with trailing slash\\\u\\\\\\\u\\\\\, : , : 1} |
| {: , : a raw memory access tried to access part of a pointer value as raw bytes\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : é 😀 \, : , : 4} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 0} |
| {: , : byte index 1 is out of bounds of ``\, : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : ellipsis\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : v8x16.shuffle\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : cannot return value referencing local variable `__next`\, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : Variable is assigned to, but never used\, : , : 2} |
| {: , : foo\0.1.0\, : , : 2} |
| {: , : , : , : 2} |
| {: , : Type here to search\Registry Editor\Yes\HKEY_CURRENT_USER\Console\, : , : 2} |
| {: , : blah\foo {}\bar {}\Hello world!\, : , : 2} |
| {: , : ...\, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : Try invoking the function\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : [How can I implement `Ord`?](https://doc.rust-lang.org/std/cmp/trait.Ord.html#how-can-i-implement-ord)\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : `X...` range patterns are not supported\, : , : 4} |
| {: , : internal error: entered unreachable code\, : , : 1} |
| {: , : C\C\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : ritiekmalhotra123@gmail.comlabelmediumlabel_id |
| idrust_63135textICE on \ | I'm seeing an internal compiler error on the following input (found by [fuzz-rustc](https://github.com/dwrensha/fuzz-rustc)): ```rust fn i(n{...,f # ``` ``` error: this file contains an un-closed delimiter --> main.rs:2:2 | 1 | fn i(n{...,f # | - - un-closed delimiter | | | un-cl | labels: I-ICE, A-parser, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63136", "text": "\"match arms have incompatible types\" hint incorrect | > this and all prior arms are found to be of type `!` Only some of the prior arms are of type `!`, the rest is of type `FloatCC`. ``` error[E0308]: match arms have incompatible types --> src/llvm_intrinsics.rs:77:33 | 60 | / match scalar.assert_bits(Size::from_bytes(1)) { 61 | | | labels: A-diagnostics, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63138", "text": "Rustdoc search results truncated | https://docs.rs/cranelift-codegen/0.37.0/cranelift_codegen/ir/trait.InstBuilder.html?search=I32X  Reason: `max-height: calc(100vh - 32px);` on parent `<div class=\"rustdoc | labels: T-rustdoc, C-bug", "label": "low", "label_id": 3} |
| {"id": "rust_63139", "text": "Tracking issue for div_duration | Rust PR: #62756 This feature adds the following methods to `Duration`: - `div_duration_f64(self, rhs: Duration) -> f64` - `div_duration_f32(self, rhs: Duration) -> f32` | labels: T-libs-api, B-unstable, C-tracking-issue, requires-nightly, Libs-Tracked, Libs-Small", "label": "medium", "label_id": 2} |
| {"id": "rust_63140", "text": "Generic type parameters used in expression? | Is there a way to use a generic type parameter in an expression? For example: ~~~rust fn SomeGenericFunc<T>() { if T : Display { // Here we know T implements Display println!(\"{}\", T); } else if T : Debug { // Here we know T implements Debug println!(\"{:?}\", T); } else { println!", "label": "medium", "label_id": 2} |
| {"id": "rust_63142", "text": "Using proc macros through a re-exported crate raises rustc_private unstability error | When a library A depends on a library B, which re-exports a library C that (re-?)exports procedural macros, using them in A through the re-export in B may result in an E0658 error. I tried this code: ```rust // src/lib.rs use inner::serde::Deserialize; #[derive(Deserialize)] pub | labels: C-enhancement, A-diagnostics, A-resolve, A-macros, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63143", "text": "Box \"doesn't have a size known at compile-time\hello\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : | labels: A-lints, T-compiler, C-buglabelmediumlabel_id |
| idrust_63154textAssociated types, impl traits ~and closures~; oh my, an ICE. | While experimenting with some code I hit this ICE. Interestingly, when running `cargo test` a second time, it magically works - skipping the error. Also, `cargo miri test` works fine too. I'm on a slightly older nightly because some rustup components are missing on the latest. ht | labels: I-ICE, A-closures, A-associated-items, P-high, T-compiler, A-MIR", "label": "high", "label_id": 1} |
| {"id": "rust_63156", "text": "lint of unnecessary parentheses around `if` condition may case error | when unnecessary parentheses is removed, may lack a whitespace between `if` and `expr`. example `if(is_prime) {println!(\"hello\")};` while be replaced to `ifis_prime {println!(\"hello\")};` Maybe we should replare `(expr)` with a pair of whitespace around `expr`, instead of just `ex | labels: E-easy, A-lints, T-compiler, C-bug", "label": "low", "label_id": 3} |
| {"id": "rust_63157", "text": "Drop ordering breaks macro hygiene | Macro hygiene implies any objects created in the macro should be dropped before any code run after it executes. This does not happen in latest stable or nightly. I tried this code: ```rust use std::io::Write; macro_rules! out { ($content:expr $(, $vars:expr)*) => { let stdout = s | labels: A-destructors, A-macros, T-lang", "label": "medium", "label_id": 2} |
| {"id": "rust_63159", "text": "Do copy[_nonoverlapping]/swap[_nonoverlapping] do typed copies? | The following example ([godbolt](https://rust.godbolt.org/z/SDb-pj)): ```rust #[repr(align(128))] #[derive(Copy, Clone)] pub struct A(u8); pub unsafe fn foo(x: &A) -> A { *x } pub unsafe fn bar(x: &A) -> A { let mut y: A = std::mem::uninitialized(); std::ptr::copy_nonoverlapping( | labels: A-LLVM, I-slow, C-enhancement, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63160", "text": "Redox builder is temporarily disabled | #61393 temporarily disables the redox builder, this issue tracks re-enabling it. cc @jackpot51 | labels: T-infra, O-redox", "label": "medium", "label_id": 2} |
| {"id": "rust_63161", "text": "ICE: index out of bounds: the len is 7 but the index is 7 | I encountered an ICE today. Below you find the backtrace of running `cargo test`. I ran `cargo clean` afterwards and the ICE vanished, so it seams to be connected to incremental compilation. ``` thread 'rustc' panicked at 'index out of bounds: the len is 7 but the index is 7', /r | labels: I-ICE, T-compiler, A-incr-comp, C-bug, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_63164", "text": "internal error: entered unreachable code | Seems to be something to do with Rocket. Having a `get` on the internal function is causing the compiler to blow up. ```rust fn moo() { #[get(\"/moo\")] fn get() -> String { \"moo\".to_string() } } ``` Version: ``` rustc 1.38.0-nightly (dddb7fca0 2019-07-30) binary: rustc commit-hash | labels: I-ICE, A-visibility, A-macros, P-high, T-compiler, A-decl-macros-2-0", "label": "high", "label_id": 1} |
| {"id": "rust_63167", "text": "Confusing error message with type unification of impl Traits | It took a colleague explaining to me that the return type of a function returning an impl Trait is unique across function definitions for me to understand the following error: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=4ceda076c82b01ea279e8864518ab5d9 | labels: C-enhancement, A-diagnostics, T-compiler, A-impl-trait, A-async-await, AsyncAwait-Triaged", "label": "low", "label_id": 3} |
| {"id": "rust_63168", "text": "Tracking issue for Result::cloned, Result::cloned_err, Result::copied, Result::copied_err | [PR](https://github.com/rust-lang/rust/pull/63166) | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period, requires-nightly", "label": "medium", "label_id": 2} |
| {"id": "rust_63169", "text": "impl trait in type aliases does not trigger \"private type in public interface\" errors | The current implementation of `existential_type` does not trigger any \"private type in public interface\" errors, for the following code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=f8b7bf41e44a8f7ec207f35eaf879f16)): ```rust #. -- @nikomatsakis ~~After https://github.com/rust-lang/rust/issues/63063 | labels: C-enhancement, A-diagnostics, T-compiler, A-impl-trait, F-type_alias_impl_trait, requires-nightlylabellowlabel_id |
| idrust_63210textFormal parameter attributes won't be passed into proc-macro | As this [example repo](https://github.com/Hexilee/params-attribute-example/blob/master/proc-macro-tests/rename_params.rs) This is the example proc-macro: ```rust extern crate proc_macro; use proc_macro::TokenStream; #[proc_macro_attribute] pub fn rename_params(_args: TokenStream, | labels: A-attributes, A-macros, T-compiler, C-bug, requires-nightly, F-param_attrs", "label": "medium", "label_id": 2} |
| {"id": "rust_63211", "text": "Associated types cause \"expected\" and \"found\" to be reversed in error messages | TL;DR: `Iterator<Item=...>` type mismatches are described wrong. In some cases -- I've reproduced consistently with associated types, but haven't explored further -- type mismatches are reported incorrectly, with the expected type being reported as \"found\" and the actual type bei | labels: A-type-system, A-diagnostics, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63219", "text": "`miri` no longer builds after rust-lang/rust#63214 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#63214, I observed that the tool miri no longer builds. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @Centril, do you think you would have tim | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63220", "text": "Move closure copies :Copy variables silently | ## The Good Given the following code: ```rust fn main() { let mut x = 0; dbg!(x); } ``` https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=19261742184207a4075885cae58680e1 I got a reasonable warning: ``` warning: variable does not need to be mutable --> src/m | labels: C-enhancement, A-lints, A-closures, T-lang", "label": "low", "label_id": 3} |
| {"id": "rust_63222", "text": "[rustdoc] stabilize #[doc(alias = ...)] | cc @rust-lang/rustdoc | labels: T-rustdoc, A-doc-alias", "label": "medium", "label_id": 2} |
| {"id": "rust_63223", "text": "Compiler panic on a macro invocation combined with invalid pub declaration | The compiler panics when compiling the following code. I had been expecting to see syntax errors instead. Deleting either line causes the compiler not to panic and give expected error messages. ```rust const FOO: &str = b!(\"foo\"); pub struct Bar { pub(in ::a) x: u64 } ``` ([Playg | labels: A-resolve, I-ICE, A-macros, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63224", "text": "How to parse rmeta file | Hello, I'm currently working on the compiler process of rust and I want to know some details about the metadata included in the rlib file. I have extracted the rmeta file from the rlib file, however, I found out it is also a binary file. I wonder if there are any approaches or to | labels: A-metadata, T-compiler, E-help-wantedlabelmediumlabel_id |
| idrust_63225textError with nested async fn and anonymous lifetimes | The following breaks on nightly (see [playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a1aabca3f0059c24f101e3a149632fbd)) ```rust #![feature(async_await)] struct Foo<'a>(&'a ()); impl Foo<'_> { fn test() { async fn test() {} } } ``` With: ``` e | labels: T-compiler, C-bug, A-async-await, AsyncAwait-Polish", "label": "medium", "label_id": 2} |
| {"id": "rust_63226", "text": "ICE when constructing monomorphic vtable in a static in dependent crate. | This is ICE happens when I call `ROnce::new` from the abi_stable crate in const contexts in dependent crates/doctests, but not when using the `ROnce::NEW` associated constant. # Reproducing It can be reproduced using a doctest in the playground: https://play.rust-lang.org/?versio | labels: E-easy, A-codegen, I-ICE, E-mentor, P-high, T-compiler", "label": "high", "label_id": 1} |
| {"id": "rust_63231", "text": "Adding stuff to a particular existing crate? | Well simply put - monkey patching code. Oh boy, I can feel the raised eyebrows already. I am working on an embedded project. Worked on Cortex-M3 until now (thumbv7v-m), and recently switched to Cortex-M (thumbv6-m), and all hell broke lose. The main issue is that the instruction ", "label": "question", "label_id": 4} |
| {"id": "rust_63237", "text": "Fix test style in unused parentheses lint test | Update test file to use `#![deny(unused_parens)]` + `//~ ERROR` annotations instead of `pretty-json` (see https://rust-lang.github.io/rustc-guide/tests/adding.html) The files need to update are: - `test/lint/unused_parens_json_suggestions.rs` - `test/lint/used_parens_remove_json_ | labels: E-easy, C-cleanup, A-testsuite, A-lints, E-mentor, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63238", "text": "deps.rs EXCEPTIONS needs to be re-triaged | The [EXCEPTIONS](https://github.com/rust-lang/rust/blob/d7270712cb446aad0817040bbca73a8d024f67b0/src/tools/tidy/src/deps.rs#L27) list lists license exceptions. After reviewing a few of them, they seem to be out of date, and some that were copyleft are now permissive, and some hav | labels: T-core", "label": "medium", "label_id": 2} |
| {"id": "rust_63244", "text": "Nested tuple leads to worse code | For ```rust pub struct Moo((u128, ())); pub fn moo(a: Moo, b: Moo) -> Moo { Moo(((a.0).0 + (b.0).0, ())) } pub struct Baa(u128, ()); pub fn baa(a: Baa, b: Baa) -> Baa { Baa(a.0 + b.0, ()) } ``` `cargo asm` gives ```asm try::moo: mov rcx, qword, ptr, [rdx] add rcx, qword, ptr, [rs | labels: I-slow, A-codegen, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63249", "text": "rustc claims that \"array lengths can't depend on generic parameters\, : , : 4} |
| {: , : can't qualify macro invocation with `pub`\" error can fire without any macro invocations | With #63180 in effect, code using `existential type` produces confusing error: ``` error: can't qualify macro invocation with `pub` --> src/mixer.rs:6:1 | 6 | pub existential type T: MotorCtrl; | ^^^ | = help: try adjusting the macro to put `pub` inside the invocation ``` The act | labels: A-diagnostics, A-parser, T-compiler, C-bug, D-incorrectlabelmediumlabel_id |
| idrust_63256textSegmentation fault when using spmc:::channel | After a few days studying Rust I have come to a road block with segmentation faults and other errors when running a simple program using an mpsc channel. use std::thread; use std::fs::File; use std::io::{BufReader,BufRead}; pub fn main() { let (tx, rx) = spmc::channel(); let mut | labels: I-crash, T-libs-api, I-unsound, C-buglabelcritical_buglabel_id |
| idrust_63258textOpt-level profile override causes function miscompile to ud2 on MacOS | Opt-level profile override causes function miscompile to ud2 on MacOS. I wasn't able to reproduce this bug on Windows 10. **rustc version:** 1.38.0-nightly (6e0d27d93 2019-08-03) The most minimal example I could come up with: https://github.com/mvlabat/ud2 **src/main.rs:** https: | labels: O-macos", "label": "medium", "label_id": 2} |
| {"id": "rust_63263", "text": "ICE with closure return type as impl trait type alias defining use | In an attempt to make the compiler recognize my defining use of an impl trait type alias without making a separate wrapper function, I ran this code, but it resulted in an ICE: ```rust #![feature(type_alias_impl_trait)] pub type Closure = impl FnOnce(); fn main() { || -> Closure | labels: I-ICE, A-closures, T-compiler, A-impl-trait, C-bug, F-type_alias_impl_trait", "label": "high", "label_id": 1} |
| {"id": "rust_63267", "text": "The standard library should have a basic future runtime | While libraries like Tokio and runtime exist, there's a real discovery problem for new users. And importing a large library like those can increase compile time a bunch and whatnot. For ease of use, I'm proposing that the standard library contains a simple future runtime. It does", "label": "medium", "label_id": 2} |
| {"id": "rust_63268", "text": "rustdoc: Built-in macros are not documented in all the necessary locations | NOTE: Some cases below assume https://github.com/rust-lang/rust/pull/63056 has landed. - :negative_squared_cross_mark: https://doc.rust-lang.org/nightly/core/default/index.html doesn't contain the derive macro `Default`. :heavy_check_mark: Compare with the https://doc.rust-lang.o | labels: T-rustdoc, A-macros, C-buglabelmediumlabel_id |
| idrust_63271textf32/64::asinh() should return -0.0 for -0.0 | Currently, both of the following return false: ```rust (-0.0 as f64).asinh().is_sign_negative() (-0.0 as f32).asinh().is_sign_negative() ``` However, in other languages like [C](https://en.cppreference.com/w/c/numeric/math/asinh), `asinh(-0.0)` would always return `-0.0`. We migh | labels: T-libs-api, C-buglabelmediumlabel_id |
| idrust_63275textShould the Future trait be in the prelude? | I'm curious what opinions people have about this. | labels: T-lang, C-feature-request", "label": "medium", "label_id": 2} |
| {"id": "rust_63276", "text": "rustdoc: `DerefMut` methods are missing from sidebar | Take a look at https://doc.rust-lang.org/std/vec/struct.Vec.html. The sidebar has `Deref<Target=[T]>`, but not `DerefMut`, so methods like `sort` are missing. | labels: T-rustdoc, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63277", "text": "Different error messages between async and regular functions | Hi, Let's consider following code: ```rust fn foo() -> Result<bool, ()> { unimplemented!() } fn bar() -> Result<(), ()> { foo()?; () } ``` There's an error in the penultimate line - it should say `Ok(())` and Rust correctly helps to spot the mistake: ``` | 7 | fn bar() -> Result< | labels: A-diagnostics, T-compiler, A-async-await", "label": "medium", "label_id": 2} |
| {"id": "rust_63278", "text": "How to do Zero-fill right shift in rust? | ```rust fn main(){ let i:i32 = -9; println!(\"{}\", i >>> 3) } ```", "label": "medium", "label_id": 2} |
| {"id": "rust_63279", "text": "ICE: instantiated twice | While minimizing https://github.com/rust-lang/rust/issues/63263 I stumbled upon another ICE ```rust #![feature(type_alias_impl_trait)] type Closure = impl FnOnce(); fn c() -> Closure { || -> Closure { || () } } fn main() {} ``` ([Playground](https://play.rust-lang.org/?version=ni | labels: I-ICE, E-needs-test, A-closures, T-compiler, A-impl-trait, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63283", "text": "ICE - 'cannot access a scoped thread local variable without calling `set` first' | Hello, After updating nightly version to `2019-07-31` (also fails on `2019-08-04`), previously working code no longer compiles. I can confirm that it compiles successfully on `nightly-2019-07-30`. EDIT: Happens on `debug` aswell, also doesn't happen on macOS, but I'm not sure whe | labels: I-ICE, T-compiler, A-thread-locals, C-bug, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_63284", "text": "update rustdoc's syntax checker to work with error-recovering lexer | Rustdoc processes code inside of `` ``` `` blocks in two ways: * _First_, the code is [checked](https://github.com/rust-lang/rust/blob/4be067558962c004b638e4c6f162d50f7c0c98b6/src/librustdoc/passes/check_code_block_syntax.rs#L28-L99) for lexer errors * _Second_, lexer-based synta | labels: C-cleanup, T-rustdoclabellowlabel_id |
| idrust_63288textParser silent exit on invalid input | I'm using rustc's parser ([`parse_crate_mod`](https://doc.rust-lang.org/nightly/nightly-rustc/syntax/parse/parser/struct.Parser.html#method.parse_crate_mod) more specifically) as part of a program I'm writing and for some inputs, the parser terminates my program. Using the curren | labels: A-parser", "label": "medium", "label_id": 2} |
| {"id": "rust_63290", "text": "const generics and lifetimes ICE | The following ICE's on _stable_, beta and nightly, even though `const_generics` is nightly only: ```Rust #![feature(const_generics)] use core::marker::PhantomData; struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>); impl Bug<'_, {\}> {} ``` <details> <summary>Backtrace:</summ | labels: I-ICE, T-compiler, C-bug, A-const-genericslabelhighlabel_id |
| idrust_63291textTracking issue for uninitialized constructors for Box, Rc, Arc | Assigning `MaybeUninit::<Foo>::uninit()` to a local variable is usually free, even when `size_of::<Foo>()` is large. However, passing it for example to `Arc::new` [causes at least one copy](https://youtu.be/F1AquroPfcI?t=4116) (from the stack to the newly allocated heap memory) e | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period, requires-nightlylabelquestionlabel_id |
| idrust_63300textICE on generic associated type with a bound referencing the quantified type | I was reading https://varkor.github.io/blog/2019/03/28/idiomatic-monads-in-rust.html and decided to try some of the code samples, but the compiler panicked! ```rust trait Functor<A> { type HigherSelf<T>: Functor<T>; } ``` Crashes with `error: internal compiler error: src/librustc | labels: I-ICE, A-associated-items, T-compiler, C-bug, F-generic_associated_types, glacierlabelhighlabel_id |
| idrust_63301textstd::iter::Rev breaks order or operation with std::iter::Map | Hello, I've just found out that when you use `it.rev().map(...).rev()`, the two `.rev()` seem to cancel each other. While in most cases, this isn't much of an issue, it does cause problems with stuff such as this: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018 | labels: T-libs-api, C-bug, A-iteratorslabelmediumlabel_id |
| idrust_63303textrunning \ after \ build fails | Here is the relevant part... ``` ... Testing rustc_macros stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) [0/45477] Finished release [optimized] target(s) in 0.10s Running build/x86_64-unknown-linux-gnu/stage1-rustc/release/deps/rustc_macros-9c38a09c1d63337a running | labels: T-bootstrap, C-buglabelmediumlabel_id |
| idrust_63305textWarn on using intra-doc links on stable | It would be a significant effort to implement feature-gates in Rustdoc just for intra-doc links so I understand why that hasn't been done. However, because there is no warning I've been unintentionally creating docs with broken links on stable for a while now. I haven't observed | labels: T-rustdoc, C-enhancement, A-stability, A-intra-doc-links", "label": "question", "label_id": 4} |
| {"id": "rust_63313", "text": "librustc/infer/lexical_region_resolve readme points to unreachable url | It's the first link here https://github.com/rust-lang/rust/blob/a6294b762859b3bb86b2a94c6857ae39beea9aeb/src/librustc/infer/lexical_region_resolve/README.md | labels: T-compiler, A-docs, A-NLL, C-buglabellowlabel_id |
| idrust_63322textClosures in const generics cause ICE | Pretty straightforward. The idea is to plug logic into a template. This seems like something that should/could work. ``` #![feature(const_generics)] fn test<const F: &'static dyn Fn(u32) -> u32>(i: u32) -> u32 { F(i) } const F: &'static dyn Fn(u32) -> u32 = &|x| x*x; fn main () { | labels: I-ICE, A-closures, T-compiler, C-bug, A-const-generics, requires-nightly", "label": "high", "label_id": 1} |
| {"id": "rust_63324", "text": "Incorrect `unreachable_code` lint for loops in `try_blocks` | ```rust #![feature(try_blocks)] pub fn foo() { let _: Result<(), ()> = try { loop { // anything here } }; } ``` Here, the entire `loop` expression is reported unreachable, despite not being so. This is similar to https://github.com/rust-lang/rust/issues/54165, and probably has th | labels: A-lints, T-compiler, C-bug, requires-nightly, F-try_blockslabelmediumlabel_id |
| idrust_63326textFile::set_len uses an unsafe cast on Unix | Precisely, `size as off64_t`. The conversion occurs [here](https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/fs.rs#L558) On my system `off64_t` is `i64`. This means that the number will overflow if larger than `i64::max_value()` and become negative. In such case, | labels: T-libs-api, C-buglabelmediumlabel_id |
| idrust_63329textremap-path-prefix affects dep-info | The `--remap-path-prefix` flag affects paths in dep-info files. This causes some problems witth Cargo. Cargo uses these paths to detect if any source file has been modified. Since the common use case for `--remap-path-prefix` is to rewrite to some artificial path (like `/rustc/$H | labels: A-driver, T-compiler, C-buglabelmediumlabel_id |
| idrust_63335textWarn about path change for `#[doc(include)]` | Recently (https://github.com/rust-lang/rust/pull/60938) the path root for `#[doc(include)]` files was changed. This change makes a lot of sense, and it's not difficult to update, but there is now a situation where code using the old path roots won't compile on new nightlies and v | labels: T-rustdoc, C-enhancement, A-diagnostics, F-external_doclabellowlabel_id |
| idrust_63336textIs the order of procedural macro attribute execution guaranteed per item? | Hiya, is there an intentional guarantee that procedural macro attributes are executed outward-in per item? To illustrate ([repo](https://github.com/azriel91/proc_macro_attribute_order)): ```rust // attr_* appends a new field to the struct #[attr_0(u8)] #[attr_1(u16)] #[attr_2(u32 | labels: A-attributes, A-macros, T-langlabelmediumlabel_id |
| idrust_63339textremap-debuginfo causes some rustc tests to fail | Setting `remap-debuginfo` to `true` in `config.toml` will cause a few tests to fail. They are: - `ui/impl-trait/impl-generic-mismatch.rs` - `ui/consts/const-size_of-cycle.rs` - `ui/type_length_limit.rs` The issue is that these tests use `$SRC_DIR` in their `.stderr` output, but w | labels: A-testsuite, A-debuginfo, T-compiler, C-buglabellowlabel_id |
| idrust_63344textRust execute the SHELL command 'git --no-pager log --author=authorname' cannot get outputlabelmediumlabel_id |
| idrust_63349textRecompiling causes panic | Making changes to code in modules that compile to WASM and running `cargo build --release` results in a panic. This is the project: https://github.com/paritytech/substrate Immediately running `cargo clean && cargo build --release` will allow successful compilation. Also upgrading | labels: I-ICE, P-high, T-compiler, A-incr-comp, C-bug, E-needs-mcvelabelquestionlabel_id |
| idrust_63351textIntra-rustdoc links do not work for all primitives | Coming from the tracking issue #43466. I'm trying to link to [`slice::rotate_left`](https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left) and it doesn't seem to be supported I tested [`pointer::is_null`](https://doc.rust-lang.org/stable/std/primitive.pointer.html | labels: T-rustdoc, E-hard, E-mentor, C-bug, A-intra-doc-linkslabelquestionlabel_id |
| idrust_63355textICE with type_alias_impl_trait: errors selecting obligation during MIR typeck | ```rust #![feature(type_alias_impl_trait)] pub trait Foo {} pub trait Bar { type Foo: Foo; fn foo() -> Self::Foo; } pub trait Baz { type Foo: Foo; type Bar: Bar<Foo = Self::Foo>; fn foo() -> Self::Foo; fn bar() -> Self::Bar; } impl Foo for () {} impl Bar for () { type Foo = FooIm | labels: E-needs-test, T-compiler, A-impl-trait, C-bug, F-type_alias_impl_trait, requires-nightlylabelhighlabel_id |
| idrust_63357text`std::iter::count` and `std::iter::count_with` functions | It would be great to have these functions, which would behave similarly to the `once` / `once_with` and `repeat` / `repeat_with` functions, except they would iterate a fixed number of times (given by a `usize`) instead of just once/infinitely. | labels: T-libs-api, C-feature-request, A-iteratorslabelmediumlabel_id |
| idrust_63359textA way to force the compiler to accept falsely named \ | I'm trying to execute some data in Rust, however I'm getting this error: ``` error[E0080]: it is undefined behavior to use this value --> src/main.rs:9:1 | 9 | / const executable_data: extern \ fn() = unsafe { 10 | | std::mem::transmute(address) 11 | | }; | |__^ type validation | labels: T-lang, C-feature-request, A-const-evallabelmediumlabel_id |
| idrust_63361textLink errors on MSVC Nightly since around 2019-07-13 | Any crate that uses `std::sync::Arc` fails to compile with a link error saying `unresolved external symbol __atomic_fetch_sub_8` Test case on `rustc 1.38.0-nightly (6a91782b7 2019-08-06)` ```rust fn main() { let test = std::sync::Arc::new(32); } ``` outputs: ``` link_error-44aa39 | labels: A-linkage, A-LLVM, O-windows, O-linux, regression-from-stable-to-nightly, T-compilerlabelcritical_buglabel_id |
| idrust_63362textInconsistent behavior between check and build when handling duplicate #[no_mangle] static values | <!-- Thanks for filing a 🐛 bug report 😄! --> (if this issue is better suited to rust-lang/rust, please let me know and I'll post it there) **Problem** `cargo check` and `cargo build` behave differently when handling two identically-named `#[no_mangle]` static values defined in di | labels: A-metadata, T-compiler, T-cargo", "label": "medium", "label_id": 2} |
| {"id": "rust_63364", "text": "ICE when iterating over a `u16` range whose bounds exceed 64k | An ICE is observable with this code: ``` fn part(_: u16) -> u32 { 1 } fn main() { for n in 100_000.. { let _ = part(n); } } ``` ``` thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', src/librustc_lint/types.rs:79:12 note: Run with `RUST_BACKTRACE=1 | labels: E-easy, A-lints, I-ICE, T-compiler, regression-from-stable-to-stable, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63365", "text": "Confusing error message with FnMut | https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=12bbb938650f4835979fafc55ce9c5ea ```rust fn main() { fn do_twice<F>(mut func: F) where F: FnMut() { func(); func(); } let mut x: usize = 1; { // let add_two_to_x = || x += 2; // compliled let add_two_to_x = | labels: C-enhancement, A-diagnostics, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63367", "text": "'cargo check' and 'cargo build' do not behave in the same way? | ## Problem This code, why 'cargo check' can pass, but 'cargo build' can't: ```rust fn main() { let a = [1, 2, 3, 4, 5]; const INDEX: usize = 10; let element = a[INDEX]; println!(\, element); } ``` cargo check: ``` $ cargo check Checking test v0.1.0 (/home/rust/te | labels: T-compilerlabelmediumlabel_id |
| idrust_63372text\ error missing helpful note on private traits | If I write this simple, but incorrect program, rust gives me a useful output message: ```rust pub trait MyTrait {} impl<T: Copy> MyTrait for T {} impl MyTrait for String {} ``` The output here is: ``` Compiling conflicttest v0.1.0 (/home/daboross/conflicttest) error[E0119]: confl | labels: C-enhancement, A-diagnostics, A-trait-system, T-compilerlabellowlabel_id |
| idrust_63375textConfusing documentation for compile_error!() | Referring to https://github.com/rust-lang/rust/blob/db7c773a6be2f050d1d1504763819ea3916f5428/src/libcore/macros.rs#L681-L683 > It's the compiler-level form of panic!, which emits an error at runtime, rather than during compilation. It is unclear whether the \"which\" refers to \"pan | labels: C-enhancement, A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_63384", "text": "Unnecessary mul when multiplying u128 by small number | For this function ```rust pub fn mul_u128_10(a: u128) -> (u8, u128) { let (a_hi, a_lo) = (a >> 64, a & !(!0 << 64)); let (ten_a_hi, ten_a_lo) = (a_hi * 10, a_lo * 10); let (wrapped, overflow) = (ten_a_hi << 64).overflowing_add(ten_a_lo); ((ten_a_hi >> 64) as u8 + u8::from(overflo | labels: A-LLVM, I-slow, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63385", "text": "Unhelpful error message with async usage of Iterator | I'm not sure, if the behaviour itself is a bug or not, but the error message is surely not helpful. Code: ```rust #![feature(async_await)] use futures::future::FutureExt; use futures::future::TryFutureExt; use futures::stream::StreamExt; fn main() { tokio::run(function().unit_err | labels: A-diagnostics, T-compiler, A-async-await, AsyncAwait-Triaged, requires-nightlylabelmediumlabel_id |
| idrust_63388text`&self` lifetime elision with two parameters does not work with `async fn` | Originally reported in https://github.com/rust-lang/rust/pull/63383#discussion_r312128268. ```rust #![feature(async_await)] #![feature(nll)] // Without it you also get //~^ ERROR cannot infer an appropriate lifetime struct A; impl A { async fn foo(&self, f: &u32) -> &A { self } } | labels: A-type-system, A-lifetimes, T-compiler, A-inference, C-bug, A-async-awaitlabelquestionlabel_id |
| idrust_63390textDecide whether to suggest anything when encountering `break` and expecting `!` | https://github.com/rust-lang/rust/pull/63337#discussion_r312153076 introduces suggestions when encountering `break` without a value in a context that expects a value other than `()`. In the case that the expected value is `!` we don't suggest anything. Once `!` is stabilized, we | labels: A-diagnostics, P-low, T-compiler, A-suggestion-diagnostics, F-never_type", "label": "question", "label_id": 4} |
| {"id": "rust_63391", "text": "Improve diagnostic for `break` in `async { ... }` block | With: ```rust #![feature(async_await)] fn foo() { async { break; }; } ``` you get: ```rust error[E0267]: `break` inside of a closure --> src/lib.rs:5:9 | 5 | break; | ^^^^^ cannot break inside of a closure ``` Note how it references \"a closure\" which seems confusing for a user wh | labels: C-enhancement, A-diagnostics, T-compiler, A-async-await, AsyncAwait-Triaged, requires-nightly", "label": "low", "label_id": 3} |
| {"id": "rust_63392", "text": "rustdoc ICE \"tried to get index of builtin macros crate\" | ``` Documenting fuchsia_vfs_pseudo_fs v0.1.0 (/b/s/w/ir/k/out/default/gen/garnet/public/rust/fuchsia-vfs/pseudo-fs/pseudo-fs) error: internal compiler error: src/librustc/hir/def_id.rs:51: Tried to get crate index of builtin macros crate thread 'rustc' panicked at 'Box<Any>', src | labels: T-rustdoc, I-ICE", "label": "high", "label_id": 1} |
| {"id": "rust_63393", "text": "Fix ambiguity issue with associated_type_bounds | Follow up of #61738. These two particular cases could not be refactored due to an ambiguity issue: --- https://github.com/rust-lang/rust/blob/2d1a551e144335e0d60a637d12f410cf65849876/src/libcore/iter/adapters/flatten.rs#L70-L76 With `#![feature(associated_type_bounds)]` ```rust i | labels: A-associated-items, T-compiler, C-bug, E-needs-mcve, requires-nightly, F-associated_type_bounds", "label": "question", "label_id": 4} |
| {"id": "rust_63396", "text": "Clean up `parse_bottom_expr` to use list parsing utility | _From https://github.com/rust-lang/rust/pull/63337#discussion_r312221122_ The following code should be using the common list parsing utilities: https://github.com/rust-lang/rust/blob/2d1a551e144335e0d60a637d12f410cf65849876/src/libsyntax/parse/parser.rs#L2052-L2070 CC @Centril | labels: A-frontend, C-cleanup, A-parser, T-compiler", "label": "question", "label_id": 4} |
| {"id": "rust_63398", "text": "Wrong block referenced when emitting E0728 | The following code ([Playground link](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=3e36922f1d43ba54d23783769a15e381)) ```rust #![feature(async_await)] async fn do_the_thing() -> u8 { 8 } fn main() { let x = move || {}; let y = do_the_thing().await; } ` | labels: A-diagnostics, T-compiler, C-bug, A-async-await, AsyncAwait-Triaged", "label": "medium", "label_id": 2} |
| {"id": "rust_63405", "text": "Wrong error message with closures when variable moved | https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c4b92f189e40cc2a6e8a6d13a24e4ee8 ```rust struct T(u32); fn by_value(_: T) {} fn by_ref(_: &T) {} fn main() { let z = T(123); let closure = || { by_ref(&z); by_value(z); }; closure(); by_value(z); } ``` Outpu | labels: A-diagnostics, A-closures, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63409", "text": "cleanup: remove needless reference to Instance | At least one case of this is in src/librustc_mir/interpret/snapshot.rs on line 305, but grepping is also advisable. _Originally posted by @eddyb in https://github.com/rust-lang/rust/pull/63287_ | labels: C-cleanup, T-compiler, A-const-eval", "label": "low", "label_id": 3} |
| {"id": "rust_63414", "text": "E0529 should suggest turning the matched `Vec` into a slice | ``` error[E0529]: expected an array or slice, found `std::vec::Vec<{integer}>` --> src/test/ui/suggestions/vec-macro-in-pattern.fixed:4:14 | LL | Some([x]) => () | ^^^ pattern cannot match with input type `std::vec::Vec<{integer}>` error: aborting due to previous error ``` CC #63 | labels: C-enhancement, A-diagnostics, T-compiler, A-suggestion-diagnostics, D-newcomer-roadblock", "label": "low", "label_id": 3} |
| {"id": "rust_63417", "text": "Building LLVM with Clang fails | In `config.toml`, under `[target.x86_64-unknown-linux-gnu]`, one can set `cc` and `cxx` to configure the C/C++ compiler used for building LLVM. When using clang/clang++, regardless of whether `use-libcxx` is set under `[llvm]`, the `LLVM_LIBSTDCXX_MIN` compile test fails due to a | labels: A-LLVM, T-compiler, T-bootstrap, C-bug", "label": "low", "label_id": 3} |
| {"id": "rust_63422", "text": "Unexpected error in for loop: use of possibly uninitialized | The following code: ``` fn main() { let foo = 10; let result; for _i in 1..=1 { if foo == 10 { result = true; break; } match foo { 7 => { result = true; } _ => { result = false; break; } } break; } println!(\"{}\", result) } ``` yields the following error: ``` Compiling playground ", "label": "low", "label_id": 3} |
| {"id": "rust_63430", "text": "[ICE] C-variadic functions are only valid with one or more fixed arguments | This ICEs (see title) because of the call: ```rust extern { fn foo(...); } fn main() { unsafe { foo(1, 2, 3); } } ``` That's because the definition of `foo` errored in 1.34, but doesn't since 1.35: ```rust extern { fn foo(...); } ``` cc @dlrobertson (found while working on https: | labels: A-type-system, I-ICE, T-compiler, regression-from-stable-to-stable", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63434", "text": "Compilation panicked | Compilation exited abnormally when compiling [this code](https://github.com/gcao/gene.rs/blob/f861fba0d25f6a6de2f01a680bd39eebcf40b7e2/src/compiler.rs#L162) I know my code has a lot of issues but the compiler should either pass or fail instead of panicking Steps to reproduce git | labels: I-ICE, A-borrow-checker, T-compiler, C-bug, fixed-by-NLL", "label": "high", "label_id": 1} |
| {"id": "rust_63435", "text": "Rustdoc search result links to 404 | On the following page: https://doc.rust-lang.org/nightly/nightly-rustc/rustc/?search=niche_start clicking on any of the two search results yields a 404 error. | labels: T-rustdoc, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63436", "text": "debuginfo/empty-string.rs test failed on Linux | When I run `x.py test` on Linux, `debuginfo/empty-string.rs` test failed with the following error: ```rust Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) running 122 tests .iiiii..ii.....i..i...i..i.iFi..i.ii..iii. | labels: A-testsuite, O-linux, A-debuginfo, T-compiler, C-bug", "label": "question", "label_id": 4} |
| {"id": "rust_63438", "text": "\"Structural match\" annotations should be moved from struct/enum items to impl items | \"Structural match\" property of a type means that the constants of this type can be used in patterns (https://github.com/rust-lang/rust/issues/31434) or in const generics in the future. Right now this property can be given to a type in two ways: - `#[structural_match]` attribute, | labels: A-type-system, A-resolve, A-trait-system, A-macros, T-lang, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63439", "text": "const_prop makes RUST_CTFE_BACKTRACE unusable | The idea behind `RUST_CTFE_BACKTRACE=1` was that it should only show a backtrace (of where a Miri error originates) when an error is actually shown to the user. And that worked fine when I implemented it. But since then, something changed in const_prop, and now I get thousands of | labels: T-compiler, C-bug, A-const-eval, A-miri", "label": "medium", "label_id": 2} |
| {"id": "rust_63443", "text": "[rustdoc] on search results, when pressing ESC, either remove text in URL or don't remove text in search bar | I think the best be the second: not removing text from search bar. | labels: T-rustdoclabelmediumlabel_id |
| idrust_63444textRustc panics with comments with non-ascii characters after an error | Running this on playground: ```rust struct A {} fn main() { let a = A; // é } ``` Panics rustc: ``` Compiling playground v0.0.1 (/playground) thread 'rustc' panicked at 'byte index 44 is not a char boundary; it is inside 'é' (bytes 43..45) of `struct A {} fn main() { let a = A; / | labels: A-diagnostics, I-ICE, A-parser, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63445", "text": "rustc hangs on this particular invalid `if let` syntax | The following code causes rustc to hang, consuming 100% CPU on one core, and unbounded memory until it is killed by the OOM killer: fn main() { let condition = Some(true); (if let Some(x) = condition) && x { println!(\"condition is present and true\"); } } This is the output from ` | labels: A-parser, T-compiler, C-bug, I-hang", "label": "medium", "label_id": 2} |
| {"id": "rust_63447", "text": "Incorrect Code Generation | https://godbolt.org/z/Q0WgsL ```rust use std::os::raw::c_char; use std::ffi::c_void; const RTLD_NEXT: *mut c_void = -1i64 as *mut c_void; extern \"C\" { fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void; } #[allow(non_camel_case_types)] type pid_t = i32; #[inline(", "label": "medium", "label_id": 2} |
| {"id": "rust_63454", "text": "Some(..).is_some() is false for redox_syscall datastructure | When using the redox_syscall crate, the compiler fail at an `assert!(Some(..).is_some())`. This bug however is only present with the crate: locally defining the same datastructure runs perfectly. Equality still works, though, as the fields can be compared. ## Minimum reproducible", "label": "medium", "label_id": 2} |
| {"id": "rust_63456", "text": "std::env::var and std::env::var_os do not document panic on key containing null byte | `env::remove_var` and `env::set_var` document that they panic when the key contains a null byte, but `env::var` and `env::var_os` do not document this behavior. https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e43934f459b10424f374f20db846f092 | labels: A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_63457", "text": "Consider move libarena and libgraphviz out of tree | These code doesn't get touched a lot. So maybe it makes sense to move them out instead of generating auto publish packages every day. | labels: C-enhancement, T-compilerlabellowlabel_id |
| idrust_63458textincompatible types even if and else uses the same code... | ```rust error[E0308]: if and else have incompatible types --> src/main.rs:98:17 | 87 | / if query[\] != json!(-1) { 88 | | Client::new() | _|_________________- 89 | | | .post(&url) 90 | | | .json(&query) 91 | | | .send() ... | | 95 | | | }) 96 | | | .map_err(error::ErrorIntelabelmediumlabel_id |
| idrust_63460textRecursive macro call inside concat macro fails to find macros referred to by $crate | ```rust #[macro_export] macro_rules! separator { () => { \ }; } #[macro_export] macro_rules! concat_separator { ( $e:literal, $($other:literal),+ ) => { concat!($e, $crate::separator!(), $crate::concat_separator!($($other),+)) }; ( $e:literal ) => { $e } } fn main() { println!( | labels: A-resolve, A-macros, T-compiler, C-buglabelmediumlabel_id |
| idrust_63466textsegfault with target-feature=+soft-float | The following program currently segfaults on x86_64-unknown-linux-gnu when compiling with stable rust 1.36.0 with soft-float, and running with TARGET unset. ```rust use std::env; fn main(){ let target = env::var(\).unwrap(); println!(\, target); } ``` Here's the output: | labels: O-linux, P-high, T-compiler, I-unsound", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63476", "text": "nightly version fails: invalid version 3 on git_proxy_options; class=Invalid (3) | On FreeBSD 12 amd64 rust-nightly-1.38.0.20190811_1 fails: ``` $ cargo build Updating crates.io index error: failed to load source for a dependency on `image` Caused by: Unable to update registry `https://github.com/rust-lang/crates.io-index` Caused by: failed to fetch `https://gi | labels: O-freebsd, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63477", "text": "Typo in `println` docs. | There is an unclosed parenthesis in the [docs](https://doc.rust-lang.org/std/macro.print.html) for [`println!`](https://github.com/rust-lang/rust/blob/master/src/libstd/macros.rs#L122). The line in question is [line 122](https://github.com/rust-lang/rust/blob/master/src/libstd/ma", "label": "question", "label_id": 4} |
| {"id": "rust_63478", "text": "Lots of \"cannot find in scope\" errors can make name resolution extraordinarily slow | I missed a `use` and found a `check` that takes _over 4 minutes_ to fail. Repro: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=aaac7e403ced051c0e4165df25a455a5 time-passes blames this on \"name resolution\" | labels: A-diagnostics, A-resolve, I-compiletime, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63479", "text": "Regression: Matching on function pointers fails when one of the formal params implements custom PartialEq | A contrived [playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=401774c0d5d389dc0d621608553f7e99) example: ```rust #[derive(Eq)] struct A { a: i64 } impl PartialEq for A { #[inline] fn eq(&self, other: &Self) -> bool { self.a.eq(&other.a) } } typ | labels: P-high, T-compiler, regression-from-stable-to-beta, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63481", "text": "Compiler is awkwardly happy with fns without Box | Hi, I'm writing a functional programming library in Rust, and I found some weird behaviour with typing. In the below code to emulate `Apply` ``` use crate::functor::Functor; use crate::hkt::{HKT, HKT3}; pub trait Apply<A, F, B>: Functor<A, B> + HKT3<A, F, B> where F: FnOnce(A) ->labelmediumlabel_id |
| idrust_63484textUsing profile-overrides results in both optimized and unoptimized versions of the same crate in linked executable | I'm trying to use the \"profile-overrides\" feature in cargo. The tracking issue for this feature is here: https://github.com/rust-lang/rust/issues/48683 The documentation for this is here: https://doc.rust-lang.org/cargo/reference/unstable.html#profile-overrides I'm trying to buil | labels: T-cargo, C-buglabelmediumlabel_id |
| idrust_63496textICE when trying to reference an associated trait constant | ``` trait ToBytes { const SIZE: usize; fn a(self) -> [u8; ToBytes::SIZE]; // error happens because a previous type error happened I think fn b(self) -> [u8; ToBytes::SIZE]; } ``` ## Error message `error: internal compiler error: src/librustc/traits/codegen/mod.rs:51: Encountered | labels: A-codegen, I-ICE, E-needs-test, P-medium, A-associated-items, T-compilerlabelhighlabel_id |
| idrust_63500textasync fn methods and impl `'_` elision do not interact correctly | As [reported by @cramertj](https://github.com/rust-lang/rust/issues/63225#issuecomment-519163528), this example: ```rust #![feature(async_await)] struct Foo<'a>(&'a u8); impl Foo<'_> { async fn bar() {} } ``` currently produces this error: ``` error[E0261]: use of undeclared life | labels: A-lifetimes, T-compiler, A-inference, A-async-await, AsyncAwait-Polishlabelmediumlabel_id |
| idrust_63504textWhen needing type annotation do not suggest using `impl Trait` or closure | _Subset of https://github.com/rust-lang/rust/issues/63502_ When encountering ``` #![feature(async_await)] use std::io::Error; fn make_unit() -> Result<(), Error> { Ok(()) } fn main() { let fut = async { make_unit()?; Ok(()) }; } ``` Do not suggest \, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : in progress\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : can't find crate `core`\" on nightly for thumbv7em-none-eabi | The following steps will work and compile on stable, but not on nightly. # Steps to reproduce ``` rustup target add thumbv7em-none-eabi cargo new --lib compile-fail && cd compile-fail echo 'libc=\' >> Cargo.toml # or cargo add libc@0.2.61 echo '#![no_std]' > src/lib.rs ca | labels: T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63520", "text": "run-make-fulldeps/linker-output-non-utf8 failure | when running `x.py test` locally I get errors in the test `run-make-fulldeps/linker-output-non-utf8`: ``` ---- [run-make] run-make-fulldeps/linker-output-non-utf8 stdout ---- error: make failed status: exit code: 2 command: \"make\" stdout: ----------------------------------------- | labels: A-linkage, A-testsuite, P-medium, T-compiler, T-bootstrap", "label": "medium", "label_id": 2} |
| {"id": "rust_63523", "text": "Any rust-related command opens non-unicode file called \"cargo\" or \"rustup\" | When using any of the rust related commands, it opens a file that has 3 identifiable characters at the top and a mixed amount of bullcrap in the rest. \"ELF\" is at the top. Please take a look for yourself cause It's causing me tons of problems. [rustup.txt](https://github.com/rustlabelmediumlabel_id |
| idrust_63526textInclude type bindings on string representation of `impl Trait` | _Follow up to https://github.com/rust-lang/rust/pull/63507#discussion_r313287274_ Include type arguments for traits when displaying `impl Trait`. For example, the following: ``` error[E0282]: type annotations needed for `impl std::future::Future` --> $DIR/cannot-infer-async-enabl | labels: C-enhancement, A-diagnostics, T-compiler, A-async-await, AsyncAwait-Triagedlabelquestionlabel_id |
| idrust_63532textDate time chronology calendar JSR-310 capabilities within rust | I understand JSR-310 was mentioned earlier. I understand others have mentioned this as issue on github, but why has the issue been closed when I haven't seen the capabilities as being implemented yet? If they have been implemented, please indicate where they are. Thank you https:", "label": "medium", "label_id": 2} |
| {"id": "rust_63533", "text": "Improve error message for `.await` in 2015 edition | Trivial example: ```rust fn f(x: std::pin::Pin<&mut dyn std::future::Future<Output=()>>) { x.await; } ``` Output on current nightly: ``` error[E0609]: no field `await` on type `std::pin::Pin<&mut dyn std::future::Future<Output = ()>>` --> src/lib.rs:2:7 | 2 | x.await; | ^^^^^ unk | labels: A-type-system, C-enhancement, A-diagnostics, T-compiler, A-async-await", "label": "low", "label_id": 3} |
| {"id": "rust_63536", "text": "ICE on roman numeral macro example | ## Description of Problem I'm trying to run the roman numeral compiler plugin code in the documentation ([here](https://doc.rust-lang.org/nightly/unstable-book/language-features/plugin.html)). The compiler panics with this error: ``` thread 'rustc' panicked at 'cannot access a sc", "label": "high", "label_id": 1} |
| {"id": "rust_63547", "text": "CI is shown stuck on github | The CI seems to be stuck on Github and jobs are shown running for more than a day but it has actually completed in Azure.   -> std::fmt::Result { write!(f, \"{}\", ", "label": "medium", "label_id": 2} |
| {"id": "rust_63551", "text": "Codegen backend handles compare binops for the unit type | https://github.com/rust-lang/rust/blob/c43d03a19f326f4a323569328cc501e86eb6d22e/src/librustc_codegen_ssa/mir/rvalue.rs#L586-L592 libcore however doesn't use those for the implementations for `PartialEq` and `PartialOrd` for the unit type. https://github.com/rust-lang/rust/blob/c4 | labels: E-easy, C-cleanup, A-codegen, E-mentor, T-compiler, E-help-wantedlabellowlabel_id |
| idrust_63552textCodegen forgets array size when used with iterators | Consider these three functions: ``` pub fn in_range1(x: [usize; 3], m: usize) -> bool { (x[0] < m) && (x[1] < m) && (x[2] < m) } pub fn in_range2(x: [usize; 3], m: usize) -> bool { for k in &x { if *k >= m { return false; } } true } pub fn in_range3(x: [usize; 3], m: usize) -> bo | labels: A-LLVM, I-slow, P-medium, T-compiler, regression-from-stable-to-stable, C-buglabelcritical_buglabel_id |
| idrust_63555textSporadic linker failure | I compiled a rather large project and got the error below: ``` error: linking with `cc` failed: exit code: 1 | = note: \ \ \ \ \ \ | labels: A-linkage, T-compiler, C-buglabelmediumlabel_id |
| idrust_63562textLinking with extern function in Wasm | I am trying to use functions from an external module and importing them like that: ```rust #[link(wasm_import_module = \)] extern \ { #[link_name=\] pub fn allocate_external(size: usize) -> i32; #[link_name=\] pub fn deallocate_external(ptr: i32, size | labels: A-linkage, T-compiler, O-wasmlabelmediumlabel_id |
| idrust_63566textMeta tracking issue for RFC 1892, \ | This issue tracks the progress of `MaybeUninit<T>` in general. The type was introduced in https://github.com/rust-lang/rfcs/pull/1892. The old tracking issue is https://github.com/rust-lang/rust/issues/53491. This issue is not for discussion about specific extensions to `MaybeUni | labels: metabug, T-lang, T-libs-api, C-tracking-issue, Libs-Tracked, A-raw-pointerslabelquestionlabel_id |
| idrust_63567textTracking issue for `#![feature(maybe_uninit_extra,const_maybe_uninit_write)]` | This is a tracking issue for the RFC \ (rust-lang/rfcs#1892). This issue specifically tracks the following unstable methods: ```rust impl<T> MaybeUninit<T> { pub unsafe fn assume_init_read(&self) -> T { ... } pub unsa | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period, requires-nightlylabelmediumlabel_id |
| idrust_63568textTracking issue for `#![feature(maybe_uninit_ref)]` | This is a tracking issue for the RFC \ (rust-lang/rfcs#1892). This issue specifically tracks the following unstable methods: ```rust impl<T> MaybeUninit<T> { pub unsafe fn assume_init_ref(&self) -> &T { ... } pub unsa | labels: T-lang, T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-periodlabelmediumlabel_id |
| idrust_63569textTracking issue for `#![feature(maybe_uninit_slice)]` | This is a tracking issue for the RFC \ (rust-lang/rfcs#1892). Most of this has been stabilized, this issue now only tracks the below unstable methods. ### Public API ```rust impl<T> [MaybeUninit<T>] { pub unsafe fn as | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period, requires-nightlylabelquestionlabel_id |
| idrust_63576textImplement @argsfile to read arguments from command line | Many tools, such as gcc and gnu-ld, support \ - that is, being able to specify @file on the command line. Implemented in https://github.com/rust-lang/rust/pull/63175 This implements a straightforward form where each argument is on a separate line in a text file. This a | labels: A-driver, T-compiler, C-tracking-issue, disposition-merge, finished-final-comment-period, A-CLIlabelquestionlabel_id |
| idrust_63578textSIGSTKSZ may be too small to handle stack overflow exact CPU model and the Linux version | [This ticket shows](https://bugs.python.org/issue21131) that python's test_faulthandler.test_register_chain() crashed on ppc64 and ARM64 on Linux 3.10 and newer. It seems that rust has the [same problem](https://github.com/rust-lang/rust/blob/c43d03a19f326f4a323569328cc501e86eb6d | labels: T-libs-api", "label": "medium", "label_id": 2} |
| {"id": "rust_63581", "text": "`miri` no longer builds after rust-lang/rust#63575 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#63575, I observed that the tool miri no longer builds. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @Centril, do you think you would have tim | labels: P-medium, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63585", "text": "Cleanup: Use `#[rust_intrinsic]` and nix `rust-intrinsic` et. al | Per @eddyb's suggestion (https://github.com/rust-lang-nursery/reference/pull/652#discussion_r314206468): > Not sure these should be documented, we've been meaning to remove all 3 for years... > cc @oli-obk at least for intrinsics we could maybe have an intermediary stage where we | labels: C-cleanup, T-compiler, A-intrinsics", "label": "question", "label_id": 4} |
| {"id": "rust_63589", "text": "Removing the exact lint count from the readme? | Addition and deprecation of multiple lints in a short period of time has regularly caused merge conflicts because of the exact lint count at the top of the README: `There are 310 lints included in this crate!` Does anyone feel like the exact count is worth having? Removing the ex", "label": "medium", "label_id": 2} |
| {"id": "rust_63590", "text": "CStr::from_ptr should be documented to not allow strings bigger than isize::MAX | In #53784, `slice::from_raw_parts` was documented to not allow slices larger than `isize::MAX` bytes. However, `CStr::from_ptr` is not documented to have the same requirement, despite allowing the user to obtain a slice larger than `isize::MAX` bytes with its `to_bytes` method. | labels: C-enhancement, A-FFI, A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_63591", "text": "Combination of TAIT and ATB does not allow projection (unsatisfied bound) | This should pass but does not: ```rust // check-pass #![feature(associated_type_bounds)] #![feature(type_alias_impl_trait)] fn main() {} trait Bar { type Assoc; } trait Thing { type Out; fn func() -> Self::Out; } struct AssocIsCopy; impl Bar for AssocIsCopy { type Assoc = u8; } i | labels: T-compiler, C-bug, F-type_alias_impl_trait, F-associated_type_bounds", "label": "medium", "label_id": 2} |
| {"id": "rust_63593", "text": "Rust treat Self as dynamic when it shouldn't | Here is a sample code: ```rust trait Inner<S> {} trait MyTrait { fn something<I: Inner<Self>>(i: I); } ``` Which fails to compile with > error[E0277]: the size for values of type `Self` cannot be known at compilation time --> src/lib.rs:4:5 | 4 | fn something<I: Inner<Self>>(i: I | labels: A-trait-system, A-associated-items, T-compiler, C-bug, requires-nightly, F-associated_type_defaultslabelmediumlabel_id |
| idrust_63594textIncorrectly-/Un-spanned error with `type Out = Box<dyn Bar<Assoc: Copy>>;` | With the following, the error appears in the wrong place (1), while it should be at (2). ```rust //~ ERROR the trait bound `std::string::String: std::marker::Copy` is not satisfied // (1) --^ #![feature(associated_type_bounds)] fn main() {} trait Bar { type Assoc; } trait Thing { | labels: A-diagnostics, A-associated-items, T-compiler, C-bug, F-associated_type_boundslabelmediumlabel_id |
| idrust_63597textdocument that target features are unsafe | When discussing https://github.com/rust-lang/rust/issues/63466 in the compiler team triage meeting, it became clear that target-features ought to be considered generally unsafe. We should document this fact in the `-Chelp` and in the [rustc book](https://doc.rust-lang.org/rustc/i | labels: P-medium, T-compiler, A-docslabellowlabel_id |
| idrust_63598textConfusing error message with lifetime in trait | [Given](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=381d0b8ca9363a314dd16bef11da7c4d): ```rust #![feature(async_await)] trait Foo<'a> {} async fn foo<T: Foo>() { unimplemented!(); } ``` ``` error[E0637]: `&` without an explicit lifetime name cannot be | labels: A-diagnostics, A-lifetimes, A-trait-system, T-compiler, regression-from-stable-to-stable, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63599", "text": "Stabilize RFC 2451, re-rebalance coherence | # Stabilization Proposal I am writing to propose we stabilize the implementation of [RFC 2451], \"re-rebalancing coherence\" ([tracking issue]). [RFC 2451]: https://rust-lang.github.io/rfcs/2451-re-rebalancing-coherence.html [tracking issue]: https://github.com/rust-lang/rust/issue | labels: T-lang, disposition-merge, finished-final-comment-period, F-re_rebalance_coherence", "label": "medium", "label_id": 2} |
| {"id": "rust_63601", "text": "`miri` no longer builds after rust-lang/rust#63592 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#63592, I observed that the tool miri no longer builds. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @Centril, do you think you would have tim | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63605", "text": "1.37 source component packaging looks different from previous versions | Hi, Apologies if reporting this here isn't the most appropriate place, but thought someone else may run into it as well. It appears there're some material differences in how the Rust 1.37 release is packaged, namely around the source download. The [tarball](https://static.rust-la | labels: T-infra, C-bug", "label": "question", "label_id": 4} |
| {"id": "rust_63608", "text": "SIGSEGV on arm | Hello. I've been directed to create a issue here after a talk on one of the rust discord servers. Hopefully I got right. So I'm trying to compile one of my projects on a Raspberry Pi. ``` nightly-armv7-unknown-linux-gnueabihf (default) rustc 1.38.0-nightly (c43d03a19 2019-08-14) | labels: I-crash, O-Arm, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63616", "text": "Handle partial initialization correctly in generators | Problem: consider something like the following, ```rust let gen = || { let _x = (yield 5; panic!()); }; ``` This can result in a local saved in our generator of type `((), !)`, which is partially initialized across the yield. In the layout code we claim that fields are all fully | labels: C-enhancement, T-compiler, A-MIR, A-coroutines, A-async-await, AsyncAwait-Triaged", "label": "low", "label_id": 3} |
| {"id": "rust_63619", "text": "Confusing error message when a trait bound is unsatisfied due to lack of mutability | In this code, `fp` should have been declared as a mutable reference, and the compiler gives you a nice clear error message saying so: ```rust use std::env::args; use std::fs::File; use std::io::{stdout, Write}; fn main() { let mut args = args(); let _ = args.next(); let dest = ar | labels: C-enhancement, A-diagnostics, A-trait-system, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63622", "text": "Short-circuit behavior and order in expressions results in 15x performance difference? | I have just started playing with Rust again via Project Euler Problem 4 and I noticed some interesting short-circuit behavior in expressions. In the two functions below, `v2()` is approximately 15 times faster than `v1()` just due to the ordering in the `if`. It's great that therlabelmediumlabel_id |
| idrust_63623text[llvm build] Host compiler must support std::atomic | I cannot build rustc locally with commit f7af19c279. The build log is: ```bash % ./x.py test src/test/ui --pass check Updating only changed submodules Submodules updated in 0.06 seconds Finished dev [unoptimized] target(s) in 0.21s Building stage0 std artifacts (x86_64-unknown-li | labels: T-compiler, T-bootstraplabelquestionlabel_id |
| idrust_63626textC FFI functions have incorrect signatures in wasm bundle when targeting wasm32-unknown-unknown | We have a crate called `mruby-sys` which uses the `cc` crate to build a C static library. Building this library fails to link when building the `wasm32-unknown-unknown` target due to function signature mismatches. When using the same build process for the C code with clang-8, the | labels: A-FFI, T-compiler, O-wasmlabelmediumlabel_id |
| idrust_63628textCrater runs for Rust 1.38.0 | cc @rust-lang/release | labels: S-waiting-on-reviewlabelmediumlabel_id |
| idrust_63629textWasm bundle for sys crate with FFI exports is empty | I'm trying to compile [`mruby-sys`](https://github.com/artichoke/artichoke/tree/master/mruby-sys) to wasm. `mruby-sys` builds a C static library using the `cc` crate. `cc` generates two wasm files, one of which I can't read with `0000004: error: bad magic value` error. The other | labels: A-FFI, T-compiler, O-wasm, C-buglabelmediumlabel_id |
| idrust_63646text`RangeToInclusive` code-generation much worse than equivilent `RangeTo` | I have two copies of the exact same code, one using `for _ in 0..65` and the other using `for _ in 0..=64`. The `0..65` one optimizes down to very simple code, however the `0..=64` version ends up emitting a large amount of unnecessary code. --- # RangeTo example ```rust pub fn a | labels: I-slow, A-codegen, E-needs-test, T-compiler, C-buglabelmediumlabel_id |
| idrust_63651textMacro-generated macro can no longer be called | The following crate no longer compiles as of the most recent nightly. The relevant commit range is f7af19c27...bdfd698f3. Mentioning @petrochenkov @matthewjasper because #63535 sounds relevant – is this an intentional change? #### Cargo.toml ```toml [package] name = \ | labels: A-resolve, A-macros, regression-from-stable-to-nightly, P-high, T-compiler, C-buglabelcritical_buglabel_id |
| idrust_63652textCausing stack overflow by calling to_string in Display trait implementation | As a mentor on exercism.io I came across the following code: ``` impl Display for Clock { fn fmt(&self, f: &mut Formatter<'_>) -> Result { write!(f, \"{}\", self.to_string()) } } ``` This causes a stack overflow: The reason for that being that **to_string** is automatically impleme | labels: C-enhancement, A-lints, T-lang, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63656", "text": "Expose llvm.ptrmask intrinsic | LLVM recently added a ptrmask intrinsic, intended for use with tagged pointers: https://llvm.org/docs/LangRef.html#llvm-ptrmask-intrinsic It allows masking off bits from a pointer without going through ptrtoint/inttoptr and breaking alias analysis in the process. We might want to | labels: A-LLVM, T-lang, T-libs-api, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63660", "text": "Deduplicate closures | https://github.com/rust-lang/rust/pull/62429 manually deduplicated monomorphizations of closures. We should automate this during building instead of requiring users to do it manually. Ideally we'll revert the parts of #62429 that made things less readable as the last step of clos | labels: C-enhancement, A-codegen, A-closures, T-compiler, A-MIR, I-heavylabellowlabel_id |
| idrust_63663textdist-x86_64-freebsd fails when building with debug assertions | Steps to reproduce: 1. Run `src/ci/docker/run.sh dist-x86_64-freebsd` (note that `DEPLOY=1` is *not* set, which is why we don't see this on Azure) 2. Observe the following ICE ([full log](https://gist.github.com/Aaron1011/244ec6c1126e433767e117b7d22186fe)): ``` Building stage1 st | labels: I-ICE, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63665", "text": "Fn coercion rules seem inconsistent | Consider the following code (which compiles; [playground](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=8902809bc4f0bf6a0752131d9695eda9)): ``` fn f(_: usize) { unimplemented!(); } fn main() { let err = Err(()); f(err.unwrap_or_else(err_exit)); unreach", "label": "medium", "label_id": 2} |
| {"id": "rust_63668", "text": "Panic in 'safe' extern \"C\" causes SIGILL | Investigating a SIGILL in a _safe_ library of ours I could reduce the crash to the following code: ```rust #![deny(unsafe_code)] extern \"C\" fn crash() { panic!(\"End of the world\"); } fn main() { // This works ... std::panic::catch_unwind(|| panic!(\"Oh no\")); // This will cause a ", "label": "medium", "label_id": 2} |
| {"id": "rust_63673", "text": "`miri` no longer builds after rust-lang/rust#63658 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#63658, I observed that the tool miri no longer builds. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @RalfJung, do you think you would have ti | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63677", "text": "rustc crash with type alias of impl trait | I cannot provide a simple repro yet. But what I did is mostly define a type alias of an impl trait and use it as generic parameter of another type. And here is the stack trace ``` error: internal compiler error: src/librustc/traits/coherence.rs:523: ty_is_local invoked on unexpec | labels: A-type-system, I-ICE, A-trait-system, T-compiler, A-impl-trait, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63679", "text": "Redundant semicolons are parsed as an empty tuple semicolon statement | ```rust fn foo() { let _ = 3;;;; } ``` Given the above example, the rustc parser used to silently drop the redundant semicolons (`;;;`) from the AST. However, recently the parse has changed how it treats the redundant semicolons - they are now parsed as a semicolon statement with | labels: A-parser, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63680", "text": "#![macro_use] triggers unused attributes warning | Replacing `#[macro_use] mod foo;` with `#![macro_use]` inside foo.rs triggers unused attribute warning even if it is necessary. Using rustc 1.39.0-nightly (2111aed0a 2019-08-17). | labels: A-lints, A-resolve, A-macros, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63685", "text": "hygiene: cannot find macro `foo!` in this scope | This code ([playpen]) compiles on stable but not on nightly and beta: ```rust macro_rules! foo { () => { \"foo\" }; } macro_rules! bar { () => { foo!() }; } fn main() { println!(bar!()); } ``` [playpen]: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=8b3bc | labels: A-resolve, A-macros, T-compiler, regression-from-stable-to-beta, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63687", "text": "gfx_device_gl 0.16.1 broken on latest nightly | Caused by #63613. To be precise the https://github.com/rust-lang/rust/pull/63613/files#diff-c915449964a130718bd732c4f035b2cfR101 change. It basically does: ```rust extern crate gfx_core as core; format!(...); ``` Because `format!` uses `::core::format_args` to refer to `format_ar | labels: A-resolve, A-macros, regression-from-stable-to-nightly, P-high, T-compiler, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63690", "text": "Diagnostics could be better for unclosed delimiters | Depending on where the unclosed delimiter is in the file, you can get dozens or even hundreds of meaningless errors after the unclosed delimiter. Since terminals display the last output from a program, this means that the actual error gets completely buried. This afternoon I had | labels: C-enhancement, A-diagnostics, A-parser, T-compiler, WG-diagnostics, D-papercut", "label": "low", "label_id": 3} |
| {"id": "rust_63694", "text": "core::ffi::c_void is marked as \"stable since 1.1\", but it was added in 1.30 | The title says it all really. * Missing `ffi` entirely: https://doc.rust-lang.org/1.29.0/core/ * Present in the new `ffi` module: https://doc.rust-lang.org/1.30.0/core/ffi/index.html | labels: A-FFI, A-stability, T-libs-api, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63695", "text": "ICE caused by using a const_generic fn from a trait or impl | A function that compiles and runs successfully outside of a trait causes an ICE when it's in a trait. The expectation is that this should work similarly to other generics on trait functions--while they will prevent a trait object reference, they should otherwise be allowed. (On [ | labels: I-ICE, T-compiler, C-bug, A-const-generics, requires-nightly, F-const_genericslabelhighlabel_id |
| idrust_63696textInvalid value lint not firing | @RalfJung why is the invalid value lint not firing here? https://github.com/glium/glium/blob/9248e31f8bb76e972021c4d73ee53c59ecfe0364/src/context/mod.rs#L727 The type of the input param to that function is `extern \ fn(u32, u32, u32, u32, i32, *const i8, *mut std::ffi::c_vlabelmediumlabel_id |
| idrust_63697textCompiler suggests unnecessary try into | I updated a dependency and the type of a struct field changed from an `i32` to a `u16`. I am assigning a `u16` value to this struct field. Before, I was calling `i32::from` to convert the `u16` to an `i32`. With the upgrade this is unnecessary since the field and the value are bo | labels: E-easy, C-enhancement, A-diagnostics, P-medium, T-compiler, C-buglabellowlabel_id |
| idrust_63706textrustc suggests invalid syntax for missing method on `impl Trait` parameter | [Given:](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=ea23b1a629ffaed2249b6680002d47f1) ```rust trait Foo {} trait Bar { fn hello(&mut self) {} } fn test(foo: &mut impl Foo) { foo.hello(); } ``` rustc outputs: ``` error[E0599]: no method named `hello` | labels: T-compiler, A-impl-trait, C-bug, A-suggestion-diagnosticslabelmediumlabel_id |
| idrust_63707textwindow.hashchange is not a function | When selecting Rust source code with either the latest stable or the latest nightly, the following is seen: ``` main-20190703-1.36.0-a53f9df32.js:1 Uncaught TypeError: window.hashchange is not a function at set_fragment (main-20190703-1.36.0-a53f9df32.js:1) at HTMLDocument.docume | labels: T-rustdoc, C-buglabellowlabel_id |
| idrust_63708textDebug implementaton for `&(x: impl Debug)` should prepend `&` | dbg! is not displaying the type correctly for reference objects/variables. Comment here: https://www.reddit.com/r/rust/comments/cp8y58/hey_rustaceans_got_an_easy_question_ask_here/ex76hhq/ Code here: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ed9fb664 | labels: C-enhancement, T-libs-apilabelquestionlabel_id |
| idrust_63710textrustdoc renders re-exported `async fn`s incorrectly | Relates to #58027, but this is the case where an async fn is re-exported by another crate. The docs for the original function shows `async fn` but the re-export shows `fn -> impl Future`. Example: - [Original function](https://docs.rs/tokio-sync/0.2.0-alpha.2/tokio_sync/mpsc/stru | labels: T-rustdoc, C-bug, A-async-await, AsyncAwait-Polishlabellowlabel_id |
| idrust_63711textSuggest setting associated types on type errors | [The following code](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4c099411a96bcca3c01e682ca92e8175) is missing a constraint for `TryInto<Error=TryIntoError>`: ``` use std::convert::TryInto; struct TryIntoError; struct X; impl TryInto<usize> for X { typ | labels: C-enhancement, A-diagnostics, P-medium, A-associated-items, T-compiler, A-suggestion-diagnosticslabellowlabel_id |
| idrust_63712textE0267 is used twice in different `struct_span_err` calls | The following code https://github.com/rust-lang/rust/blob/1e02bc62bc72d2145a9f11c740714a1a5d94e2b4/src/librustc_passes/loops.rs#L175-L184 Should either assign a new error code to the `AsyncClosure` case, or move the common code to a closure and call it from those two branches to | labels: E-easy, C-cleanup, T-compilerlabellowlabel_id |
| idrust_63713textCreate a deterministic `FxHashMap` wrapper | It should not provide iteration support, but only insert/remove/get/get_mut and convertion to a sorted vec. We should then use it where possible This could prevent accidentially causing hashmap related non determinism in most cases. _Originally posted by @bjorn3 in https://github | labels: E-easy, C-cleanup, C-enhancement, P-medium, T-compiler, A-reproducibilitylabelquestionlabel_id |
| idrust_63716text[bug] async specialization is not parsed | The `async` keyword doesn't seem to currently work with specialization (namely `default fn`). The order of keywords does not matter — I'm not sure which it's supposed to be. Minimal example from @dtolnay in dtolnay/async-trait#25: ```rust macro_rules! item { ($i:item) => {} } ite | labels: A-parser, T-compiler, A-specialization, C-bug, A-async-await, requires-nightly", "label": "medium", "label_id": 2} |
| {"id": "rust_63719", "text": "Strange E0505 error ... is this a bug? | Hey Folks, So, I've been fuzz testing `rustc` nightly using a range of generated programs and am digesting the findings. This one stood out to me: ``` fn main() { let mut x = 1; { let mut y = &mut x; y = y; y; } x; } ``` This currently reports an E0505 on the playground and Rust | labels: T-langlabelmediumlabel_id |
| idrust_63724textSilence `unused_import` warning on unresolved import | `use Foo::*;` will cause the following output: ``` error[E0432]: unresolved import `Foo` --> src/lib.rs:1:5 | 1 | use Foo::*; | ^^^ use of undeclared type or module `Foo` warning: unused import: `Foo::*` --> src/lib.rs:1:5 | 1 | use Foo::*; | ^^^^^^ | = note: `#[warn(unused_impor | labels: C-cleanup, C-enhancement, A-diagnostics, T-compilerlabellowlabel_id |
| idrust_63727textoffline docs doesnot show symbols proper on firefox | The offline docs does not show symbols properly such as navigation to previous page, next page, table of content, change theme, search and print this book in firefox browser only. tried > rustup docs --book opened docs in firefox. //version > rustc --version --verbose rustc 1.37.labellowlabel_id |
| idrust_63728textmissing specialization: `<serialize::json::Encoder as SpecializedEncoder<syntax_pos::symbol::Ident>>::specialized_encode` not overridden | The following code when compiled with `-Z ast-json` causes ICE: ```rust pub fn main() { let a = [\, \, \, \, \]; let element: Option<i32> = a.iter().filter_map(|s| s.parse().ok()).next(); assert_eq!(element, Some(1)); } ``` Error: ```rust % RUST_BACKTRACE=1 cargo ru | labels: I-ICE, T-compiler, A-specialization, C-bug, requires-nightly", "label": "high", "label_id": 1} |
| {"id": "rust_63729", "text": "`rls` no longer builds after rust-lang/rust#62727 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#62727, I observed that the tool rls no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rls is needed to fix the fallout. cc @SimonSapin, do you think you would have ti | labels: T-compilerlabelmediumlabel_id |
| idrust_63733textIncorrect overflowing literals error with saturating_sub | ```rust fn main() { assert_eq!(i8::min_value(), -128i8); println!(\, -128i8.saturating_sub(-1)); } ``` ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=17140f6c272a402083da3ce128c17221)) Errors: ``` Compiling playground v0.0.1 (/playground) | labels: C-enhancement, A-lints, T-compilerlabellowlabel_id |
| idrust_63734textMisspelled test name \ | ```diff -ui/non-interger-atomic.rs +ui/non-integer-atomic.rs ``` | labels: E-easy, A-testsuite, C-buglabellowlabel_id |
| idrust_63735text[Feature request] Compiler might automatically pick a concrete type for generic Option<T> | Hello Rust developers, My versions are: - rustc: `1.37.0 (eae3437df 2019-08-13)` - Cargo: `1.37.0 (9edd08916 2019-08-02)` Currently this does not compile: ```rust use std::path::Path; fn test<P>(_: Option<P>) where P: AsRef<Path> {} fn main() { test(None); } ``` Error message: `` | labels: T-lang, needs-rfclabelmediumlabel_id |
| idrust_63741textSuggest removing `self` import when not in a list | ```rust use std::self; // error[E0429]: `self` imports are only allowed within a { } list ``` we should offer the suggestion to remove `::self`, as this is likely what the user intended. <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> This issue has been assigned to @mib | labels: E-easy, C-enhancement, T-lang, T-compiler, A-suggestion-diagnosticslabellowlabel_id |
| idrust_63748textTracking issue for `linux_syscall` | PR: #63745 Unresolved questions: - [ ] Should we add syscalls to `core` or keep only in `std`? - [ ] Do we still need the workaround for `syscall6` on x86? | labels: O-linux, T-lang, T-libs-api, B-unstable, C-tracking-issuelabelquestionlabel_id |
| idrust_63751textCheck stdout/stderr of run-pass run portion | We currently check the compiler's output, but it's sometimes useful to check that the run-pass test itself is outputting the same as before. In particular, @tmandry expressed a desire to test libtest in this fashion. Taking a look at the code, we probably want to add another head | labels: A-testsuite, E-mentorlabelmediumlabel_id |
| idrust_63757textstable rustc panics on adding/removing `dyn` before a trait in a proc macro | I was doing a small change to someone's crate, and encountered a crash. The weird thing is also that the crash is fixed by doing simple `cargo clean`, i.e. the problem was probably not in the code, but in the way `rustc` (or `cargo`) handles it between runs. rustc 1.37.0/rustc 1. | labels: I-ICE, T-compiler, A-incr-comp, C-bug, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_63758", "text": "Implementation of Ord for integers is suboptimal | The current implementation of `Ord::cmp` for integral types results in less than optimal code. Currently the implementation looks something like this: ```rust fn cmp(&self, other: &$t) -> Ordering { if *self == *other { Equal } else if *self < *other { Less } else { Greater } } ` | labels: E-easy, I-slow, C-enhancement, E-mentor, T-libs-api, E-help-wanted", "label": "low", "label_id": 3} |
| {"id": "rust_63764", "text": "Custom diagnostic for bad `mut` in pattern with sub-bindings | Given (as brought up in https://github.com/rust-lang/rust/pull/63693#discussion_r315926681 CC @Centril): ``` pub fn main() { struct Foo { x: isize } let mut Foo { x: x } = Foo { x: 3 }; } ``` [We currently emit a parse error](https://play.rust-lang.org/?version=stable&mode=debug& | labels: C-enhancement, A-diagnostics, P-low, T-compiler, A-suggestion-diagnostics", "label": "question", "label_id": 4} |
| {"id": "rust_63765", "text": "Panic while running rustdoc on polonius-engine | I get a panic ~in beta~ at least as far back as 1.31 while attempting to compile the documentation in [rust-lang/polonius](https://github.com/rust-lang/polonius) (seems to stem from polonius-engine) ``` $ RUST_BACKTRACE=full cargo doc --open Documenting polonius-engine v0.9.0 (/h | labels: T-rustdoc, I-ICE, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63769", "text": "Are all AVX-512 SIMD functions and types available in Rust `std::arch` module? | Hello! We are developing our game engine (esp. deserialization and noise generation part) in Rust, which theoretically can make good use of modern SIMD features. There could be relevant x86 CPUs available in market with latest AVX-512 instructions, and as we may concern Rust shou | labels: A-SIMD", "label": "question", "label_id": 4} |
| {"id": "rust_63773", "text": "[Const generics] thread 'rustc' panicked at 'no errors encountered even though `delay_span_bug` issued' | The code simply does \"not\" compile, because compiler crashes. I tried this code: ```rust #![feature(const_generics)] fn test<const A: &'static str, const B: &'static str>() { println!(\"{} {}\", A, B); } fn main() { test::<\"Hello\", \"World\">(); } ``` Which is expected to compile wit | labels: I-ICE, T-compiler, C-bug, A-const-generics, requires-nightly, F-const_generics", "label": "high", "label_id": 1} |
| {"id": "rust_63778", "text": "Temporary values do not outlive a direct await | ```rust struct Test(String); impl Test { async fn borrow_async(&self) {} fn borrow(&self) {} fn with(&mut self, s: &str) -> &mut Self { self.0 = s.into(); self } } async fn test() { // error[E0716]: temporary value dropped while borrowed Test(\"\".to_string()).with(\"123\").borrow_as | labels: A-lifetimes, T-lang, A-async-await", "label": "medium", "label_id": 2} |
| {"id": "rust_63783", "text": "rustc 1.37.0 panic | While running clippy rustc panicked. The code is here https://github.com/AxelNennker/indy-sdk/tree/vcx_clippy To reproduce: - `git clone https://github.com/AxelNennker/indy-sdk` - `git checkout vcx_clippy` - `cargo clippy --manifest-path vcx/libvcx/Cargo.toml -- -W clippy::style ", "label": "high", "label_id": 1} |
| {"id": "rust_63785", "text": "Compiler symbol resolution works when it shouldn't | So here is the code that works when it shouldn't: ```rust let m = unsafe { mem::transmute::<&mut [u8], &mut [u32]>(&mut chunk) }; #[cfg(target_endian = \"big\")] for j in 0..16 { M[j] = M[j].swap_bytes(); } ``` And this doesn't work, as expected. ```rust let m = unsafe { mem::translabelmediumlabel_id |
| idrust_63787textRef parameter incorrectly decorated with `noalias` attribute | The following library: ```rust use std::cell::*; pub fn break_it(rc: &RefCell<i32>, r: Ref<'_, i32>) { // `r` has a shared reference, it is passed in as argument and hence // a barrier is added that marks this memory as read-only for the entire // duration of this function. drop( | labels: A-codegen, T-lang, T-libs-api, I-unsound, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63791", "text": "Miscompilation under target-cpu >= haswell | This example fails when compiled with `target-cpu` \"haswell\" or more recent: ```toml [dependencies] aes-soft = \"=0.3.3\" ``` ```rust use aes_soft::{block_cipher_trait::BlockCipher, Aes128}; fn main() { let plain = [127, 0, 0, 1, 174, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; let key = [0; | labels: A-LLVM, O-x86_64, P-high, T-compiler, regression-from-stable-to-stable, I-unsound", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63792", "text": "`as_slice` -> `as_str` in the docs | `core::str::Str.as_slice()` has been renamed to `as_str()` as discussed in https://github.com/rust-lang/rust/issues/14433, but the old name is still referenced in the docs: https://github.com/rust-lang/rust/blob/18630677cf6c7ac50e6786c504b35bc09501dbe2/src/libstd/primitive_docs.r | labels: E-easy, C-enhancement, A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_63794", "text": "unimplemented macro doesnt compile with RPIT | I believe the following should compile but doesn't. ``` trait Foo {} fn bar() -> impl Foo { unimplemented!() } ``` I get the following error: ``` --> src/main.rs:7:13 | 7 | fn bar() -> impl Foo { | ^^^^^^^^ the trait `Foo` is not implemented for `()` | = note: the return type of | labels: T-lang, C-feature-request, A-impl-traitlabelmediumlabel_id |
| idrust_63795textthread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1166:5 | ``` thread 'rustc' panicked at 'no entry found for key', src/libcore/option.rs:1166:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace. thread '<unnamed>' panicked at 'assertion failed: `(left == right)` left: `LLVMing`, right: `Codegenning`', src/liblabelhighlabel_id |
| idrust_63797text&str->String in the docs | This chunk was supposedly copy-pasted as is from `std::str::from_utf8` https://github.com/rust-lang/rust/blob/bdfd698f37184da42254a03ed466ab1f90e6fb6c/src/liballoc/string.rs#L430-L432 It should read A String ([`String`]) is made of bytes | labels: E-easy, A-docslabellowlabel_id |
| idrust_63798text[1.38] `#[bench]` accepted on stable but not beta | Initially reported by @e-oz [here](https://github.com/rust-lang/rust/issues/50297#issuecomment-523657376). [[playground](https://play.rust-lang.org/?version=beta&mode=debug&edition=2018&gist=b006497caba8892a0350a517d49c7a2d)] ```rust fn main() { println!(\); } #[ben | labels: A-stability, P-high, T-lang, regression-from-stable-to-beta, T-dev-tools, A-libtestlabelcritical_buglabel_id |
| idrust_63799textConfusing E0425 error when referencing undefined name with ::foo | Test program: ```rust fn foo() { println!(\) } fn main() { ::foo() } ``` This produces the following error messages: ``` error[E0425]: cannot find function `foo` in the crate root --> src/main.rs:4:7 | 4 | ::foo() | ^^^ not found in the crate root help: possible candidate is | labels: A-diagnostics, A-resolve, T-compiler, C-buglabelmediumlabel_id |
| idrust_63800textrustc panic when trying to unwrap DistinctSources | When trying to compile the tests for my [code](https://github.com/software-opal/archivelib-rs/tree/compiler-bug-1.37) I get this error: ``` thread 'rustc' panicked at 'called `Result::unwrap()` on an `Err` value: DistinctSources(DistinctSources { begin: (Real(\"tests/macros.rs\"), | labels: I-ICE, A-macros, A-borrow-checker, T-compiler, A-NLL, C-bug", "label": "question", "label_id": 4} |
| {"id": "rust_63802", "text": "ICE trying to compile libstd with -Zmir-opt-level=3 | ``` error: internal compiler error: src/librustc_mir/transform/inline.rs:677: Return place is (*_28), not local thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ec | labels: I-ICE, T-compiler, A-MIR, C-bug, requires-nightly", "label": "high", "label_id": 1} |
| {"id": "rust_63816", "text": "RustDoc: remove the redundant unstable option \"--linker\" | while working on https://github.com/rust-lang/rust/issues/63638 i have noticed the there is a conflict between the \"-C linker\" and the \"--linker\" option where the later overrides the former. but as the `--linker` flag is unstable I think that it shall be removed as is it confusin | labels: C-cleanup, T-rustdoc", "label": "low", "label_id": 3} |
| {"id": "rust_63821", "text": "rustdoc crashes on nightly nightly-2019-08-22 | `cargo doc` crashes on nightly (`nightly-2019-08-22`) and also on stable (`1.37.0`) with \"nightly\" features turned on via `RUSTC_BOOSTRAP=1`. It does not trigger on stable without `RUSTC_BOOTSTRAP=1` flag. Here is the output I'm getting: ``` thread 'rustc' panicked at 'could not | labels: T-rustdoc, I-ICE, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63822", "text": "impl Display for Path | It's deliberate that to date Path does not impl Display. It's a conservative stance that says that because the conversion to utf8 can be lossy, there isn't necessarily one obviously correct way to display a path. I'd like to revisit that decision, in the interests of convenience. | labels: T-libs-api", "label": "medium", "label_id": 2} |
| {"id": "rust_63826", "text": "How to disable rust runtime stack_overflow check | Hi community, I was using [GEM5](http://gem5.org/Main_Page) architecture simulator to run Rust binaries. However, GEM5 simulator does support syscall sigaltstack, which is called by libstd/sys/unix/stack_overflow.rs further by libstd/rt.rs (sys::stack_overflow::init()). I was won | labels: T-libs-api, C-feature-request", "label": "question", "label_id": 4} |
| {"id": "rust_63828", "text": "Cross-compile of rust fails in 1.36.0 and 1.37.0 | I'm habitually doing cross-builds of the various rust NetBSD targets, in addition to the native amd64 target (cross-build host). The normal procedure I've followed and which works with 1.35.0, now fails in 1.36.0 and 1.37.0 inside the LLVM build with: ``` [ 1%] Building CXX objec | labels: A-LLVM, A-cross, O-netbsd, T-bootstrap, C-bug", "label": "question", "label_id": 4} |
| {"id": "rust_63829", "text": "dli_saddr may be const | The various NetBSD ports declare `dli_saddr` as ``` const void *dli_saddr; /* Symbol address */ ``` This gives rise to the need for the following patch to avoid \"cast discards qualifier\" warnings, which might be (\"was\" in my case) configured to act as an error: ``` --- src/llvm-p", "label": "question", "label_id": 4} |
| {"id": "rust_63830", "text": "Automatic dark theme doesn't work | Requested in #61079 and implemented in #61236, the automatic theme switching doesn't seem to do anything: If I visit <https://doc.rust-lang.org/nightly/std/> while the system is in dark mode, I can see in the developer tools that the `<html>` element has the style `content: \"dark | labels: T-rustdoc, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_63832", "text": "temporary lifetime around await is (maybe) unexpectedly short | So @sfackler pointed out something to me. The problem @sfackler reported was that temporary lifetimes around `await` were too short. The effect was that `foo(&[123]).await` would give an error where `foo(&[123])` would not (in sync code). My assumption was that this was caused by | labels: T-lang, T-compiler, A-async-await, AsyncAwait-Polish", "label": "medium", "label_id": 2} |
| {"id": "rust_63835", "text": "message-format=short output is unnecessarily hard to read | The `--message-format=short` option is a very convenient way to get a condensed error output from cargo when the same/similar errors occur at many places in a code base. Unfortunately, the current output with this option uses bold/color to place the emphasis on the wrong parts of | labels: C-enhancement, A-diagnostics, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63837", "text": "rustc panic: Inner macro with loop-label inside closure. | https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3bc7b5bf33f55dbb70550fb8f4b6804c | labels: I-ICE, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63838", "text": "struct containing array of size given in Self and slice causes compiler panic | A struct containing an array and a reference to a slice causes the compiler to panic if the array size is defined in the impl block. The issue also occurs for smaller array sizes. - Size in impl (panics): https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=6 | labels: I-ICE, A-associated-items, A-borrow-checker, T-compiler, A-NLL, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63840", "text": "Is the comment re. unstable-book in `src/libsyntax/feature_gate/active.rs` still relevant? | See https://github.com/rust-lang/rust/pull/63824#discussion_r316941434. The comment currently exists in `src/libsyntax/feature_gate.rs` but is being moved in the PR above to `src/libsyntax/feature_gate/active.rs`. cc @oli-obk | labels: I-needs-decision, T-lang, T-compiler, A-docs", "label": "question", "label_id": 4} |
| {"id": "rust_63841", "text": "compiler | my english is not good , So let's say by example. let x = if {}{};//error:^ expected if condition here let x = if{()}{};//error : ^^ expected bool, found () let x = if{return ()}{}:its correct and condition evaluated to false.but i think -> error:^^ expected bool, found () if it labelmediumlabel_id |
| idrust_63842text`use foo::{self, ...}` doesn't import macro `foo!` | When there is a macro and a module with the same name, `use foo::{self, Bar}` syntax imports the module `foo`, but not the macro `foo!`. So you are forced to use this: ```rust use crate::foo; use crate::foo::Bar; ``` It is especially annoying because rustfmt automatically merges | labels: A-resolve, T-lang", "label": "medium", "label_id": 2} |
| {"id": "rust_63843", "text": "`miri` no longer builds after rust-lang/rust#63637 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#63637, I observed that the tool miri has failing tests. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @alexcrichton, do you think you would ha | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63844", "text": "Don't print expression result for dbg!() when expr is literal | ```rust fn main() { dbg!(\); } ``` Should give: ``` [src/main.rs:2] \ ``` Instead of: ``` [src/main.rs:2] \ = \ ``` This should be possible by adding a macro rule matching `$val:literal` before the rule matching `$val:expr`.labelmediumlabel_id |
| idrust_63848textrustc could not initialize thread_rng (on pre-getrandom Linux kernel) | <short summary of the bug> nushell: https://book.nushell.sh/en/installation / no on-point issues seen here -- searched for \ Tried to build nushell from source and it required \ rust. Didn't know how to install that, so I used \"cargo install nu\" I expected to see | labels: O-linux, I-ICE, P-high, T-compiler", "label": "high", "label_id": 1} |
| {"id": "rust_63850", "text": "Lint for unused unstable feature gates | I've seen two codebases now that used to have unused feature gates: * https://github.com/libra/libra/commit/2f44be56a14492be236ec30925dec3d5e31342ad (this commit was in july while duration_float stabilized in August) * https://github.com/libra/libra/commit/e263fbdc1dd83305d9962d0 | labels: A-lints, A-stability, T-lang, C-feature-requestlabellowlabel_id |
| idrust_63852textCompile message contains reference to an identifier not used by the erraneous code | rustc 1.37.0 (eae3437df 2019-08-13) Repo: https://github.com/svenschmidt75/Rust Commit: https://github.com/svenschmidt75/Rust/commit/23ec34211661c8f77c040b751500c86157f01305 When building, I get error message ``` Compiling ann v0.1.0 (/home/svenschmidt75/Develop/Rust/NeuralNetwor | labels: C-enhancement, A-diagnostics, T-compiler, A-inferencelabellowlabel_id |
| idrust_63857textImpl HasDataLayout and HasTargetSpec for T where T: HasTyCtxt | labels: E-easy, C-enhancement, T-compilerlabellowlabel_id |
| idrust_63866textNiche-filling layouts are picked over tagged ones even when detrimental. | This prints the values in comments: ```rust use std::num::NonZeroU8; pub enum Foo { A(NonZeroU8, u32), B } pub enum Bar { A(u8, u32), B } fn main() { use std::mem::size_of; dbg!(size_of::<Foo>()); // = 8 dbg!(size_of::<Option<Foo>>()); // = 12 dbg!(size_of::<Option<Option<Foo>>>( | labels: I-slow, C-enhancement, T-compiler, A-layoutlabellowlabel_id |
| idrust_63868textSubpar error when lifetime checking for `dyn Trait` evaluates to `'static` | ``` fn foo<T>(x: &Vec<T>) -> Box<dyn Iterator<Item=&T>> { Box::new(x.iter()) } fn main() { let x: Vec<usize> = vec![1, 2, 3]; let _ = foo(&x); } ``` the `rustc` output is ``` error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in function call due to conflic | labels: C-enhancement, A-diagnostics, A-lifetimes, T-compiler, A-NLL, NLL-diagnostics", "label": "low", "label_id": 3} |
| {"id": "rust_63876", "text": "ICE trying to run cargo clippy on hello world lib.rs | I just tried running `cargo clippy` on the exercism rust track hello world (https://exercism.io) I tried this code: Here are the contents of the folder I'm trying to run it on: https://github.com/nico-abram/rust_test_exercism I expected to see this happen: Clippy. Instead, this h | labels: I-ICE, T-compiler, T-cargo, C-bug, E-needs-mcvelabelquestionlabel_id |
| idrust_63879textAdd missing code examples on Iterator trait | labels: C-enhancement, A-docs, A-iteratorslabellowlabel_id |
| idrust_63881textrust build/compile on solaris 11.4 | Hi Team, we are not able to compile rust source on solaris 11.4. Can you please share correct documentation/steps/source/binary..etc for solaris 11.4. Thanks in advance!! Regards, Gopalakrishnanlabelmediumlabel_id |
| idrust_63882textRaw identifier keywords are sometimes silently accepted in paths | Example: ```rust type A = crate::r#break; // No error (?!) fn main() {} ``` Found by crater run (https://crater-reports.s3.amazonaws.com/beta-1.38-1/beta-2019-08-13/gh/xi-frontend.xi-term/log.txt) when visibility resolution switched to a different algorithm (early resolution), wh | labels: A-resolve, T-compiler, regression-from-stable-to-stable, C-buglabelcritical_buglabel_id |
| idrust_63883text#[unwind(aborts)] does nothing on `extern \ fn` | I would expect the following code to abort, and never print `Hello`: ```rust #![feature(unwind_attributes)] #[unwind(aborts)] fn foo() { // implicitly: extern \ panic!(\); } fn main() { if let Err(_) = std::panic::catch_unwind(|| foo()) {} println!(\); } ``` But | labels: T-compiler, C-bug, requires-nightlylabelmediumlabel_id |
| idrust_63885text[1.38] Regression: failed to resolve: could not find `rustc_serialize` in `{{root}}` | https://github.com/rust-lang/rust/issues/63628#issuecomment-524585041 Caused by https://github.com/rust-lang/rust/pull/63449. Tests in `rustc-serialize` and its fork `rustc-serialize2` are broken, no other crates are affected. (Can be fixed with `extern crate self as rustc_seriva | labels: T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63886text[1.38] Regression: lifetime name `'s` declared twice in the same scope | https://github.com/rust-lang/rust/issues/63628#issuecomment-524585351 >lifetime name `'s` declared twice in the same scope >lifetime name `'input` declared twice in the same scope ``` ./reg/cff/0.5.0/beta-2019-08-13.txt:[INFO] [stderr] error[E0263]: lifetime name `'s` declared tw | labels: T-lang, T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63887text[1.38] Regression: attributes starting with `rustc` are reserved for use by the `rustc` compiler | https://github.com/rust-lang/rust/issues/63628#issuecomment-524586506 >attributes starting with `rustc` are reserved for use by the `rustc` compiler ``` ./reg/select-rustc/0.1.2/beta-2019-08-13.txt:[INFO] [stdout] error[E0658]: attributes starting with `rustc` are reserved for us | labels: T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63888text[1.38] Regression: cannot find macro `trace!` in this scope | https://github.com/rust-lang/rust/issues/63628#issuecomment-524587231 >cannot find macro `trace!` in this scope >cannot find macro `flatdata_intersperse!` in this scope ``` ./reg/eztrace/0.1.0/beta-2019-08-13.txt:[INFO] [stderr] error: cannot find macro `trace!` in this scope ./r | labels: P-high, T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63889text[1.38] Regression: expected open delimiter | https://github.com/rust-lang/rust/issues/63628#issuecomment-524587696 >expected open delimiter ``` ./reg/dtolnay/0.0.2/beta-2019-08-13.txt:[INFO] [stderr] error: expected open delimiter ``` Expected breakage of an unstable feature (`my_macro! name { ... }` no longer parses), caus | labels: T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63890text[1.38] Regression: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `is` | https://github.com/rust-lang/rust/issues/63628#issuecomment-524590824 >expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `is` ``` ./reg/google-games1/1.0.10+20190627/beta-2019-08-13.txt:[INFO] [stdout] error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, | labels: T-rustdoc, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63891text[1.38] Regression: expected module, found unresolved item `crate::mod` | https://github.com/rust-lang/rust/issues/63628#issuecomment-524633353 >expected module, found unresolved item `crate::mod` ``` ./gh/xi-frontend/xi-term/beta-2019-08-13.txt:[INFO] [stderr] error[E0577]: expected module, found unresolved item `crate::mod` ``` This is the most hilar | labels: T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63892text[1.38] Regression: failed to resolve: use of undeclared type or module `SliceConcatExt` | https://github.com/rust-lang/rust/issues/63628#issuecomment-524634090 >failed to resolve: use of undeclared type or module `SliceConcatExt` ``` ./gh/echupriyanov/tls-ws/beta-2019-08-13.txt:[INFO] [stderr] error[E0433]: failed to resolve: use of undeclared type or module `SliceCon | labels: T-libs-api, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63893text[1.38] Regression: cannot determine resolution for the derive macro `Debug` | https://github.com/rust-lang/rust/issues/63628#issuecomment-524636403 >cannot determine resolution for the derive macro `Debug` ``` ./reg/ruroonga_command/0.3.4/beta-2019-08-13.txt:[INFO] [stderr] error: cannot determine resolution for the derive macro `Debug` ``` Minimized: ```r | labels: T-lang, T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63894text[1.38] Regression: proc macro panicked | https://github.com/rust-lang/rust/issues/63628#issuecomment-524641105 >proc macro panicked ``` [INFO] [stderr] Compiling custom-slice-macros v0.1.1 (/opt/crater/workdir) [INFO] [stderr] error: proc macro panicked [INFO] [stderr] --> tests/derives.rs:48:13 [INFO] [stderr] | [INFO] | labels: T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63895text[1.38] Regression: custom attribute panicked | https://github.com/rust-lang/rust/issues/63628#issuecomment-524641889 >custom attribute panicked ``` [INFO] [stderr] Compiling display-as v0.4.6 (/opt/crater/workdir) [INFO] [stderr] error: custom attribute panicked [INFO] [stderr] --> tests/format_as.rs:104:5 [INFO] [stderr] | [ | labels: T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63896text[1.38] Regression: proc-macro derive panicked | https://github.com/rust-lang/rust/issues/63628#issuecomment-524643597 >proc-macro derive panicked ``` [INFO] [stderr] error: proc-macro derive panicked [INFO] [stderr] --> src/lib.rs:11:1 [INFO] [stderr] | [INFO] [stderr] 11 | / proc_macro_item_decl! { [INFO] [stderr] 12 | | /// | labels: A-pretty, A-macros, T-compiler, regression-from-stable-to-betalabelcritical_buglabel_id |
| idrust_63898textRust Installer: OS Error 649: The create operation failed because the name contained at ... | I got the below information when installing the rustup-init.exe <pre> error: component download failed for rustc-x86_64-pc-windows-msvc info: caused by: could not rename downloaded file from 'C:\\Users\\Hadi\\.rustup\\downloads\\923e829d67102e45fc16eeae727a4dad13f7abe6239b99fef0e4a233", "label": "medium", "label_id": 2} |
| {"id": "rust_63900", "text": "ICE having include! in code from stdin when calling rustc | to reproduce the fault this can be used: `echo 'include!(\); pub fn main(){}' | rustc - ` will result in this ICE: `thread 'rustc' panicked at 'cannot resolve relative path in non-file source ', src/libsyntax/ext/source_util.rs:189:22 note: Run with RUST_BACKTR | labels: I-ICE, I-needs-decision, T-lang, C-bug, glacier", "label": "question", "label_id": 4} |
| {"id": "rust_63904", "text": "Collect occurrences of `{}` for mismatched braces diagnostic | Many editors _helpfully_ auto close delimiters when writing them down. It is not uncommon for this to cause the following to occur: ``` fn main() {} let _ = (); } ``` It'd be a good idea for the parser or lexer to keep track of these empty blocks to provide an error closer to ``` | labels: E-easy, C-enhancement, A-diagnostics, A-parser, T-compiler, A-suggestion-diagnosticslabellowlabel_id |
| idrust_63905textNo documentation about f32_runtime without std | Hi, It seems like all the functions under `f32_runtime` don't work without std (https://doc.rust-lang.org/src/std/f32.rs.html#29-994) I tried looking for documentation about this and didn't find anything concrete, and since the `core` docs don't have documentation for the primiti | labels: C-enhancement, T-libs-api, A-docs, A-floating-point", "label": "low", "label_id": 3} |
| {"id": "rust_63908", "text": "Cannot convert this tail recursive function into an iterative one due to lifetime error | Rust version: 1.37.0 This problem has been previously discussed on [Stack Overflow](https://stackoverflow.com/q/57643908/722720) and [Rust Users Forum](https://users.rust-lang.org/t/how-do-you-remove-the-last-node-from-a-singly-linked-list/31805?u=efanzh). And I think it is somet | labels: C-enhancement, A-borrow-checker, NLL-polonius", "label": "low", "label_id": 3} |
| {"id": "rust_63910", "text": "linking with `cc` failed: exit code: 1 | error: linking with `cc` failed: exit code: 1 | = note: \"cc\" \"-Wl,--as-needed\" \"-Wl,-z,noexecstack\" \"-m64\" \"-L\" \"/root/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib\" \"/opt/rust/target/debug/build/log-2c3a5c1cf08eb014/build_script_buil", "label": "medium", "label_id": 2} |
| {"id": "rust_63911", "text": "1.38 beta fails to bootstrap itself | When using 1.38 beta to bootstrap itself, I get: ``` error: unnecessary `unsafe` block --> src/bootstrap/builder.rs:148:19 | 148 | name: unsafe { ::std::intrinsics::type_name::<S>() }, | ^^^^^^ unnecessary `unsafe` block | ``` | labels: T-bootstrap", "label": "medium", "label_id": 2} |
| {"id": "rust_63912", "text": "rustc should error instead of panic when the generator trait is not found | This somehow doesn't occur when putting the `abc` function in a non `#![no_core]` crate, yet I can't find any difference between the `libcore` version of `FnOnce` and this one. ```rust #![feature(no_core, lang_items, unboxed_closures)] #![no_core] #[lang = \"sized\"] pub trait Size | labels: E-easy, I-ICE, T-compiler, E-help-wanted, C-bug, A-coroutines", "label": "high", "label_id": 1} |
| {"id": "rust_63913", "text": "`miri` no longer builds after rust-lang/rust#63580 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#63580, I observed that the tool miri no longer builds. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @wesleywiser, do you think you would have | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_63915", "text": "Default sysconfdir | I'm not sure this is actually a bug but it seems like it could be. The default sysconfdir in config.toml is `/etc`; which means it bypasses the user-defined prefix, in turn resulting in the installation failing if not running as root (even when installing to a user folder or, as | labels: C-enhancement, P-low, T-bootstraplabellowlabel_id |
| idrust_63916textConst function sized arrays fail to evaluate `Sized` bound | Hello, I was trying to have generic arrays that occupy as much of a single cache line as possible, but get a compile error when trying to use `std::mem::size_of<T>()`, as the `T: Sized` constraint seems to be evaluated later than [T; N] seems to require the value. Is this behavio | labels: A-trait-system, T-compiler, C-bug, A-const-evallabelmediumlabel_id |
| idrust_63918textWasm code failing regression probably related to update to LLVM 9 trunk | # Summary: The following piece of code fail when compiled to wasm32-unknown-unknown since nightly-2019-07-18. This nightly introduces https://github.com/rust-lang/rust/pull/62592/files so probably related. # Regression test: ```rust pub fn get() -> u128 { let d = [0, 0, 32, 59, 1 | labels: A-LLVM, P-medium, T-compiler, regression-from-stable-to-beta, I-unsound, O-wasmlabelcritical_buglabel_id |
| idrust_63924textMigrate test suite to use run-pass stdout/stderr testing | Where possible, we should prefer to use the functionality added by https://github.com/rust-lang/rust/pull/63825 instead of `std::process` and the like. At least one such test is known, but it's possible more can be found. | labels: E-easy, C-cleanup, A-testsuite, E-mentor", "label": "low", "label_id": 3} |
| {"id": "rust_63925", "text": "Building a no_std cdylib results in \"syntax error in VERSION script\" | I'm trying to build a pure `no_std` `cdylib` with no external library dependencies. For an initial proof of concept, I tried to create such a library using the following code: ```Cargo.toml```: ```toml [package] name = \ version = \ edition = \ [lib] crat | labels: A-linkage, T-compiler, C-buglabelmediumlabel_id |
| idrust_63928text./x.py build --help gives misleading help | ``` $ ./x.py build --help [...] For a quick build of a usable compiler, you can pass: ./x.py build --stage 1 src/libtest ``` But in practice: ``` $ ./x.py build --stage 1 src/libtest Updating only changed submodules Submodules updated in 0.13 seconds Finished dev [unoptimized] ta | labels: E-easy, E-mentor, T-bootstrap, C-buglabellowlabel_id |
| idrust_63932textICE on borrow check `check_loans` on stable | I don't know how to minimize this... ``` $ RUST_BACKTRACE=1 cargo run Compiling baguetteland v0.1.0 (/nobackup/baguetteland) thread 'rustc' panicked at 'assertion failed: self.bccx.region_scope_tree.scopes_intersect(old_loan.kill_scope, new_loan.kill_scope)', src/librustc_borrowc | labels: I-ICE, A-borrow-checker, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_63935", "text": "Intra-rustdoc Links Do Not Work For Anything | ## Stats: toolchain version: stable-x86_64-unknown-linux-gnu (default) rustc version: rustc 1.37.0 (eae3437df 2019-08-13) cargo version: cargo 1.37.0 (9edd08916 2019-08-02) ## Steps to reproduce: 1. Run `cargo init example` 2. Edit `example/src/main.rs` 3. At the top, add `//! Ch", "label": "medium", "label_id": 2} |
| {"id": "rust_63939", "text": "error: failed to run custom build command for `ring v0.14.6` | error: build failed [root@eulerOS:/opt/rust]# RUST_BACKTRACE=1 cargo build --target x86_64-unknown-linux-musl Compiling ring v0.14.6 Compiling num-traits v0.2.8 Compiling atty v0.2.13 Compiling rand v0.4.6 Compiling base64 v0.10.1 Compiling want v0.2.0 Compiling tokio-resource-po", "label": "medium", "label_id": 2} |
| {"id": "rust_63942", "text": "Better error message for 'is private' | ``` mod foo { use bar::A; mod bar { pub struct A {} } } use foo::A; fn main() {} ``` Produces the error: ``` error[E0603]: struct `A` is private --> src/main.rs:9:10 | 9 | use foo::A; | ^ ``` [playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gis | labels: C-enhancement, A-diagnostics, A-visibility, T-compiler, A-suggestion-diagnostics", "label": "low", "label_id": 3} |
| {"id": "rust_63943", "text": "Undefined Behavior in safe code that unwinds out of `extern \"C\"` function | **UPDATE**: this optimization is perfectly correct. It only breaks code that already has undefined behavior. This is however an issue since until #52652 is fixed we want to keep such code working. **ORIGINAL TITLE**: mis-compilation of noreturn extern \"C\" definitions that unwind | labels: A-FFI, T-lang, I-unsound, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_63946", "text": "`Ref` methods unnecessary? | I'm a bit confused about the methods on `std::cell::Ref`. Are there any use cases for the `clone`, `map`, and `map_split` methods? I understand the value for `RefMut` (since there can only be one mutable borrow, you can change what it points to split one borrow into multiple refelabelquestionlabel_id |
| idrust_63947textExcess semicolon lint produces wrong diagnostics with async main and derive macro | The new lint for excess semicolons (https://github.com/rust-lang/rust/pull/62984) has some weird behaviour when the lint is triggered inside an async function that is transformed using a procedural macro. Rustc version: 1.39.0-nightly (9b91b9c10 2019-08-26) Compiling this: ```rus | labels: A-lints, T-compiler, C-buglabelmediumlabel_id |
| idrust_63952textrustc diverges on large dangling integer slice | I wanted to test our handling of slices that are \ (bigger than the largest possible allocation), so I wrote: ```rust use std::usize; #[repr(C)] #[derive(Copy, Clone)] struct SliceRepr { ptr: *const u8, len: usize, } union SliceTransmute { repr: SliceRepr, slice: &'static | labels: E-needs-test, A-const-eval", "label": "medium", "label_id": 2} |
| {"id": "rust_63954", "text": "Add optional span to `require_lang_item` for diagnostics with more context | [`fn require_lang_item(LangItem)`](https://github.com/rust-lang/rust/blob/615c46086a994f088c9ed569fc36df229ae115b6/src/librustc/middle/lang_items.rs#L384-L388) should also take an optional `Span` to [avoid output without context](https://github.com/rust-lang/rust/pull/63917/files | labels: E-easy, C-enhancement, A-diagnostics, T-compiler, A-lang-item", "label": "low", "label_id": 3} |
| {"id": "rust_63959", "text": "Miscompilation with target-cpu=znver1 (AMD Ryzen 1000/2000 series) on Windows + LLVM 9. | On any recent MSVC nightly, compiling with `release` profile with `RUSTFLAGS = \"-C target-cpu=native\"` results in either `STATUS_ACCESS_VIOLATION` or `STATUS_HEAP_CORRUPTION` depending on the crate. Many crates work, but others don't. Among those that fail some use SIMD. `target- | labels: I-crash, A-LLVM, P-high, T-compiler, regression-from-stable-to-stable, C-buglabelcritical_buglabel_id |
| idrust_63962textHint on missing tuple parens in pattern | It'd be nice to smartly hint about missing tuple parentheses in patterns, especially in positions where parentheses nesting is required. Example of incorrect code: ```rust fn main() { match Some((1, 2)) { Some(x, y) => {} None => {} } } ``` The error: ```rust error[E0023]: this p | labels: C-enhancement, A-diagnostics, E-mentor, T-compiler, E-help-wanted, E-medium", "label": "low", "label_id": 3} |
| {"id": "rust_63964", "text": "Bootstrap fails to build in not completely clean environment | * `git checkout 53df91a9b24ad999e7ca896447af6f5f74fe43bc` (today's master) * `make prepare` ``` [...] Compiling bootstrap v0.0.0 (/home/jethro/projects/rust/src/bootstrap) Finished dev [unoptimized] target(s) in 7.16s ``` (success) * `git checkout 72bfc375356b56933955e07471f91ef9 | labels: T-bootstrap, C-buglabelmediumlabel_id |
| idrust_63966textCall pinned method from Trait on generic parameter | I've found a problem regarding [Pin](https://doc.rust-lang.org/nightly/std/pin/struct.Pin.html) that I just can't solve and the current Nightly compiler gives a misleading suggestion. [This playground example serves well as a minimalist example](https://play.rust-lang.org/?versio | labels: A-diagnostics, T-compiler, C-bug, A-suggestion-diagnosticslabelmediumlabel_id |
| idrust_63967textredundant_semicolon and clippy::no_effect tripped without emitting line numbers | Using nightly-2019-08-26. In [this TiKV PR](https://github.com/tikv/tikv/pull/5261#issuecomment-525569617) we upgraded the compiler. Our tidb_query component tripped the redundant_semicolon lint (and seemingly in turn clippy::no_effect) but rustc/clippy did not tell us the line n | labels: A-lints, A-diagnostics, regression-from-stable-to-nightly, P-high, T-compiler, C-buglabelquestionlabel_id |
| idrust_63972textE0425 suggestion has `fn` keyword before `use ...;` | ```shell $ rustc --version rustc 1.39.0-nightly (4cf767307 2019-08-18) $ cargo --version cargo 1.38.0-nightly (e853aa976 2019-08-09) $ cat rust-toolchain nightly-2019-08-19 ``` ```rust #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct FileId(pub usize | labels: A-diagnostics, T-compiler, C-bug, A-suggestion-diagnostics, D-invalid-suggestionlabelmediumlabel_id |
| idrust_63974textConfusing error message on private newtype field | ``` $ rustc --version rustc 1.37.0 (eae3437df 2019-08-13) ``` To reproduce: ``` [dependencies] actix-web = \ ``` ``` use actix_web::web; fn main() { let a: web::Query<i32> = web::Query(4); } ``` `Query` is defined as: `pub struct Query<T>(T);` Yet, the error message: ``` er | labels: A-diagnostics, A-visibility, T-compiler, C-bug, A-suggestion-diagnosticslabelmediumlabel_id |
| idrust_63976textIncorrect error message when accessing private field of union | ```rust #[derive(Copy, Clone)] pub struct B; mod a { pub union U { pub a: i32, b: crate::B, } } fn new(a: i32) -> B { unsafe { a::U { a }.b } } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=d461d59d40a77187aa1f38e1861f0801)) Errors: `` | labels: E-easy, A-diagnostics, A-visibility, T-compiler, C-buglabellowlabel_id |
| idrust_63977textWeird segfault when trying inline asm on macOS in Rust | Hello! I tried this piece of code: ```Rust #![feature(asm)] fn main() { unsafe { asm!(\: : :\ :\) }; } ``` On windows it compiles and runs normally. On my macOS it compiles with no error or warn | labels: O-macos, A-inline-assembly, T-compiler, requires-nightlylabelmediumlabel_id |
| idrust_63978textReducing the memory/bandwidth footprint of submodules with ./x.py? | I recently tried to compile rust by using the `./x.py` script. I noticed that the first thing that happens is a full clone of all the git submodules (see https://github.com/rust-lang/rust/blob/master/src/bootstrap/bootstrap.py#L679-L687). Cloning the whole history of all the subm | labels: C-enhancement, T-bootstraplabelquestionlabel_id |
| idrust_63981textSelf::fn_name returns non-static fn item | It's hard to describe, but this fails to compile [playground](https://play.rust-lang.org/?gist=b8ea20af2f92d025b0fa2176346a971e): ```rust trait Foo { fn bar() { Self::bar.type_id(); // Any::type_id, Any requires 'static } } ``` Error: ``` error[E0310]: the parameter type `Self` m | labels: A-lifetimes, A-trait-system, T-lang, T-compiler, C-buglabelmediumlabel_id |
| idrust_63983textUnify errors for Unit pattern on Tuple and Struct variants | Code Example ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=73d19f6e2a08205bb03e3741d6588de5)): ``` enum MyEnum { Tuple(i32), Struct { s: i32 }, } fn foo(en: MyEnum) { match en { MyEnum::Tuple => \, MyEnum::Struct => \, }; } ``` <img width | labels: E-easy, C-enhancement, A-diagnostics, P-low, T-compiler, A-suggestion-diagnosticslabellowlabel_id |
| idrust_63987textLint against overlapping pattern ranges and pattern ranges with small holes caught by `_` | For both exclusive(nightly) and inclusive range patterns, we don't have any lint about overlapping ranges. We probably should complain about `100..=500` being partially covered already. This would minimize the likelihood of the following off-by-one error going unnoticed: ``` fn m | labels: C-enhancement, A-lints, A-diagnostics, T-lang, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_63988", "text": "Suggest borrowing when doing `if let Some(_)` from non-Copy ADT | Just got this error: ``` error[E0382]: borrow of moved value: `x` --> src/librustc_mir/hair/pattern/_match.rs:1614:53 | 1611 | if let Some(range) = x { | ----- value moved here ... 1614 | debug!(\"intersection {:?}\", x); | ^ value borrowed here after partial move | = note: move oc | labels: C-enhancement, A-diagnostics, T-compiler, A-suggestion-diagnostics, D-papercut, D-newcomer-roadblock", "label": "low", "label_id": 3} |
| {"id": "rust_64002", "text": "Misleading error messages about lifetimes and borrowing | The error message is misleading that it led me to another approach through which I can't fix my program. ```log error[E0597]: `line` does not live long enough --> src/main.rs:24:30 | 24 | let spt: Vec<&str> = line.split(char::is_whitespace).collect(); | ^^^^ borrowed value does n | labels: A-diagnostics, A-lifetimeslabelmediumlabel_id |
| idrust_64004textasync-await: mutually recursive functions compile sometimes | In the following code: ```rust async fn rec_1() { rec_2().await; } async fn rec_2() { rec_1().await; } ``` This gives an error when it is a part of a `lib` crate. However, as a part of a `bin` crate, it compiles. Here's an [erroneously compiling playground link](https://play.rust | labels: A-async-await, AsyncAwait-Polish", "label": "medium", "label_id": 2} |
| {"id": "rust_64006", "text": "Dependencies with build script fail on FreeBSD + 1.39 nightly | Tested on various crates like bindgen, backtrace, async-std, etc, that has one or more -sys dependencies that include a build.rs file. All such deps fail with errors like: ``` error: failed to run custom build command for `openssl-sys v0.9.49` Caused by: process didn't exit succe | labels: P-medium, regression-from-stable-to-nightly, T-compiler, O-freebsd, C-buglabelcritical_buglabel_id |
| idrust_64009textWhy can't update libc to 0.2.63 or 0.2.64? | I notice by default we are using libc 0.2.61. and we can update it to 0.2.62 if using \"cargo update -p libc\". But I see the latest libc version is 0.2.64. Is there any special reason that prevent us from using the version 0.2.63 or version 0.2.64? Thanks, Baoshan", "label": "medium", "label_id": 2} |
| {"id": "rust_64013", "text": "Segfaults on FreeBSD in some cases since 1.37.0 | I have a crate that links to library in base for FreeBSD, up until 1.37 it was working fine. Since 1.37 and after it started segfaulting on certain calls. I can't reproduce it outside of FreeBSD, but here is is the \ [example](https://github.com/Inner-Heaven/libnv-rs/bloblabelquestionlabel_id |
| idrust_64020text`miri` no longer builds after rust-lang/rust#63402 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#63402, I observed that the tool miri has failing tests. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @estebank, do you think you would have t | labels: T-compilerlabelmediumlabel_id |
| idrust_64022textTracking issue for making `Vec::new` a `const fn` | This tracks stabilization of the `const_vec_new` feature, introduced in https://github.com/rust-lang/rust/pull/50233, which allows calling `Vec::new` in a constant expression. | labels: A-collections, T-lang, T-libs-api, B-unstable, C-tracking-issue, A-const-evallabelmediumlabel_id |
| idrust_64024textMatches on tuples of boxes present incorrect dereference help text | Consider the following broken code([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=f9637cf1265ffb17eeac765c000ba345)): ```rust struct S(i32); fn main() { let x = Box::new(S(1)); let y = Box::new(S(2)); let f = match (x, y) { (S(a), S(b)) => (a | labels: A-diagnostics, T-compiler, C-bug, A-suggestion-diagnostics, D-invalid-suggestionlabelmediumlabel_id |
| idrust_64027textRangeBounds<T> impl for Range*<&T> is missing ?Sized | Much like the impl for `(Bounds<&T>, Bounds<&T>)`, `impl<T> RangeBounds<T> for RangeFrom<&T> {` could use a `T: ?Sized`. This would allow ```rust let map = BTreeMap::<String, i32>::new() map.range::<str, _>(\..); ``` to compile the way it does when using Bound. (Unfortunately I | labels: E-mentor, T-libs-api, C-feature-requestlabelmediumlabel_id |
| idrust_64033textHelp with enum of Box through FFI | Hello everyone! I am having an issue understanding how to share an Enum, where some variants holds a Box, through FFI boundary. The Enum looks like this: ```Rust #[derive(Debug)] #[repr(C)] pub enum SchemeType { Ip, Bytes, Int, Bool, Array(Box<SchemeType>), Map(Box<SchemeType>), labelquestionlabel_id |
| idrust_64034textC++ compiler cache causes compiler segfaults on ARM | Since the LLVM 9 update, rustc will segfault on ARM hosts with opt-level > 0 and codegen-units > 1. The possible cause is that GCC ARM C++ ABI is not very stable (sometimes you will see the \ note) and sccache dlabelmediumlabel_id |
| idrust_64037textIncorrect unused warning when value is used for a comparison inside a function invocation | The following code generates an unused variable warning for x: ``` fn test(v: bool) { println!(\, v); } fn main() { let mut x: Option<u32> = None; x = Some(5); test(x.unwrap() == 5); } ``` ``` --> test.rs:6:11 | 6 | let mut x: Option<u32> = None; | ^ | = note: `#[warnlabelmediumlabel_id |
| idrust_64045textIncorrect error reported for doc comment on if statement | Example code ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3391ce9f657a47424a118ad9a6941a99)): ```rust fn main() { /// Accidental doc comment if true { } } ``` Error: <img width=\ alt=\ src=\, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : attempt to negate with overflow\, : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : {:?}\, : , : 2} |
| {: , : C\C\C\, : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : unreachable expression\test\oh no\test\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : varia | labels: T-rustdoc, C-buglabellowlabel_id |
| idrust_64147text./x.py clippy is broken | commit 5f42f3e108db9390038a93fc95d9376aa871ae34 Running `./x.py clippy` results in the following message: ``` $ ./x.py clippy Updating only changed submodules Submodules updated in 0.05 seconds Finished dev [unoptimized] target(s) in 0.11s Checking rustdoc artifacts (x86_64-apple | labels: T-compiler, T-bootstrap, C-buglabelmediumlabel_id |
| idrust_64153textThinLTO and `-o` compiler option can lead to duplicate object file inclusion in staticlib | I've verified this on macOS 10.14/Xcode 10.3 as well as Ubuntu 14.04/GCC 4.8 rustc -V: rustc 1.36.0-nightly (50a0defd5 2019-05-21) (although the code i mention is the same in master) tl;dr object files (`.o`) prefixes are inferred from `-o`, but lto object file exclusion uses cra | labels: A-linkage, O-linux, O-macos, P-high, T-compiler", "label": "high", "label_id": 1} |
| {"id": "rust_64187", "text": "cdylib for the target `wasm32-wasi` | <!-- Thanks for filing a 🐛 bug report 😄! --> **Problem** cannot produce cdylib for the target `wasm32-wasi` **Steps** <!-- The steps to reproduce the bug. --> 1. Add \"cdylib\" to the Cargo.toml, e.g. ``` cargo new check-wasi && cd check-wasi echo \"[lib]\" >> Cargo.toml echo \"crate- | labels: T-compiler, O-wasm, C-feature-accepted", "label": "question", "label_id": 4} |
| {"id": "rust_64163", "text": "`clippy-driver` no longer builds after rust-lang/rust#64160 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#64160, I observed that the tool clippy-driver no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rust-clippy is needed to fix the fallout. cc @Centril, do you think yo | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_64165", "text": "E0631 has duplicated diagnostics | https://github.com/rust-lang/rust/blob/master/src/test/ui/anonymous-higher-ranked-lifetime.stderr has duplicated redundant diagnostics. We should come up with a deduplicating strategy to avoid them. | labels: E-easy, C-enhancement, A-diagnostics, P-low, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_64169", "text": "No unnecessary parentheses warning in types | Types can be parenthesized, which is useful for e.g. `dyn (Foo + 'static)` or similar, but often these parentheses are unnecessary. Whenever a trivial type is parenthesized the compiler should suggest to remove the parentheses ```rust pub fn foo() -> (i32) { 42 } ``` ([Playground | labels: E-easy, C-enhancement, A-lints, E-mentor, T-compiler, E-help-wantedlabellowlabel_id |
| idrust_64170textFile and Metadata should document reasons to prefer *not* to use `is_file()` | As per https://github.com/rust-lang/rust-clippy/issues/4503, there's a bit of a trap you can fall into if you use `is_file()` as a predictor for \"can I probably open and read bytes from this thing\". You *generally* don't want to assert `is_file()` for user specified paths, **espe | labels: C-enhancement, T-libs-api, A-docslabellowlabel_id |
| idrust_64173textUnused lifetime cause ICE | The following code ICE's on stable, beta and nightly: ```Rust use core::mem::size_of; struct Bug<'s> { array: [(); size_of::<&Self>()], } ``` <details> <summary>Backtrace:</summary> ``` Compiling playground v0.0.1 (/playground) error: internal compiler error: src/librustc_mir/bor | labels: E-hard, I-ICE, E-needs-test, P-medium, T-compiler, A-NLLlabelhighlabel_id |
| idrust_64176textLifetime error when Send is enforced on async function return type | Just like a lot of lifetime issues, I'm not actually sure whether this is a bug in the compiler or a bug in my code. The following code: ```rust use std::pin::Pin; use std::future::Future; trait FooRef<'a> { type Elem; fn next_elem(self) -> Pin<Box<dyn Future<Output = Self::Elem> | labels: T-lang, T-compiler, A-async-await, AsyncAwait-Triagedlabelmediumlabel_id |
| idrust_64179text`rls` no longer builds after rust-lang/rust#64172 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#64172, I observed that the tool rls no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rls is needed to fix the fallout. cc @Centril, do you think you would have time | labels: T-compilerlabelmediumlabel_id |
| idrust_64180text`rustfmt` no longer builds after rust-lang/rust#64172 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#64172, I observed that the tool rustfmt no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rustfmt is needed to fix the fallout. cc @Centril, do you think you would ha | labels: T-compilerlabelmediumlabel_id |
| idrust_64183textMake x86_64-linux-kernel target be tier-2 | This would mean compiling libcore in CI, and publishing those artifacts. This would add a lot of value to the efforts to get Rust support into the mainline kernel, since it will mean all the building can be done with just cargo, no 3rd party tools. I'm happy to do whatever work i", "label": "question", "label_id": 4} |
| {"id": "rust_64184", "text": "Extend `span_label` to include fallback operation | There are occassions where `DiagnosticBuilder::span_label` can be called with a `DUMMY _SP`. The current behavior is we don't show those labels at all in the output. In some cases that is the correct behavior. In others, we proactively look for `DUMMY_SP`s and emit a `note` inste | labels: C-cleanup, A-diagnostics, T-compiler, D-diagnostic-infralabellowlabel_id |
| idrust_64185textCross-compilation of rust 1.37.0 fails with multiple crate matches | Having dealt with issue #63828, another one crops up which is more directly related to rust. While building, I hit several instances of this particular error message: ``` Compiling rustc-ap-arena v491.0.0 Compiling rustc-ap-syntax_pos v491.0.0 Compiling rustc-ap-rustc_errors v491 | labels: A-cross, O-netbsdlabelmediumlabel_id |
| idrust_64193text1946-intra-rustdoc-links issue | <!-- Thanks for filing a 🐛 bug report 😄! --> **Problem** <!-- A clear and concise description of what the bug is. --> <!-- including what currently happens and what you expected to happen. --> Links created according to [1946-intra-rustdoc-links](https://rust-lang.github.io/rfcs/ | labels: T-rustdoc, C-bug, A-intra-doc-linkslabellowlabel_id |
| idrust_64194textMaximum number of backtrace frames is not configurable | The standard library currently has a [hard-coded limit of 100 frames](https://github.com/rust-lang/rust/blob/618768492f0c731fcb770dc2d178abe840846419/src/libstd/sys_common/backtrace.rs#L18) when printing a backtrace. However, some applications may have larger call stacks - withou | labels: T-libs-apilabelmediumlabel_id |
| idrust_64196textAdd Fuchsia to actually_monotonic | std's internal [actually_monotonic](https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/time.rs#L311-L315) function is used to determine which platforms' clocks are truly monotonic. Those that aren't (that have been observed to sometimes go backwards in practice) re", "label": "medium", "label_id": 2} |
| {"id": "rust_64197", "text": "Consider moving out-of-line module loading from parser to expansion | Due to module loading parser has to do some not very appropriate for a parser things like - expanding `cfg`s on modules (duplicated with expansion) - keeping the current filesystem position (duplicated with expansion) We also don't really need to load those files until we need to | labels: A-frontend, A-parser, A-macros, T-compilerlabelmediumlabel_id |
| idrust_64199textPoor error message when using `self: Box<Self>` | The following code produces a very confusing error message. ```rust struct Foo; impl Foo { fn consume(self: Box<Self>) {} } fn bar() { let x = Foo; x.consume(); } ``` ``` error[E0599]: no method named `consume` found for type `Foo` in the current scope --> src/lib.rs:9:7 | 1 | st | labels: A-diagnostics, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_64201", "text": "Cannot declare const in function scope that depends on generic impl const | The compiler misreports the following as error 401, saying you can't use generic parameters from an outer function. ```rust trait X { const Y: i32; } trait Z { fn a() -> i32; } struct B<T> { t: std::marker::PhantomData<T> } impl<T: X> Z for B<T> { fn a() -> i32 { const C: i32 = T", "label": "medium", "label_id": 2} |
| {"id": "rust_64205", "text": "annotate-snippet emitter: Add UI test where `annotated_files` count is > 1 | Part of #59346 It would be nice to have a UI test for the annotate-snippet emitter, that includes annotations that span multiple files. The goal of this issue is to find and add such a test. ## Instructions A simple way to look for this, would be to add this code: ```rust if anno | labels: C-enhancement, A-diagnostics, E-mentor, T-compiler, E-help-wanted", "label": "low", "label_id": 3} |
| {"id": "rust_64210", "text": "Curious errors with misused qualified method call syntax | The qualified method call syntax (`<Type as Trait>::method()`) accepts both tyṕes and modules as the trait. This leads to some interesting errors. ``` fn main() { <f32 as f32>::ceil(1.0); <f32 as String>::ceil(1.0); <f32 as std>::ceil(1.0); } ``` Results in ``` error[E0576]: cann | labels: A-diagnostics, T-compiler, C-bug, D-papercut", "label": "medium", "label_id": 2} |
| {"id": "rust_64212", "text": "[Feature Request] compile time arguments | Currently the closest thing to C's preprocessor conditional compilations we have is the cfg and the features. But there's one missing piece, and that's and that's values in those variables. Currently the design idea of features is to be incremental which doesn't make sense with hlabelmediumlabel_id |
| idrust_64214textHashMap slow compared to hashbrown implementation | Since Rust 1.36 the HashMap implementation in the standard library should be ported from [hashbrown](https://github.com/rust-lang/hashbrown) (see #56241)). But when benchmarking both, hashbrown is a lot faster (3x) on inserts than the HashMap in the standard library: ```bash $ calabelmediumlabel_id |
| idrust_64215text`clippy-driver` no longer builds after rust-lang/rust#64209 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#64209, I observed that the tool clippy-driver no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rust-clippy is needed to fix the fallout. cc @Centril, do you think yo | labels: T-compilerlabelmediumlabel_id |
| idrust_64217textTracking issue: slice_internals? | I was looking at the unstable [`core::slice::memchr`](https://doc.rust-lang.org/core/slice/memchr/fn.memchr.html) API, and couldn't figure out the corresponding tracking issue (it's still set to `#0`). Is there meant to be one? How can I read up on its stabilization status? Thanklabelmediumlabel_id |
| idrust_64218textLLVM doesn't build on the first try when cross compilling to windows-gnu host | Running `./x.py build --host x86_64-pc-windows-gnu --target x86_64-pc-windows-gnu` from Linux will fail on building LLVM for Windows (so it's 2nd LLVM build) because somehow LLVM_ON_UNIX is defined: ``` /home/mateusz/Projects/rust/rust/src/llvm-project/llvm/include/llvm/Support/F | labels: A-LLVM, O-windows-gnu, T-bootstrap, C-buglabelquestionlabel_id |
| idrust_64219textMissed optimization: fn type calls returning never are not noreturn | We currently do not annotate calls to function types returning Never as `noreturn`, but we probably should. This is similar to #64090 . | labels: I-slow, C-enhancement, A-codegen, E-needs-test, T-compiler, C-optimizationlabellowlabel_id |
| idrust_64222textMissed optimization: catch_unwind not removed when closure never unwinds | Consider this C++ code (https://gcc.godbolt.org/z/iaSj6g) ```c++ extern \ void foo() noexcept; int bar() { try { foo(); return 42; } catch(...) { return 13; } } ``` which gets optimized to: ```asm bar(): # @bar() push rax call foo mov eax, 42 pop rcx ret ``` Now consider the se | labels: I-slow, T-compiler, C-buglabelmediumlabel_id |
| idrust_64223textMigrate to LLVM{Get,Set}ValueName2 | We currently use the C APIs `LLVM{Get,Set}ValueName` which return/take a 0-terminated `char *`, but those APIs have been deprecated a while ago in favor of `LLVM{Get,Set}ValueName2` which return/take pairs of `char *` + length (the C-friendly lowering of `llvm::StringRef`) which | labels: C-cleanup, A-LLVM, T-compilerlabellowlabel_id |
| idrust_64224textWhy is the code size of catch_unwind so large ? | While filling #64222 I noticed that we generate more code than C++ for `catch_unwind`. That did not feel right, since C++'s `catch` can do much more than Rust's catch unwind, e.g., filtering different types of exceptions, etc. MWE: C++ (https://gcc.godbolt.org/z/z_dgPg): ```c++ e | labels: C-enhancement, T-libs-api, T-compiler, I-heavylabellowlabel_id |
| idrust_64228textfmt::Debug for right-to-left strings | When formatting strings using fmt::Debug, the normal right-to-left characters are printed as is. This will mangle the entire display line in a rather unpredicable way. [Playground demo](https://play.rust-lang.org/?version=stable&mode=debug&edition=2015&gist=03b109a38ef2ecdd7b318f | labels: T-libs-api, C-buglabelmediumlabel_id |
| idrust_64234textUnnecessary mov instruction | For the following code ```rust extern \ { fn moo(a: i64); } pub unsafe fn baa(a: i64) { if a != 0 { moo(a); } moo(a); } ``` I get the following assembly ```asm example::baa: push rbx mov rbx, rdi test rdi, rdi je .LBB0_2 mov rdi, rbx ;unnecessary call qword ptr [rip + moo@GOTPClabelmediumlabel_id |
| idrust_64238textFactor out pluralisation checks in diagnostics | The following pattern is common in diagnostic messages in rustc: ```rust format!(\, x, if x != 1 { \ } else { \ }) ``` It would be good to extract all of these pluralisation checks into a function or macro: ```rust format!(\, x, pluralise(x)) | labels: E-easy, C-cleanup, E-mentor, T-compiler, E-help-wantedlabellowlabel_id |
| idrust_64239textcompiler-rt missing from rustc-1.37.0-src.tar.gz | In #60981 we switched to detecting compiler-rt's presence in `src/llvm-project/compiler-rt` and enabling the `c` feature for `compiler-builtins` if present, falling back to rust-only otherwise. In the git checkout, this works fine, however the `compiler-rt` directory is missing f", "label": "medium", "label_id": 2} |
| {"id": "rust_64244", "text": "`miri` no longer builds after rust-lang/rust#64230 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#64230, I observed that the tool miri has failing tests. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @Centril, do you think you would have ti | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_64245", "text": "Tracking Issue for Cross Compiling Doctests | This is an issue to track the functionality added by [PR#60387](https://github.com/rust-lang/rust/pull/60387), and also by extension [this PR](https://github.com/rust-lang/cargo/pull/6892) in cargo. PR#60387 adds three options to rustdoc: + `--enable-per-target-ignores` which add | labels: T-rustdoc, A-cross, B-unstable, C-tracking-issue, A-doctests, requires-nightly", "label": "medium", "label_id": 2} |
| {"id": "rust_64247", "text": "Self::EnumVariant not considered const fn | When using `Self` to create an enum variant in Rust 1.37+, we get an error: ``` const VAL: Self = Self::X(42); ``` results in: ``` error: `Foo::X` is not yet stable as a const fn ``` but if the enum is constructed explicitly, the compilation succeeds: ``` const VAL: Self = Foo::X | labels: A-diagnostics, T-lang, T-compiler, C-feature-request, A-const-eval", "label": "medium", "label_id": 2} |
| {"id": "rust_64248", "text": "Builder got stuck on \"Updating crates.io index\" | In https://github.com/rust-lang/rust/pull/64246#issuecomment-529094551, the test-various builder got stuck (https://dev.azure.com/rust-lang/rust/_build/results?buildId=7573): ``` 2019-09-07T06:17:08.8395892Z extracting /checkout/obj/build/cache/2019-08-13/cargo-beta-x86_64-unknow | labels: A-spurious, T-infra, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_64249", "text": "`cargo new` generate symbolic link of unknown purpose | Every time I create a new Rust project in a folder that is not the part of Git repository, cargo creates an extra file, which seems to be some kind of symbolic link, with the name of the following format: `_git2_a#####` where the `#` is a (random?) single digit. Example: ```conso", "label": "medium", "label_id": 2} |
| {"id": "rust_64251", "text": "Incorrect mixing of reexport and definition documentation of proc macros | The PR #62855 improved the situation about documenting proc macros. Thanks for that! However, I noticed a bug with it. I'm using `rustc 1.39.0-nightly (6e19f3f38 2019-09-06)`. **`Cargo.toml`** ```toml [package] name = \ version = \ authors = [\] edition = \ | labels: T-rustdoc, A-macros, C-buglabelmediumlabel_id |
| idrust_64252textDiagnostics: help text for missing left-hand side in arbitrary self type | Forgetting to include the left-hand side of an arbitrary self type can give some confusing errors. This was reported by someone trying to implement a future manually, and the diagnostics threw them off. I realize diagnostics for arbitrary self types are an open issue, but figured | labels: C-enhancement, A-diagnostics, T-compiler, A-suggestion-diagnosticslabellowlabel_id |
| idrust_64260textTracking issue for `bool::then_some` | Tracking issue for the `bool::then_some` method, which abstract the following pattern: ```rust if some_condition { Some(t) } else { None } ``` `bool:then` has previously been stabilised as part of this feature gate: https://github.com/rust-lang/rust/pull/79299 RFC: https://github | labels: T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period, requires-nightlylabelmediumlabel_id |
| idrust_64268textE0514 compiling hello world on nightly-armv7-unknown-linux-gnueabihf | # Steps to reproduce ```sh cargo new --bin compile-fail cd compile-fail rustup override set nightly cargo check --verbose ``` Output: ``` Created binary (application) `compile-fail` package info: using existing install for 'nightly-armv7-unknown-linux-gnueabihf' info: override tolabelmediumlabel_id |
| idrust_64282textRegression of #63210 param attributes not showing in proc-macro TokenStream | It seems https://github.com/rust-lang/rust/issues/63210 isn't actually fixed. Run `cargo test -- --nocapture` and you'll see the `TokenStream` does not contain any attributes on a parameter: https://github.com/bbqsrc/params-attribute-example | labels: A-pretty, A-attributes, P-high, requires-nightly, F-param_attrslabelhighlabel_id |
| idrust_64285textEnforce `min_const_fn` by default in `staged_api` with opt-out | We want to switch to a scheme where everything inside the standard library requires `min_const_fn` by default. If an additional `#[rustc_not_min_const_fn]` is present, then the function will be uncallable from any `min_const_fn`. It's also important to note that a function `#[rus | labels: C-enhancement, A-attributes, P-medium, A-stability, T-compiler, A-const-eval", "label": "low", "label_id": 3} |
| {"id": "rust_64287", "text": "Error: Can't find crate for core | Hi folks! I am testing few things for a rust based operating system. I run make and I get error[E0463]: can't find create for `core` note: the `x-y-unknown-none` target may not be installed When I do `rustc --explain E0463`, I get: ``` A plugin/crate was declared but cannot be fo", "label": "medium", "label_id": 2} |
| {"id": "rust_64289", "text": "Support running with new pass manager | Rustc currently still uses the legacy LLVM pass manager. There's been some discussion about enabling NewPM by default for Clang 10, so we might want to start migrating in that direction as well. To start with, we'd probably want a debug option `-Z llvm-pass-manager=new` that is n | labels: A-LLVM, T-compiler", "label": "question", "label_id": 4} |
| {"id": "rust_64298", "text": "Suggest introduction of new type argument | When writing `impl Trait<T> for X {}` We correctly complain about `T` not being in scope. We should also suggest introducing a new type argument in the correct place. | labels: C-enhancement, A-diagnostics, P-low, T-compiler, A-suggestion-diagnostics, D-papercut", "label": "low", "label_id": 3} |
| {"id": "rust_64300", "text": "RustC Panic | ``` thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', src/libsyntax/source_map.rs:842:17 stack backtrace: thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', src/libsyntax/source_m | labels: I-ICE, A-parser, A-Unicode, A-cross, T-compiler", "label": "high", "label_id": 1} |
| {"id": "rust_64301", "text": "Too many `memcpy`s | Cachegrind profiles indicate that the Rust compiler often spends 3-6% of its executed instructions within `memcpy` (specifically `__memcpy_avx_unaligned_erms` on my Linux box), which is pretty incredible. I have modified DHAT to track `memcpy`/`memmove` calls and have discovered | labels: I-compiletime, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_64304", "text": "SGX's std::env::args function is not thread-safe | The `args` method is defined as follows. ```rust pub fn args() -> Args { let args = unsafe { (ARGS.load(Ordering::Relaxed) as *const ArgsStore).as_ref() }; if let Some(args) = args { Args(args.iter()) } else { Args([].iter()) } } ``` Clean-up function is defined as follows; ```ru | labels: T-libs-api, I-unsound, C-buglabelcritical_buglabel_id |
| idrust_64305textInstead of hiding rustdoc search bar by default, disable it | It'd have the advantage of not having the not so pretty effect we have currently when the search bar \"appears\". | labels: T-rustdoc, C-enhancement", "label": "low", "label_id": 3} |
| {"id": "rust_64309", "text": "Doc tests use RUST_LOG variable | ### To reproduce 1. `cargo new --lib doctest_spam` 2. `cd doctest_spam` 3. `RUST_LOG=info cargo test --doc` ### Expected results ``` Finished dev [unoptimized + debuginfo] target(s) in 0.01s Doc-tests doctest_spam running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 | labels: T-rustdoc", "label": "medium", "label_id": 2} |
| {"id": "rust_64310", "text": "Cannot opt out of LLVM MergeFunctions pass on stable | LLVM's MergeFunctions introduces aliases which can trigger a bug in macOS's `ld64` linker when compiling with ThinLTO: https://github.com/froydnj/ld64-aliases-bug For this reason Firefox has to be built with a patched version of `ld64` when compiling with xLTO. Since the bug in q | labels: A-linkage, A-LLVM, O-macos, A-codegen, T-compiler, I-unsound", "label": "question", "label_id": 4} |
| {"id": "rust_64314", "text": "Add other variants to std::io::ErrorKind enum | I was trying to rewrite Python code in Rust and I need to match against what could be `NotADirectory` (`ENOTDIR`) and saw that `ErrorKind`'s variants do not include many `errno`s present in `libc` - to speak only of the Unix platform - including the one I need. Is there a reason | labels: T-libs-api, C-feature-requestlabelmediumlabel_id |
| idrust_64319textSymbol names may not correctly account for optimization level differences between crates | On investigating https://github.com/rust-lang/wg-cargo-std-aware/issues/32 I've managed to reduce this down to: ``` $ cat foo.rs pub fn foo() { bar::<usize>(); } pub fn bar<T>() { baz(); } fn baz() {} $ cat bar.rs extern crate foo; pub fn bar() { foo::foo(); } $ rustc --crate-typ | labels: A-linkage, A-codegen, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_64322", "text": "Incorrect doc for checked_duration_since | \"... or None if that instant is earlier than this one\" should be \"... or None if that instant is *later* than this one\" | labels: E-easy, A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_64335", "text": "Missed niche opportunity in simple nested enum | ``` pub enum Foo { A, B, C, } pub enum Bar { Foo(Foo), D, E, } pub enum Foo2<T> { A(T), B(T), C(T), } pub enum Bar2<T> { Foo(Foo2<T>), D(T), E(T), } fn main() { use std::mem::size_of; dbg!(size_of::<Bar>()); // = 1 dbg!(size_of::<Bar2<()>>()); // = 1 dbg!(size_of::<Bar2<u8>>()); ", "label": "medium", "label_id": 2} |
| {"id": "rust_64336", "text": "manifest path to bootstrap/Cargo.toml does not exist, when it does | I do not know what is going on when I am building rust from source. what is going on is that I run `python x.py build` and it caches `rust-std-beta-i686-pc-windows-gnu` for whatever reason even though I've set my target in config.toml to be `x86_64-pc-cygwin` so I'd think it shou | labels: T-bootstrap, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_64338", "text": "Ffi safe lint ICE with type alias impl trait | ```rust #![feature(type_alias_impl_trait)] type A = impl Fn(); fn ret_closure() -> A { || {} } extern \"C\" { fn a(_: A); } fn main() {} ``` ``` error: internal compiler error: src/librustc_lint/types.rs:858: Unexpected type in foreign function thread 'rustc' panicked at 'Box<Any>' | labels: I-ICE, T-compiler, A-impl-trait, C-bug, F-type_alias_impl_trait", "label": "high", "label_id": 1} |
| {"id": "rust_64339", "text": "Error with -Z time-passes | ``` $ rustc --version rustc 1.39.0-nightly (0b36e9dea 2019-09-09) $ export RUSTFLAGS=\"-Z time-passes\" $ cargo build error: failed to parse the cfg from `rustc --print=cfg`, got: ___ lib___.rlib lib___.so lib___.so lib___.a lib___.so /home/erlend/.rustup/toolchains/nightly-x86_64- | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_64340", "text": "Linking issue with Rust 1.37.0 | See [build log](https://gist.github.com/vitvakatu/0e76378d0977e6e6dfd5fb5e29473179). It looks like name mangling doesn't work correctly when linking with a dynamic library which is also depends on `libstd`. The application structure is the following: 1. Large `dylib` crate `java_ | labels: A-linkage, P-high, T-compiler, regression-from-stable-to-stable, C-buglabelcritical_buglabel_id |
| idrust_64341texttoolstate: allow toolstate x->build_fail in rollup PRs | I was trying to implement this myself but was not sure about implementation details, so making a ticket... Currently, a PR that modifies a tool and does not change it to \ will fail. If we allowed \ -> \, \ -> \, and \, : , : 3} |
| {: , : /usr/bin/gdb\-q | labels: A-testsuite, A-debuginfo, P-high, T-compiler, C-buglabelquestionlabel_id |
| idrust_64345textdecrease compilation timelabelmediumlabel_id |
| idrust_64346textquestion: when there will a Cranelift backend will availablelabelquestionlabel_id |
| idrust_64350textsender Cannot exit while using nested | When I crawled the web pages with rust and curl, I needed to handle the redirected connections, so I created channels to handle the target, but when all the channels were finished, the program didn't quit and was still waiting I tried drop(), but it didn't work the code: ```rust labellowlabel_id |
| idrust_64352textRename `Kind` | A `Kind` is not really a kind: it's a term (e.g. a particular type, a particular lifetime or a particular value). However, \"`Term`\" is overloaded as terms are usually values of particular types (which is just one case here). `KindedTerm` has been suggested. | labels: C-cleanup, I-needs-decision, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_64353", "text": "Rename `.sty` field on `TyS` | `.kind` makes more sense, but could be confusing, as it's not a [type-theoretic kind](https://en.wikipedia.org/wiki/Kind_(type_theory)). There's also the issue of having inconsistent ways to name a field containing a `*Kind`, e.g. `.node` and `.kind`. It would be good to make the | labels: C-cleanup, I-needs-decision, T-compiler, S-waiting-on-bikeshed", "label": "low", "label_id": 3} |
| {"id": "rust_64355", "text": "Nightly segfaults in release mode on armv7-unknown-linux-gnueabihf | Building any binary in release mode on `armv7-unknown-linux-gnueabihf` with `nightly-2019-09-09` results in segmentation fault: ```sh $ cargo new foo && cd foo && cargo +nightly build --release Created binary (application) `foo` package Compiling foo v0.1.0 (/tmp/foo) error: Coul | labels: I-crash, O-Arm, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_64356", "text": "Tricky error with `rustc-std-workspace-core` crate. | I'm not very sure whether this is a bug or not. But let me write down the reproduction steps. I'm using the newest stable. Cargo.toml: ``` [package] name = \"dummy\" version = \"0.0.1\" edition = \"2018\" [dependencies] core = { version = \"1.0\", package = \"rustc-std-workspace-core\"} ``", "label": "medium", "label_id": 2} |
| {"id": "rust_64362", "text": "\"variant is never constructed\" lint appears to be incorrect? | This code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=c03d4fa0a396d0476637d39c43bda0c2)) causes a \"variant is never constructed\" lint, even though the variant is constructed in the `FromStr` implementation: ```rust use std::str::FromStr; | labels: A-lints, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_64363", "text": "`miri` no longer builds after rust-lang/rust#64354 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#64354, I observed that the tool miri has failing tests. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @Centril, do you think you would have ti | labels: P-medium, T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_64364", "text": "`extern crate foo as core` breaks resolution in macros | Broken in a recent nightly. Reproducer ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=b2ebe9fed3b69a7eaef700018e5a9b51)): ```rust extern crate futures as core; fn bar() { let _ = format!(\"{}\", 42); } ``` Gives the following: ``` error[E0433", "label": "medium", "label_id": 2} |
| {"id": "rust_64365", "text": "ICE encountered in 1.37 stable borrowck | reproduction branch: https://github.com/spacejam/sled/tree/tyler_ice_ice_baby the last commit is the one-line-change that induces the panic rustc 1.37.0 (eae3437df 2019-08-13) running on x86_64-unknown-linux-gnu ``` λ cargo build --verbose Fresh unicode-xid v0.2.0 Fresh semver-pa | labels: I-ICE, A-borrow-checker, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_64370", "text": "Failure to install cargo package | When attempting to install a binary via cargo, I got a build failure. I tried this code: `cargo install fd-find` I expected to see this happen: Successful installation of fd. Instead, this happened: ``` cargo install fd-find [4:18:39] Updating crates.io index Installing fd-find v | labels: I-ICE, A-metadata, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_64371", "text": "Rustdoc generates illegal \"<div>\" inside \"<pre>\" with traits | Similar to the previous bugs I've filed in this regard with illegal html: In: 1.39.0-nightly (34e82a7b7 2019-09-10) The following trait definition: ```rust #[cfg_attr( feature = \, doc(include = \) )] #[cfg_attr( not(feature = \), | labels: T-rustdoc, C-buglabellowlabel_id |
| idrust_64376textDocument endianess of octets function on ipv4addr/ipv6addr | The docs of the octets function on [ipv6addr](https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.octets) and on [ipv4addr](https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.octets) don't tell about the endianess. Network or host order? <!-- TR | labels: C-enhancement, T-libs-api, A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_64379", "text": "Additional methods for TcpStream to provide more sockopts | Dear all, I'm writing a small TCP-based time-measuring tool and use the `std::net::TcpStream`. It turned out that I want to manipulate additional options via `setsockopt()`, but this is not available in the stable API of https://github.com/rust-lang/rust/blob/master/src/libstd/ne | labels: T-libs-api, C-feature-requestlabelquestionlabel_id |
| idrust_64382textConsider async blocks on lifetime errors | [The following incorrect code](https://github.com/bluejekyll/trust-dns/pull/849/files#diff-5cbe22b68a836c7213c624099dedb640R182) ```rust // For QoS, this will only accept one message and output that // receive all inbound messages // TODO: this should match edns settings loop { l | labels: A-diagnostics, A-borrow-checker, T-compiler, A-async-await, AsyncAwait-Polish, AsyncAwait-Triagedlabelmediumlabel_id |
| idrust_64385text\ | ##### src/lib.rs: ```rust struct S(#[attr] u8); ``` Stable, and nightly-2019-09-09: ```console error[E0658]: the attribute `attr` is currently unknown to the compiler and may have meaning added to it in the future --> src/main.rs:1:10 | 1 | struct S(#[attr] u8); | ^^^^^^^ | = not | labels: A-attributes, I-ICE, regression-from-stable-to-nightly, P-high, T-compiler, C-buglabelcritical_buglabel_id |
| idrust_64388textError diagnostic suggests syntactically invalid code | For the following code ([Playground link]): ```rust fn foo<'a>(u: &'a usize) -> impl IntoIterator<Item = usize> + 'a { std::thread::spawn(move || { println!(\"{}\", u); }); vec![] } ``` `rustc` provides the following error and suggestion: ``` error: cannot infer an appropriate life | labels: A-diagnostics, T-compiler, C-bug, A-suggestion-diagnostics, D-invalid-suggestion", "label": "medium", "label_id": 2} |
| {"id": "rust_64389", "text": "Spurious \"found two different crates with name `alloc`\" errors in PR builder | - https://github.com/rust-lang/rust/pull/64378#issuecomment-530412814 - https://github.com/rust-lang/rust/pull/64429#issuecomment-531692042 | labels: T-compiler, A-spurious, T-infra, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_64391", "text": "async functions fail to move values into generated futures in the latest nightly | This simple async function fails to compile on the newest nightly: https://github.com/sfackler/rust-postgres/blob/2cc5bbf21b654c26bfd8b1e80b1e5c7cbd81235f/tokio-postgres/src/lib.rs#L163-L172 ``` error[E0597]: `config` does not live long enough --> tokio-postgres/src/lib.rs:171:5 | labels: T-compiler, C-bug, A-async-await, AsyncAwait-Polish", "label": "medium", "label_id": 2} |
| {"id": "rust_64392", "text": "Async function return type inference fails without an ending return | I have a function of the signature `async fn run() -> Result<!, Box<dyn std::error::Error>>`. It ends with a loop that, as you may infer, never returns `Ok`. The inference for code generation failed, and the various compiler errors said that my function actually returned `()`. | labels: T-compiler, A-inference, C-bug, A-async-await", "label": "medium", "label_id": 2} |
| {"id": "rust_64397", "text": "rustdoc crashes parsing yet another strange doc-comment on 1.37 | I had a similar issue on 1.36 that seemed to have been fixed: https://github.com/rust-lang/rust/issues/62571 That fix looks like it went into 1.37, but I'm getting a crash running on a similar doc comment once again. Here is the offending doc-comment ``` #[doc = \, : , : 2} |
| {: , : {}\{}\, : , : 2} |
| {: , : Con\, : , : 2} |
| {: , : , : , : 1} |
| {: , : {}\{}\{}\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : hahaha\, : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : \, : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : srml-staking-npos-reward-curve\../npos-reward-curve\, : , : 1} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : field is never read\field is never used\, : , : 3} |
| {: , : unused manifest key\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : value\value\value\5\true\, : , : 3} |
| {: , : , : , : 4} |
| {: , : an operator to take a raw reference\, : , : 4} |
| {: , : , : , : 2} |
| {: , : unused lifetime parameter\user\gilescope\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : {}, {}, {}, {}\, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : -static\-pie\, : , : 2} |
| {: , : , : , : 0} |
| {: , : Install MSYS2\, : , : 2} |
| {: , : Hello!\, : , : 3} |
| {: , : , : , : 2} |
| {: , : C\C\C\C\, : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : \Ferris\{:?}\F\{:?}\e\{:?}\r\{:?}\Q\{:?}\labelmediumlabel_id |
| idrust_64590textConfusing 'unreachable code' error message when macro is involved | This code: ```rust macro_rules! early_return { () => { return () } } fn main() { return early_return!(); } ``` Gives the following warning: ``` warning: unreachable expression --> src/main.rs:8:5 | 8 | return early_return!(); | ^^^^^^^^^^^^^^^^^^^^^^ | = note: #[warn(unreachable_ | labels: C-enhancement, A-diagnostics, A-macros, T-compilerlabellowlabel_id |
| idrust_64593textUnnecessary improper_ctypes warning for extern \ | The following code generates an `improper_ctypes` warning: ```rust extern \ { fn foo(dest: &mut [u8]) -> Result<(), Error>; } ``` I would expect this sort of warning for an `extern \` declaration, but it seems incorrect for an `extern \` declaration. Am I misunderstan | labels: A-lints, T-compiler, C-buglabelmediumlabel_id |
| idrust_64602textRFC: Better/Shorter syntax to declare multiple variables | When we have multiple variable to be declared, we need to write something like this: ```Rust let (mut a, mut b, mut c, mut d) = (false, false, false, false); ``` There are two obvious factorizations: The first part is to factorize the `mut` decorator, so to be `let mut (a, b, c, | labels: needs-rfclabelmediumlabel_id |
| idrust_64605textHuge increase of size of std between 2019-07-07 and 2019-07-08 | ``` curl -sI https://static.rust-lang.org/dist/2019-07-0{7,8}/rust-std-nightly-x86_64-unknown-linux-gnu.tar.gz | rg content-length content-length: 82970771 content-length: 211283629 ``` this is a difference of around 120MiB :/ `librustc` alone has been increased by 60Mib that niglabelmediumlabel_id |
| idrust_64607textcompiler rejects to use self in match arm | Hi, I have the following Code [(Playground)](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c436b46fba25c33930edf4f984feec38) ```rust struct S { first: usize, second: usize, } impl S { fn matches(&self, v: usize) -> &'static str { match v { self.first => ", "label": "medium", "label_id": 2} |
| {"id": "rust_64609", "text": "-C target-feature/-C target-cpu are unsound | In a nutshell, target-features are part of the call ABI, but Rust does not take that into account, and that's the underlying issue causing #63466, #53346, and probably others (feel free to refer them here). For example, for an x86 target without SSE linking these two crates shows | labels: A-codegen, P-medium, T-compiler, I-unsound, C-bug, A-ABIlabelquestionlabel_id |
| idrust_64610textCompiler crashes during borrow checking. | ```rust struct Data<'a> { data: [u8; Self::SIZE], } impl<'a> Data<'a> { const SIZE: usize = 12; } ``` ``` Compiling playground v0.0.1 (/playground) error: internal compiler error: src/librustc_mir/borrow_check/nll/universal_regions.rs:741: cannot convert `ReEarlyBound(0, 'a)` to | labels: I-ICE, A-associated-items, A-borrow-checker, T-compiler, C-buglabelhighlabel_id |
| idrust_64612textSIGILL when statically linking with libc++.a on MacOS | I've a Rust project that dynamically links to `libc++` which I'm trying to statically link. Unfortunately building this project on MacOS results in a SIGILL error. I've simplified the project to the following minimal test case: https://github.com/basvandijk/sigill-error/ Building | labels: A-linkage, O-macos, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_64614", "text": "Omitting struct field name in cast | ```rust #[derive(Debug)] struct Example { value : u32 } fn main() { let value : i32 = 100; let example = Example { value : value as u32 // cannot remove the \"value :\" }; println!(\"{:#?}\", example) } ``` ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2", "label": "medium", "label_id": 2} |
| {"id": "rust_64620", "text": "Compiler panic when yielding array element from non-generator | Steps to reproduce: 1. Run `cargo new --lib crash`. 2. Replace `src/lib.rs` with this content: ``` #![feature(generators)] pub fn crash(arr: [usize; 1]) { yield arr[0]; } ``` 3. Run `RUST_BACKTRACE=full cargo +nightly build --verbose` to get this output: ``` Compiling crash v0.1. | labels: I-ICE, E-needs-test, T-compiler, C-bug, A-coroutines, F-coroutines", "label": "high", "label_id": 1} |
| {"id": "rust_64629", "text": "Rust should not link sanitizer runtimes unconditionally | I've noticed today that apparently Rust adds sanitizer runtimes such as the ASan runtime during linking and I found this runtime inside a static archive. As far as I know, these runtimes should not be part of static archives or DSOs, they should only be linked when creating an ex | labels: A-linkage, T-compiler, A-sanitizers, C-buglabelmediumlabel_id |
| idrust_64630textAsync struct method, <_'> lifetime shadowing | Hello, I ran into a problem using `<'_>` lifetime with async struct methods, here is the example: struct Foo<'a> { swag: &'a i32 } impl Foo<'_> { async fn bar(&self) -> i32 { 1337 } } The error is: `error[E0496]: lifetime name `'_` shadows a lifetime name that is already in scope | labels: A-lifetimes, T-compiler, C-bug, A-async-await, AsyncAwait-Polishlabelmediumlabel_id |
| idrust_64633textHow to handle reservation impls in rustdoc / error messages | I've opened this issue for discussion on how to handle reservation impls (see https://github.com/rust-lang/rust/issues/64631) in rustdoc and how to handle their error messages. | labels: A-trait-system, T-lang, requires-nightly, F-rustc_attrs", "label": "question", "label_id": 4} |
| {"id": "rust_64636", "text": "async functions with `unimplemented!()` are marked as unreachable | can reproduce with ```rust async fn example(){ unimplemented!() } ``` results in ``` warning: unreachable expression --> src/main.rs:1:19 | 1 | async fn example(){ | ___________________^ 2 | | unimplemented!() 3 | | } | |_^ | = note: `#[warn(unreachable_code)]` on by default ``` | labels: A-lints, T-compiler, C-bug, A-async-await", "label": "medium", "label_id": 2} |
| {"id": "rust_64638", "text": "ICE with return outside of function body | The following ICE's on stable, beta and nightly: ```Rust enum Bug { V1 = return [0][0] } ``` <details> <summary>Backtrace:</summary> ``` error: internal compiler error: src/librustc/ty/context.rs:556: node_type: no type for node `expr [0] (hir_id=HirId { owner: DefIndex(12), loca | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-buglabelcritical_buglabel_id |
| idrust_64651textInvalid `unreachable_code` in `async fn`. | From Rust `nightly-2019-09-16` to `nightly-2019-06-18`, something has caused the following code to start throwing an unreachable expression warning. Changing it from an `async fn` to an `fn` throws no warnings. ```rust async fn read_until(r: &mut std::net::TcpStream, byte: u8) ->labelmediumlabel_id |
| idrust_64655textDrop implementations not being called on panic with Fat LTO. | Hi, It looks like calls to `Drop::drop()` are getting removed when using `lto = \` for a release build. It doesn't seem to occur with `lto = \"thin\"` or `lto = \"no\"`. I've got a test case here: https://github.com/cstorey/fat-lto-drop-repro, which can be reproduced like this: ` | labels: A-destructors, P-high, T-compiler, regression-from-stable-to-stable, C-buglabelcritical_buglabel_id |
| idrust_64659textRustc panics while compiling gstreamer in RLS | RLS cannot build my project, which uses gstreamer. Compiling it normally with rustc works fine. `rustc 1.39.0-nightly (eceec57f7 2019-09-18)` `x86_64-unknown-linux-gnu` Affected project for reference: https://gitlab.gnome.org/World/Shortwave I launched RLS manually with `RUST_LOG | labels: I-ICE, P-high, T-compiler, A-save-analysis, C-bug, E-needs-mcvelabelquestionlabel_id |
| idrust_64662textICE: enum discriminant depends on generic arguments | Following code ICEs on today's nightly (97e58c0d3 2019-09-20): ```rust enum Foo { A = foo(), B = foo(), // <- error: internal compiler error: src/librustc/ty/mod.rs:2400: enum discriminant depends on generic arguments } const fn foo<T>() -> isize { 0 } ``` What's peculiar is that | labels: E-needs-test, T-compiler, C-bug, A-const-evallabelhighlabel_id |
| idrust_64667textRust Language Server panicked at 'Box<Any>', | Using repo https://github.com/amethyst/amethyst-starter-2d.git @ fd8bff9ea61 `rustc 1.39.0-nightly (9b9d2aff8 2019-09-19)` `cargo 1.39.0-nightly (3596cb86b 2019-09-19)` `rls 1.39.0 (d9aa23a 2019-09-15)` I start `RUST_BACKTRACE=1 rls --cli` in `$ .../amethyst-starter-2d` and get: labelhighlabel_id |
| idrust_64668textOutdated `--explain` text for E0432 \ | See [E0432][1] for the current text. [1]: https://doc.rust-lang.org/error-index.html#E0432 It currently includes: « Paths in `use` statements are relative to the crate root. To import items relative to the current and parent modules, use the `self::` and `super::` prefixes, respe | labels: A-resolve, T-compiler, A-docs, C-buglabellowlabel_id |
| idrust_64680textCompiler crash when using RLS | Trying to use RLS in neovim (https://github.com/autozimu/LanguageClient-neovim/issues/889#issuecomment-533800654) ``` {\: \, : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : node type <G>::NodeId (...) cannot be placed in TypeckTables with local_id_root\, : , : 1} |
| {: , : , : , : 0} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : cargo test\, : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 3} |
| {: , : C\, : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : {:?}\, : , : 2} |
| {: , : `.``` is incorrectly rendered as > Double quote is escaped as `\, : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : not covered\not covered\human\, : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : changed compared to last execution of the same kind\, : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : dist/\, : , : 4} |
| {: , : Hello\World\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 1} |
| {: , : , : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : null\, : , : 3} |
| {: , : , : , : 1} |
| {: , : unused\reserved\, : , : 2} |
| {: , : , : , : 3} |
| {: , : unexpected region in outlives inference: ReEmpty\, : , : 4} |
| {: , : , : , : 4} |
| {: , : Hello, world!\, : , : 1} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : profile-sample-use\profile-use\debug-info-for-prof | labels: A-LLVM, A-codegen, T-compiler, C-feature-requestlabelquestionlabel_id |
| idrust_64897textRust playground Favicon | I'm not sure that this is the right place to post this issue, but let's try. The actual Rust Playground https://play.rust-lang.org/ doesn't have a Fivicon and it looks really bad in the bookmark bar. If there aren't any specific issue with it, is it possible to add one?labelmediumlabel_id |
| idrust_64903textrust-1.38: bootstrap linker=clang: error: failed to run custom build command for `ryu v1.0.0` // Caused by: process didn't exit successfully: `.../work/rustc-1.38.0-src/build/bootstrap/debug/build/ryu-deb3460cf2bb47d1/build-script-build` (signal: 11, SIGSEGV [...] | ``` running: /tmp/portage/dev-lang/rust-1.38.0/work/rust-stage0/bin/cargo build --manifest-path /tmp/portage/dev-lang/rust-1.38.0/work/rustc-1.38.0-src/src/bootstrap/Cargo.toml --verbose --locked --frozen Compiling proc-macro2 v0.4.30 Compiling unicode-xid v0.1.0 Compiling syn v0 | labels: T-compiler, T-bootstrap, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_64905", "text": "VecDeque constant time reverse? | The only way to reverse a `VecDeque` is to call `swap` to do an in-place reversal, which is O(n). My understanding is that `VecDeque` is implemented as a ring buffer which means we should be able to implement reverse in constant time with no element swaps by changing the directio | labels: A-collections, T-libs-api, C-feature-request", "label": "medium", "label_id": 2} |
| {"id": "rust_64908", "text": "ICE building Apache Arrow PR in `librustc_traits/normalize_erasing_regions.rs:42` | See https://travis-ci.org/apache/arrow/jobs/591264273 for failed build ``` error: internal compiler error: src/librustc_traits/normalize_erasing_regions.rs:42: could not fully normalize `fn() -> usize {std::mem::size_of::<<T as datatypes::ArrowPrimitiveType>::Native>}` thread 'ru | labels: I-ICE, A-trait-system, regression-from-stable-to-nightly, A-associated-items, P-high, T-compilerlabelcritical_buglabel_id |
| idrust_64915texthave simpler diagnostic when passing arg to closure and missing borrow | playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9f1e00046f513d4d9da8790042e52ca9 Code: ````rust struct MyStruct { age: u32 } fn run<F: Fn(&MyStruct) -> bool>(func: F, data: &MyStruct) -> bool { func(&data) } fn main() { let m = MyStruct { age: | labels: C-enhancement, A-diagnostics, E-mentor, A-closures, T-compiler, A-suggestion-diagnosticslabellowlabel_id |
| idrust_64919textSuggested fix does not account for operator precedence | This fails (as expected): ``` fn foo() -> String { 1 + 2 } ``` However, the help message is wrong: ``` error[E0308]: mismatched types --> src/lib.rs:2:5 | 1 | fn foo() -> String { | ------ expected `std::string::String` because of return type 2 | 1 + 2 | ^^^^^ | | | expected stru | labels: E-easy, T-compiler, C-bug, A-suggestion-diagnostics", "label": "low", "label_id": 3} |
| {"id": "rust_64920", "text": "Can't return value from inside an if statement without return keyword | Minimal working example: ```rs fn test(recurse: bool) -> i32 { if recurse { // This should return value of `test(false)` from the function // Instead, it gives us an error that says \ test(false) } 0 } fn main() { print!(\, test(true)); } ``` Error messalabelmediumlabel_id |
| idrust_64926textTracking issue for `const extern fn` and `const unsafe extern fn` | This is a tracking issue for implementing and stabilizing defining a `const extern fn` and `const unsafe extern fn` - [X] Add a test according to https://github.com/rust-lang/rust/pull/64906#issuecomment-539902772 (added in https://github.com/rust-lang/rust/pull/68370) ### Stabil | labels: A-FFI, T-lang, B-unstable, C-tracking-issue, A-const-eval, F-const_extern_fnlabelmediumlabel_id |
| idrust_64929textProvide more information about call stack in case of stack overflow during compilation | Compiling code with custom macros ``` RUST_BACKTRACE=full cargo build ``` results in ``` thread 'rustc' has overflowed its stack fatal runtime error: stack overflow error: could not compile `tests`. Caused by: process didn't exit successfully: `rustc --edition=2018 --crate-name t | labels: A-diagnostics, T-libs-api, C-feature-request", "label": "medium", "label_id": 2} |
| {"id": "rust_64934", "text": "Unhelpful trait bound diagnostic hint for arbitrary self types | Playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=3d9fb14075d8fb9de8dea454fbb663e9 <details> <summary>Code</summary> ``` #![feature(generator_trait)] use std::ops::{Generator, GeneratorState}; struct GeneratorIterator<T> { generator: T, } impl<T | labels: A-diagnostics, T-compiler, C-bug, F-arbitrary_self_types, D-invalid-suggestion", "label": "medium", "label_id": 2} |
| {"id": "rust_64940", "text": "`saturating_add` doc is not clear enough | Godbolt link: https://godbolt.org/z/9rm4jF So I expect these two functions has the same assembly: ```rust pub fn foo(a: i32, b: i32) -> i32 { a.saturating_add(b) } pub fn bar(a: i32, b: i32) -> i32 { match a.checked_add(b) { Some(v) => v, None => i32::max_value(), } } ``` But the | labels: C-enhancement, A-docs", "label": "low", "label_id": 3} |
| {"id": "rust_64945", "text": "ICE: const eval error with an empty slice. | This code: ```rust pub struct Slice<'a, T>(&'a [T]); impl<'a, T: 'a> Slice<'a, T> { pub const EMPTY: Self = Slice ({ let v: &[T] = &[]; v }); } ``` Errors on `rustc 1.40.0-nightly (22bc9e1d9 2019-09-30) running on x86_64-unknown-linux-gnu` with this message: ``` Compiling playgro | labels: A-type-system, I-ICE, regression-from-stable-to-nightly, P-high, T-compiler, C-buglabelcritical_buglabel_id |
| idrust_64947textMixed signals from errors about trait const fns | I was trying to define a trait method as const, but it turned out in an error, which, according to [RFC911](https://github.com/rust-lang/rfcs/blob/master/text/0911-const-fn.md) is a design decision, and the [tracking issue for const fn](https://github.com/rust-lang/rust/issues/57 | labels: C-enhancement, A-diagnostics, A-trait-system, T-compiler, A-const-evallabellowlabel_id |
| idrust_64953textrustc panic on pattern matching when no unit type instance is specified | I forgot to add () inside Some(): ``` fn main() { match Some(()) { Some() => (), None => (), } } ``` Got panic: ``` $ RUST_BACKTRACE=full cargo build Compiling crash v0.1.0 (/tmp/crash) thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0', src/librustlabelmediumlabel_id |
| idrust_64957texttidy should skip RLS files | tidy should skip RLS files or even more, it should probably skip untracked files. ``` [santiago@galago rust1 (make-place-builder)]$ ./x.py test -i --stage 1 --keep-stage 1 src/tools/tidy Updating only changed submodules Submodules updated in 0.02 seconds Finished dev [unoptimized | labels: T-bootstrap, T-infralabelquestionlabel_id |
| idrust_64960textCannot await in scope that contains call to format! | As part of #64477, it was identified that the following code no longer compiles (https://github.com/rust-lang/rust/issues/64477#issuecomment-531882958): ```rust async fn foo(_: String) { } fn bar() -> impl Send { async move { foo(format!(\, 1, 2)).await; } } ``` This is as | labels: C-enhancement, T-lang, T-compiler, A-async-await, AsyncAwait-Triagedlabellowlabel_id |
| idrust_64962textCrater runs for Rust 1.39.0 | cc @rust-lang/release | labels: S-waiting-on-reviewlabelmediumlabel_id |
| idrust_64964textICE while compiling hyper (`StableHasher: unexpected region '_#0r`) | Hyper fails to compile on Rust master (702b45e40) ``` error: internal compiler error: src/librustc/ich/impls_ty.rs:100: StableHasher: unexpected region '_#0r ``` <details> ``` $ RUST_BACKTRACE=1 cargo +master check Checking hyper v0.13.0-alpha.2 (/home/manishearth/mozilla/Git/hyp | labels: I-ICE, regression-from-stable-to-nightly, T-compiler, C-bug, A-coroutineslabelcritical_buglabel_id |
| idrust_64970textConst eval incorrectly computes that mutable param is zero | The following code results in a const eval divide by zero error, when it cannot actually error at runtime: ```rust pub fn foo(mut n: i32) { if n < 0i32 { n = 0i32 } if n > 0i32 { dbg!((1i32) / n); } } ``` https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=ee | labels: T-compiler, C-bug, A-const-evallabelmediumlabel_id |
| idrust_64976textThe behaviour of `librustc_errors::Handler::reset_err_count` seems to contradict its documentation | The function: https://github.com/rust-lang/rust/blob/702b45e409495a41afcccbe87a251a692b0cefab/src/librustc_errors/lib.rs#L473 Citing the doc comment for this function: ```rust /// NOTE: *do not* call this function from rustc. It is only meant to be called from external /// tools labelmediumlabel_id |
| idrust_64985textICE: StableHasher: unexpected region '_#0r | ``` error: internal compiler error: src/librustc/ich/impls_ty.rs:100: StableHasher: unexpected region '_#0r thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:912:9 stack backtrace: 0: 0x7ff79606ba94 - backtrace::backtrace::libunwind::trace::had03042f494c8644 at /clabelhighlabel_id |
| idrust_64988textBad page rendering with js disabled | For example in here: https://docs.rs/slab/0.4.2/slab/struct.Slab.html No sections is shown because they're hidden by default. It should be overloaded with noscript so that they show by default in such case. | labels: T-rustdoc", "label": "low", "label_id": 3} |
| {"id": "rust_64992", "text": "Tracking issue for unsizing casts in const fns | Right now we don't allow unsizing casts (array -> slice or type -> dyn Trait) in const fns on stable. While we can't allow unsizing to `dyn Trait` until we've figured out trait bounds in const fns, we can easily allow unsizing casts for slices, there's no reason not to have them. | labels: T-lang, B-unstable, C-tracking-issue, A-const-eval", "label": "medium", "label_id": 2} |
| {"id": "rust_65000", "text": "FCP for toolstate changes | Manual FCP for this change. Please leave a comment if you can't tick the box due to lack of permissions or, preferably, ping me on Discord/Zulip (`@simulacrum`). The [PR](https://github.com/rust-lang/rust/pull/64977) has a more detailed explanation of this change, but the general | labels: T-bootstrap, disposition-mergelabelmediumlabel_id |
| idrust_65001textRegression in spacing of left margin in diagnostics | ```rust struct A; // // // // // // // fn main() { let _: () = A; let _: () = B; } ``` #### `$ cargo +nightly-2019-10-01 check` This is the correct output. ```console error[E0425]: cannot find value `B` in this scope --> src/main.rs:11:17 | 11 | let _: () = B; | ^ help: a unit st | labels: A-diagnostics, regression-from-stable-to-nightly, C-buglabelcritical_buglabel_id |
| idrust_65005textInconsistent `const_err` on index access to array in polymorphic functions | Stable currently allows indexing an array with invalid constant indices in polymorphic functions without warnings. A recently nightly change has apparently changed this behaviour into an error. The following builds on stable without warnings but errors on nightly: ```rust pub fn labelhighlabel_id |
| idrust_65006text`IndirectlyMutableLocals` analysis is unsound in the presence of unsafe code | #64470 added an `IndirectlyMutableLocals` analysis to track whether a local could possibly be mutated through a pointer at a given point in the program. However, this analysis overlooked the fact that a shared reference to a `Freeze` field of a struct could be converted to a shar | labels: T-compiler, I-unsound, C-bug, A-const-evallabelcritical_buglabel_id |
| idrust_65008textEntire program seems to be optimized away | I've come across a situation where the presence or absence of a comment changes the program behavior. With the comment present, the program does exactly what I expect (prints a bunch of stuff). Without the comment, the program does nothing and terminates with exit code 0. I have | labels: T-compiler, regression-from-stable-to-stable, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_65014", "text": "Updating Cargo.lock can result in dependency cycle | Bumping few packages can result in dependency cycle. Single command reproducer: ``` $ cargo update --aggressive -p cargo Updating crates.io index Updating git repository `https://github.com/rust-lang/cargo` error: cyclic package dependency: package `compiler_builtins v0.1.19` dep", "label": "medium", "label_id": 2} |
| {"id": "rust_65015", "text": "Point at duplicated dot in method access | [The following incorrect code](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=afabf424606627e723a6faed1bcde8e9) ```rust struct Type { option: Option<Vec<u8>> } impl Type { fn method(&self) -> Option<Vec<u8>> { self.option..as_ref().map(|x| x) } } fn main | labels: C-enhancement, A-diagnostics, P-low, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_65017", "text": "Internal Compiler Error When Making Requests With Hyper | I've been staring at this error all day long and finally decided to file a report for it, so here we are. I'm attempting to make a request using identical code to the [hyper client.rs example](https://github.com/hyperium/hyper/blob/master/examples/client.rs), but I continue to ge", "label": "high", "label_id": 1} |
| {"id": "rust_65022", "text": "Possible beta to nightly regression (from | Possible regression from beta-1.39 to nightly-1.40, exposed by [`tonic`](https://github.com/hyperium/tonic) I tried this code (using the [rust nix overlay](https://github.com/mozilla/nixpkgs-mozilla/blob/master/rust-overlay.nix)): ``` $ cd tonic $ nix-shell -p latest.rustChannels", "label": "high", "label_id": 1} |
| {"id": "rust_65023", "text": "error: unused attribute const_fn_union with incr-comp | Every time I try to recompile the compiler using incremental compilation with `./x.py build -i --stage 1 --keep-stage 1 src/libstd` I get the following error ... ``` error: unused attribute --> src/libcore/slice/mod.rs:66:5 | 66 | #[allow_internal_unstable(const_fn_union)] | ^^^^ | labels: T-compiler, A-incr-comp, C-bug, WG-incr-comp, A-const-eval", "label": "medium", "label_id": 2} |
| {"id": "rust_65024", "text": "Allow building for hard-float targets in RISC-V | Currently Rust does not support compiling/linking with LLVM's `-target-abi=lp64d` option, which enables the hard-float ABI in riscv64. This feature is necessary for Rust interop with C code on hard-float targets. | labels: A-cross, T-compiler, C-feature-request, O-riscvlabelquestionlabel_id |
| idrust_65025texttype parameter `A/#0` (A/0) out of range when substituting (root type=Some(*const A)) substs=[] | Minimal example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=814876c654b0b3ad162d52ba64064b02 ``` error: internal compiler error: src/librustc/ty/subst.rs:557: type parameter `A/#0` (A/0) out of range when substituting (root type=Some(*const A)) substs | labels: A-type-system, I-ICE, A-FFI, P-medium, T-compiler, C-buglabelhighlabel_id |
| idrust_65028textregression in 2019-10-01 nightly | I will try to make a reproduction later, but just wanted to open an issue now. The code worked when compiling with the beta and the prior nightly. ``` error: internal compiler error: src/librustc/ich/impls_ty.rs:100: StableHasher: unexpected region '_#0r thread 'rustc' panicked a", "label": "high", "label_id": 1} |
| {"id": "rust_65029", "text": "libsyntax JSON output bytes counts ignore CRLF normalization | Recently there was a change in rustc to normalize newlines (CRLF -> LF) early during processing (#62948). This caused a change in the JSON output offsets. While the line/column values were unaffected (since they do not include the newlines in the counts), the `byte_start`/`byte_e | labels: A-parser, T-compiler, C-bug", "label": "question", "label_id": 4} |
| {"id": "rust_65033", "text": "An ICE when awaiting an async method. | I tried this code: ```rust struct Struct; async fn a() { Struct.method().await; } impl Struct { async fn method(&self) {} } ``` ## Meta `rustc --version --verbose`: ``` rustc 1.40.0-nightly (702b45e40 2019-10-01) binary: rustc commit-hash: 702b45e409495a41afcccbe87a251a692b0cefab", "label": "high", "label_id": 1} |
| {"id": "rust_65034", "text": "`SocketAddr{V4,V6}` or `Ip{V4,V6}Addr` should have `ANY`/`any` constructor | A commonplace difference between Windows and other targets is that to bind to \"all\" interfaces, you need to use `LOCALHOST` on Windows and `UNSPECIFIED` everywhere else. We should make this easy via e.g. associated methods like these: ``` SocketAddrV4::any(port) SocketAddrV6::any | labels: T-libs-api, C-feature-request", "label": "low", "label_id": 3} |
| {"id": "rust_65035", "text": "ICE: src/librustc_lint/types.rs:858: unexpected type in foreign function: T | ```rust fn _f<T>() { extern \"C\" { static _a: *const T; } } ``` backtrace: ``` Compiling playground v0.0.1 (/playground) error: internal compiler error: src/librustc_lint/types.rs:858: unexpected type in foreign function: T thread 'rustc' panicked at 'Box<Any>', src/librustc_error | labels: A-lints, I-ICE, A-FFI, P-medium, T-compiler, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_65036", "text": "Intermittent failure in src/test/ui/reify-intrinsic.stderr | The test `src/test/ui/reify-intrinsic.stderr` appears to be intermittently changing its output. Usually, it prints: `unsafe extern \"rust-intrinsic\" fn(_) -> _ {std::intrinsics::transmute::<_, _>}` but sometimes it prints: `unsafe extern \"rust-intrinsic\" fn(_) -> _ {std::mem::tran | labels: A-pretty, A-resolve, T-compiler, C-bug, A-reproducibility", "label": "medium", "label_id": 2} |
| {"id": "rust_65041", "text": "an empty `:vis` doesn't work in trait declaration | I want to create a macro that generate `fn`s that use in both `impl Item...` and `trait TraitName`. In `trait`, `pub` must be omitted, but in `impl SomeStruct` I need `pub`, so the macro need a `$vis:vis` like this: ```rust macro_rules! create_method { ($vis:vis $name:ident) => { | labels: A-parser, A-visibility, A-macros, T-lang, C-feature-requestlabelmediumlabel_id |
| idrust_65044textrestrict type parameter `Self` error is unclear. | The following example code yields an error: ``` struct Demo { a: String } trait GetString { fn get_a(&self) -> &String; } trait UseString { fn use_string(&self) { println!(\, self.get_a()); } } impl GetString for Demo { fn get_a(&self) -> &String { &self.a } } impl UseString | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-invalid-suggestionlabelmediumlabel_id |
| idrust_65047textUI Tests that check ICEing thread names break with `parallel-compiler = true` | When I run `./x.py test` locally on a clean checkout of master with `parallel-compiler = true`, I see a couple of failures that seem to be related to the name of the rustc thread which ICEd in the tests. I turned parallel-compiler off, reran the test command, and the tests passed | labels: E-easy, I-ICE, P-high, T-compiler, C-bug, A-parallel-compilerlabelhighlabel_id |
| idrust_65049textTracking issue for `Span::mixed_site` | This is a tracking issue for `Span::mixed_site` API providing direct access to `macro_rules` hygiene to proc macros. Introduced in https://github.com/rust-lang/rust/pull/64690. | labels: A-macros, T-lang, T-libs-api, B-unstable, C-tracking-issuelabelmediumlabel_id |
| idrust_65051textBuild with pure LLVM toolchain on Linux | Hello, I'm creating a Linux distribution that does not use GCC and use LLVM/Clang and their libraries by default (libc++, libc++abi, compiler-rt and libunwind). No libstdc++ or gcc installed. The distribution is based on musl as well. I'd like to build rust with that pure LLVM to | labels: A-LLVM, T-bootstrap, C-feature-requestlabelmediumlabel_id |
| idrust_65058textType Inference issue with Option<Box<dyn Trait>> | My current project uses a wrapper struct that wraps every occuring error in a struct that has a field of the type Option<Box<dyn std::error::Error>>. During implementation of the From<*> traits I encountered the issue shown in the picture: , E>` --> sysroot_src/src/libtest/lib.rs:1627:42 | 16| let result = Ok(testfn()); | ------ consider giving `result` the explicit type `std::result::Result<(), E>`, with the type parameters specified ... 16| Err( | labels: A-frontend, A-diagnostics, T-compiler, C-buglabelquestionlabel_id |
| idrust_65060text`incremental = true` as the default in config.toml? | I'm curious whether it would make sense for `incremental = true` to be the default for rustbuild in the absence of another setting. Per @eddyb on IRC: ``` 07:53 <eddyb> it used to be bad for a bit until a few months ago (that is, it would produce a very slow compiler) but nowaday | labels: C-enhancement, A-incr-comp, T-bootstrap, T-infra", "label": "low", "label_id": 3} |
| {"id": "rust_65061", "text": "x86_64-unknown-linux-musl: bad linker for target and unknown __fprintf_chk symbol | I'm trying to build a static musl target from source. I'm using the source release for 1.38.0. Here's the build config for `x.py`: ``` configure: build.rustc := /nix/store/31dk8a6ai75pgf19irr360qakqcx898m-ru ... configure: build.cargo := /nix/store/w3prpvk1rmw24lhci2kpc0xn9rmzf7z | labels: A-linkage, T-compiler, T-bootstrap, T-infra, O-musl, C-buglabelmediumlabel_id |
| idrust_65062textSuggest &mut T for &T and vice versa for missing trait bound if applicable | As seen on [Twitter](https://twitter.com/khyperia/status/1179518655790374912?s=19): Missing trait does not hint (im)mutable reborrowing, at least in that specific case. | labels: C-enhancement, A-diagnostics, A-trait-system, T-compiler, A-suggestion-diagnosticslabellowlabel_id |
| idrust_65063textPort rust python scripts to python3 | Since python2 support will stop at the end of the year, I think it's time to move on. Will send the PR tomorrow. | labels: C-cleanup, T-bootstrap, T-infra", "label": "question", "label_id": 4} |
| {"id": "rust_65065", "text": "Error while building rustc on Windows MSVC (cl.exe returns 2) | Building with x.py on Windows, I already have Rust working thru rustup, but I wanted to build a patched rustc. However this error comes before stage1 begins and is related to cl.exe not compiling something I haven't touched; I made sure to update all the submodules with git and s | labels: A-LLVM, O-windows-msvc, T-bootstraplabelmediumlabel_id |
| idrust_65071text`x.py test` generates several `dot` files in the source directory root | ``` definite_init_indirect.dot maybe_init_indirect.dot maybe_uninit_indirect.dot mut_borrowed_locals_indirect.dot ``` If they are necessary, then they should be generated somewhere inside the build directory. cc @ecstatic-morse | labels: T-compiler, T-bootstrap, C-buglabelmediumlabel_id |
| idrust_65079textunboxed_closures syntax is not consistent | https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=02e56c54b3189d4098e6dc06550461e5 ```rust #![feature(unboxed_closures)] trait A<Args>: FnMut<Args> { } impl<Args, T: FnMut<Args>> A<Args> for T {} trait B {} fn a() -> Box<dyn A() -> ()> { // <- this works! Blabelmediumlabel_id |
| idrust_65080textTokenStream manipulations are 1000x too slow | Context: https://github.com/illicitonion/num_enum/pull/14 Switching a proc macro from being token-based to operating on strings with just a final conversion from string to TokenStream can be a 100x improvement in compile time. If we care that people continue to write macros using | labels: C-enhancement, I-compiletime, A-macros, T-compilerlabellowlabel_id |
| idrust_65084text`rls` no longer builds after rust-lang/rust#65076 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#65076, I observed that the tool rls no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rls is needed to fix the fallout. cc @tmandry, do you think you would have time | labels: P-high, T-compilerlabelhighlabel_id |
| idrust_65085text`rustfmt` no longer builds after rust-lang/rust#65076 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#65076, I observed that the tool rustfmt no longer builds. A follow-up PR to the repository https://github.com/rust-lang/rustfmt is needed to fix the fallout. cc @tmandry, do you think you would ha | labels: P-high, T-compilerlabelhighlabel_id |
| idrust_65086textEphemeral borrow on a RefCell that extracts a Copy struct member in func argument position does not drop the borrow before making the funcall | Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=be4dfa9fda3dbe2c8ccb42c3785bd658 This code panics and I do not think it should. ```rust use std::cell::RefCell; use std::rc::Rc; #[derive(Clone, Copy)] struct Item(u32); #[derive(Clone)] struct Inlabelmediumlabel_id |
| idrust_65088textAdd support for `-Ztimings` to `x.py` | Cargo's new experimental `-Ztimings` flag is really cool. See [here](https://gistpreview.github.io/?74d799739504232991c49607d5ce748a) for sample output. It would be great to add support for this to `x.py`. It would help a lot with #65031. I tried and failed to get `-Ztimings` wor | labels: T-compiler, T-bootstrap, T-cargo, C-feature-request", "label": "question", "label_id": 4} |
| {"id": "rust_65090", "text": "Star Import Precedence Regression in Beta | The goblin tests started failing in beta because there seem to be a change in order for how star imports are applied. This PR changes the imports so nothing shadows any more: https://github.com/m4b/goblin/pull/184 Annoyingly I cannot produce an isolated test case that shows this | labels: A-resolve, P-medium, T-compiler, regression-from-stable-to-beta, C-bug, E-needs-bisection", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_65093", "text": "Is panic message stabilized? | Can I parse output from a program \"**thread** 'main' **panicked at** '**called** `Result::unwrap()` on an `Err` value: ()\, : , : 2} |
| {: , : , : , : 2} |
| {: , : e | labels: C-enhancement, T-lang, T-libs-api, A-docslabelquestionlabel_id |
| idrust_65114textInvalid identifier in proc_macro causes ICE | lib.proc-macro: ```rust #[proc_macro] pub fn foo( item: proc_macro::TokenStream, ) -> proc_macro::TokenStream { let ident = Ident::new(\, Span::call_site()); item } ``` bin: ```rust foo!{} ``` build: ``` thread 'rustc' panicked at '`\"?\"` is not a valid identifier', src\\libsyntalabelhighlabel_id |
| idrust_65119textCompiling a file with a non-ASCII name with `--error-format=short` enabled makes error messages contain excessive spaces after \ | Consider the following rust source (in `test.rs`): ```rust fn main() { println!(\, : , : 2} |
| {: , : , : , : 0} |
| {: , : , : , : 4} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 0} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 1} |
| {: , : , : , : 2} |
| {: , : -Clinker=clang -Clink-arg=--target=$HOST_TARGET\-Clinker=clang -Cl | labels: A-linkage, T-rustdoc, C-bug, A-doctestslabelmediumlabel_id |
| idrust_65180textAsync-related type error messages defy expectations (in span location) | Consider for example this code (using `hyper-0.13.0`): ```rust use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6, TcpListener}; #[derive(failure::Fail, Debug)] enum Error { #[fail(display=\, _1)] CannotBind(#[cause] std::io::Error, u | labels: A-diagnostics, T-compiler, C-bug, A-async-await, AsyncAwait-Polish, AsyncAwait-Triagedlabelmediumlabel_id |
| idrust_65183text`fetch_add` in atomic integers won't check for overflow | Since the default Rust semantics is to check for overflows in debug, maybe `fetch_add` and `fetch_sub` should check for overflows (in debug), and we should provide `fetch_wrapping_add` and `fetch_wrapping_sub`? Or, if we don't want to introduce breaking changes, we should at leas | labels: C-enhancement, T-libs-api, A-docslabellowlabel_id |
| idrust_65184textICE: thread 'rustc' panicked at 'Box<Any>' | This occurred when running `cargo clippy` on a workspace with around 40 child crates. I have not included the full log, for corporate security reasons, but I can probably provide more specific information on request. ``` ... Checking tokio-tcp v0.1.3 Checking tokio-udp v0.1.3 Che | labels: I-ICE, T-compiler, T-dev-tools, C-buglabelcritical_buglabel_id |
| idrust_65189textdeprecated proc_macro trigger warning on build library | Use `deprecated` attribute on a procedural macro function doesn't work like expected: it triggers a warning message also when library is building and not just in call place. I know that the `deprecate` attribute support is not landed in stable but this warning is present in all c | labels: E-easy, A-lints, E-mentor, A-macros, T-compiler, C-bug", "label": "question", "label_id": 4} |
| {"id": "rust_65204", "text": "DWARF for legacy enum incorrect | With test-case gdb.rust/simple.exp (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/testsuite/gdb.rust/simple.rs;hb=HEAD) we run into gdb testsuite failure reported here ( https://sourceware.org/bugzilla/show_bug.cgi?id=25048 ). This is on openSUSE Leap 15.1 | labels: A-debuginfo, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_65207", "text": "Change in macro output between 1.37.0 and 1.38.0 | The following code changed output between Rust 1.37.0 and 1.38.0: ```rust macro_rules! call_a_or_b_on_tail { ((a: $a:expr, b: $b:expr), call a: $($tail:tt)*) => { $a(stringify!($($tail)*)) }; ((a: $a:expr, b: $b:expr), call b: $($tail:tt)*) => { $b(stringify!($($tail)*)) }; ($ab:", "label": "medium", "label_id": 2} |
| {"id": "rust_65211", "text": "Provide a way to disable rustdoc keyboard shortcuts | Some people have custom OS or browser-level shortcuts, providing a way to disable these makes it easier for them | labels: T-rustdoc", "label": "medium", "label_id": 2} |
| {"id": "rust_65212", "text": "Potentially swap arrow keys and tab in rustdoc keyboard shortcuts | Currently rustdoc's keyboard shortcuts use <kbd><kbd>Tab</kbd></kbd> to cycle between the tabs at the top of search results, and the arrow keys for moving through search results. It's much more common for <kbd><kbd>Tab</kbd></kbd> and <kbd><kbd>Shift</kbd> + <kbd>Tab</kbd></kbd> | labels: T-rustdoc, A-rustdoc-ui, A-rustdoc-search", "label": "question", "label_id": 4} |
| {"id": "rust_65224", "text": "Occasional spurious codegen test failures | Occasionally when running tests, I get these failures: ``` [codegen] codegen/issue-45222.rs [codegen] codegen/issue-45466.rs [codegen] codegen/swap-small-types.rs [codegen] codegen/vec-iter-collect-len.rs [codegen] codegen/vec-optimizes-away.rs ``` My current workaround is to del | labels: A-testsuite, T-compiler, A-spurious, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_65225", "text": "Tracking issue for `#![feature(entry_insert)]` | This is a tracking issue for the `Entry::insert_entry` method on HashMap and BTreeMap introduced in https://github.com/rust-lang/rust/pull/60142#issuecomment-487416553. - [x] Implementation for HashMap: #64656 - [x] ~~Stabilised in 1.59: #90345~~ Re-stabilised in 1.83: #130290 - | labels: A-collections, T-libs-api, B-unstable, C-tracking-issue, disposition-merge, finished-final-comment-period", "label": "medium", "label_id": 2} |
| {"id": "rust_65230", "text": "Compiler should not omit associated type in compile error message | ## Environment - Rust: Nightly 2019-10-07 ## Repro 1. Open https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=933123bb14852662962ab5bf5f2073c8 2. Click run ```rust struct X<'a>(&'a mut i32); impl<'a> Iterator for X<'a> { type Item = &'a i32; fn next(&mut sel | labels: A-diagnostics, T-compiler, C-bug, D-confusinglabelmediumlabel_id |
| idrust_65231textDebugMap::finish panics if a value returns fmt::Error | ```rust use std::fmt; struct ErrorFmt; impl fmt::Debug for ErrorFmt { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { Err(fmt::Error) } } struct A { field: ErrorFmt, } impl fmt::Debug for A { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { f.debug_map() .entry(&\, : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 1} |
| {: , : , : , : 3} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : , : , : 4} |
| {: , : , : , : 4} |
| {: , : , : , : 3} |
| {: , : Minimum Supported Rust Version\Minimum Supported Rust Version\, : , : 4} |
| {: , : Dropping CustomSmartPointer with data `{}`!\hewitt\, : , : 2} |
| {: , : my-proc-macro\./macro\, : , : 1} |
| {: , : Dropping CustomSmartPointer with data `{}`!\, : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 2} |
| {: , : , : , : 3} |
| {: , : my string\, : , : 2} |
| {: , : , : , : 4} |
| {: , : {} {} {}\, : , : 2} |
| {: , : same as LLVM's\"? Seems wrong. | @jonas-schievink [pointed out](https://github.com/rust-lang/rust/issues/32976#issuecomment-540777070) that our `atomic::Ordering` docs say > Rust's memory orderings are the same as LLVM's. That's not really correct though... at least according to the Nomicon, we [use the C11 memo | labels: A-LLVM, T-lang, A-docs, C-buglabelcritical_buglabel_id |
| idrust_65284textE0599 error message may suggest syntactically invalid fix | [Full code in Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3b1a6a68ae4db990762e4a542fbf052a) Missing a trait bound for the trait that defines `fn foo` below: ```rust fn do_stuff<T : Bar>(t : T) { // Note the space before the colon in `T : Ba | labels: T-compiler, C-bug, A-suggestion-diagnostics, D-invalid-suggestionlabelmediumlabel_id |
| idrust_65285textIncorrect \ error | ```rust struct Nested<K>(K); trait X<'a, K: 'a> { fn foo<'b, L: X<&'b Nested<K>>>(); } ``` produces: ``` error[E0637]: `&` without an explicit lifetime name cannot be used here --> src/lib.rs:4:19 | 4 | fn foo<'b, L: X<&'b Nested<K>>>(); | ^^^^^^^^^^^^^^^^ explicit lifetime name | labels: A-diagnostics, A-lifetimes, T-compiler, C-buglabelmediumlabel_id |
| idrust_65286text\ doesn't take into account existing bounds | ```rust trait X { fn foo(&self) {} } fn p3<'a, 'b, T: 'b>(v: T) -> Box<dyn X + 'a> where T: X { Box::new(v) } ``` produces: ``` error[E0309]: the parameter type `T` may not live long enough --> src/lib.rs:4:5 | 3 | fn p3<'a, 'b, T: 'b>(v: T) -> Box<dyn X + 'a> where T: X { | -- h | labels: A-diagnostics, T-compiler, C-bug, A-suggestion-diagnostics", "label": "medium", "label_id": 2} |
| {"id": "rust_65287", "text": "Lifetimes are inconsistently printed with backticks | ```rust fn foo<'a>(u: &'a usize) -> impl IntoIterator<Item = usize> + 'a { std::thread::spawn(|| { println!(\, u); }); vec![] } ``` displays: ``` error: cannot infer an appropriate lifetime --> src/lib.rs:2:24 | 2 | std::thread::spawn(|| { | _____------------------_^ | | | | | | labels: E-easy, A-diagnostics, T-compiler, D-inconsistentlabellowlabel_id |
| idrust_65290textRISC-V: Inline assembly ecall assumes return value in incorrect register | The following 32-bit RISC-V Rust code ```rust pub unsafe fn allow_ptr(major: usize, minor: usize, slice: *mut u8, len: usize) -> isize { let res; asm!(\ : \ (res) : \ (major), \ (minor), \ (slice), \ (len) : \ : \); res } | labels: A-inline-assemblylabelmediumlabel_id |
| idrust_65291textcompiler error building arrow on rustc 1.40.0-nightly on mac | ```$ ~/code/example cargo build Compiling arrow v0.15.0 error: internal compiler error: src/librustc_traits/normalize_erasing_regions.rs:42: could not fully normalize `fn() -> usize {std::mem::size_of::<<T as datatypes::ArrowPrimitiveType>::Native>}` thread 'rustc' panicked at 'B | labels: I-ICE, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_65296", "text": "Rust platform size (round 2) | Reopening this issue as its not fixed. On my last post in July the size was 294 MB: https://github.com/rust-lang/rust/issues/61978#issuecomment-509259209 comically, its actually larger now at 347 MB: https://static.rust-lang.org/dist/rust-nightly-x86_64-pc-windows-gnu.msi | labels: C-enhancement, T-compiler, I-heavy", "label": "low", "label_id": 3} |
| {"id": "rust_65300", "text": "`rustc_data_structures::static_assert!(false)` does not error | `1.40.0-nightly 2019-10-09 20cc75272619cc452e3a` The following does not error locally / on the playground https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=9dde03338a31e2f40491a66dc3a18761 ```rust #![feature(rustc_private)] extern crate rustc_data_structure | labels: T-compiler, C-bug", "label": "low", "label_id": 3} |
| {"id": "rust_65303", "text": "Refactor: deduplicate \"can this unwind?\" logic | Currently, we have two separate codepaths to decide if a function needs an abort-on-panic shim and if it gets the `nounwind` attribute. This risks them getting out of sync -- and indeed they are out-of-sync right now, but there's lots of opposition to fix that critical bug, so I | labels: C-cleanup, T-compilerlabellowlabel_id |
| idrust_65304textalso read cargo.toml | https://doc.rust-lang.org/cargo/faq.html#why-cargotoml ## \ could you please provide your analysis on how you count \? cause its not with coreutils 8.31, `ls`: ``` $> touch foo Foo bar Bar $> \\ls bar Bar foo labelmediumlabel_id |
| idrust_65306text`cargo check`-invoked Rustc 10x slower since `nightly-2019-10-03` | Starting `nightly-2019-10-03`, Rustc ~~**hangs forever**~~ is about 10x slower while building my project (Linux x86-64). It works fine on `nightly-2019-10-01` and earlier versions. In between, `nightly-2019-10-02` has an ICE. I am only invoking `cargo check`. See below for the IC | labels: T-compiler, C-bug, I-hang, E-needs-mcvelabelquestionlabel_id |
| idrust_65309textperformance of saturating_mul can be improved by removing branches | While playing with `saturating_mul` to see if it can be made branchless and thus a const fn (sorry @RalfJung ;) ), I found that the performance of signed `saturating_mul` can actually be improved. I tested two implementations: 1. ```rust pub fn saturating_mul(a: i32, b: i32) -> i | labels: A-LLVM, I-slow, T-compiler, C-buglabelmediumlabel_id |
| idrust_65313textaarch64 windows backend forces panic=abort | The [aarch64-pc-windows-msvc](https://github.com/rust-lang/rust/blob/master/src/librustc_target/spec/aarch64_pc_windows_msvc.rs#L8) and [aarch64-uwp-windows-msvc](https://github.com/rust-lang/rust/blob/master/src/librustc_target/spec/aarch64_pc_windows_msvc.rs#L8) targets force p | labels: A-runtime, C-enhancement, O-Arm, T-compiler, O-windows-msvclabelquestionlabel_id |
| idrust_65317textSpurious `...` at the end of code lines on some trimmed code snippets | We now trim overly wide code snippets using `...` before and after as appropriate to signify the cut code. I've observed some cases on spans with labels that the last three characters of the snippet are incorrectly replaced with `...`. | labels: A-diagnostics, T-compiler, C-bug, E-needs-mcve", "label": "question", "label_id": 4} |
| {"id": "rust_65323", "text": "Messed up docs for std::task::Waker | This should be an easy one, but the docs for `std::task::Waker` look like this: <img width=\"998\" alt=\"image\" src=\"https://user-images.githubusercontent.com/634666/66693186-3496fc00-ec5b-11e9-9b80-a98609b0d15a.png\"> But it should probably just say `Send` and `Sync` not `trait@Send | labels: E-easy, T-libs-api, A-docs, C-bug", "label": "low", "label_id": 3} |
| {"id": "rust_65325", "text": "reopen https://github.com/rust-lang/rust/issues/52377 for 1.38 rust and it is not appear on 1.37 | i found the https://github.com/rust-lang/rust/issues/52377 bug when used new 1.38.0 rust", "label": "medium", "label_id": 2} |
| {"id": "rust_65326", "text": "Error E0594 is not described in docs | Error E0594 is not described in docs https://doc.rust-lang.org/nightly/error-index.html#E0594 ```rust fn main() { let v = vec![1u16; 10]; let p: &[u16] = &v; p[0] = 3; } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=9aefb4be4f107328211", "label": "low", "label_id": 3} |
| {"id": "rust_65329", "text": "Unhelpful error message because of inner line doc | The code ```rust fn main() { let x = 0; let y = x.max(1) //!foo .min(2); } ``` I get this error: ```bash error: expected one of `.`, `;`, `?`, or an operator, found `//!foo` --> src/main.rs:3:22 | 3 | let y = x.max(1) //!foo | ^^^^^^ expected one of `.`, `;`, `?`, or an operator | labels: C-enhancement, A-diagnostics, A-parser, T-compiler", "label": "low", "label_id": 3} |
| {"id": "rust_65330", "text": "rustdoc: Prefixing parent modules to distinguish between items in cases where item names would otherwise be ambiguous | ## Motivation I often run into an issue when reading through rendered documentation where many types exist with the same name and it is unclear which type is being referred to in a function signature or type declaration. Two simple, common examples of this are the `Result` and `E | labels: T-rustdoc, C-feature-request", "label": "low", "label_id": 3} |
| {"id": "rust_65333", "text": "Unnecessary comparison and conditional branch | This is a reopening of #37114 which was fixed in 1.28.0 but seems to have regressed again since 1.30.0. ```rust pub fn foo(v: &mut Vec<i32>) { let len = v.len(); assert!(len > 1); v[len - 2] += 1; v.pop(); } ``` The asm for 1.38 is ```asm example::foo: push rax mov rax, qword ptr | labels: A-LLVM, I-slow, T-compiler, C-bug", "label": "medium", "label_id": 2} |
| {"id": "rust_65335", "text": "3rd party objects missing from nightly-2019-10-12 | ``` $ rustup toolchain add nightly-2019-10-11 $ rustup toolchain add nightly-2019-10-12 $ rustup target add --toolchain nightly-2019-10-11 x86_64-fortanix-unknown-sgx $ rustup target add --toolchain nightly-2019-10-12 x86_64-fortanix-unknown-sgx $ ls .rustup/toolchains/nightly-20 | labels: regression-from-stable-to-nightly, P-high, O-windows-gnu, T-bootstrap, O-musl, C-bug", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_65343", "text": "Tracking issue for \"minimize the rust-std component\" | This tracks the issue for doing the stuff mentioned in https://github.com/rust-lang/rust/pull/64823. Also relevant: - https://github.com/rust-lang/rust/issues/61978 - https://github.com/rust-lang/rust/issues/62486 - https://github.com/rust-lang/rust/issues/65335 - https://github. | labels: T-bootstrap, T-infra, C-tracking-issue, T-release", "label": "medium", "label_id": 2} |
| {"id": "rust_65344", "text": "rust-lldb fails to load on LLDB 8.0.0 | When I run `rust-lldb` I get the following error: ``` $ rust-lldb target/debug/myprogram (lldb) command script import \"/Users/zmitchell/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/etc/lldb_rust_formatters.py\" error: module importing failed: loading unimplemented ``` | labels: A-debuginfo, P-medium, T-compiler, T-dev-tools", "label": "medium", "label_id": 2} |
| {"id": "rust_65348", "text": "const fn ICE on nightly | The following ICE's on nightly only: ```Rust struct ArrayType<T>(T); impl <T> ArrayType<T> { const ARRAY: [T; 0] = []; } pub const fn bug<T>() -> &'static T { &ArrayType::<T>::ARRAY[0] } fn main() { bug::<i32>(); } ``` <details> <summary>Backtrace:</summary> ``` [ERROR rustc_mir: | labels: I-ICE, regression-from-stable-to-nightly, T-compiler, C-bug, A-const-eval, glacier", "label": "critical_bug", "label_id": 0} |
| {"id": "rust_65350", "text": "Compiling can take hours. | I've heard that rustc is slow, but I'm actually running into 30 to 120 minute compile times. I only installed rustc yeasterday: rustc 1.38.0 (625451e37 2019-09-23) on Debian Buster. I've tried cloning a couple of game engines from github to compare - Piston, gglz, glium plus a ralabelmediumlabel_id |
| idrust_65352textunable to build on windows when \ | When \ in `config.toml` is set to `false`, windows build msvc is unable to build properly. It's due to the limitation of 65535 objects in the linker object. see following error: ``` 316abf8bcc4ba1.rlib\" \"C:\\\\Users\\\\guanq\\\\AppData\\\\Local\\\\Temp\\\\rustcbLuaNn\\\\libsyntax_pos-", "label": "medium", "label_id": 2} |
| {"id": "rust_65354", "text": "Remove disambiguator from intra doc link text | ```rust /// Trait: [`trait@Name`], fn: [`fn@Name`] pub struct S; pub trait Name {} #[allow(non_snake_case)] pub fn Name() {} ``` This is currently rendered as: > <img src=\"https://user-images.githubusercontent.com/1940490/66709897-4a232900-ed22-11e9-9069-0ed584e86df5.png\" width=\" | labels: T-rustdoc, E-medium, C-bug, A-intra-doc-links", "label": "medium", "label_id": 2} |
| {"id": "rust_65356", "text": "`miri` no longer builds after rust-lang/rust#64873 | Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust#64873, I observed that the tool miri has failing tests. A follow-up PR to the repository https://github.com/rust-lang/miri is needed to fix the fallout. cc @popzxc, do you think you would have tim | labels: T-compiler", "label": "medium", "label_id": 2} |
| {"id": "rust_65367", "text": "Output filename collisions and ICE with 'cargo doc' on 1.38.0 | ## Summary I was attempting to run `cargo doc --open` at the top level of a Cargo workspace, which resulted in several warnings regarding output filename collisions for `lexical-core`, `proc_macro2`, `quote`, `syn`, and `unicode-xid` (https://github.com/rust-lang/cargo/issues/631 | labels: T-rustdoc, I-ICE, C-bug", "label": "high", "label_id": 1} |
| {"id": "rust_65371", "text": "Lint `bare_trait_objects` doesn't warn on traits used as types in paths | Example: ```rust trait Method { fn method() {} } trait Tr {} impl Method for Tr {} // warning: trait objects without an explicit `dyn` are deprecated fn main() { Tr::method; // No warning } ``` According to the logic of the lint there should be a suggestion to rewrite `Tr::method | labels: A-lints, T-compiler, C-bug, A-edition-2018labelmediumlabel_id |
| |