| {: , : } |
| {: , : } |
| {: , : } |
| {: , : the parameter type `T` may not live long enough\} |
| {: , : stdarch_aarch64_jscvt\jsconv\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : emcc\-s\DISABLE_EXCEPTION_CA | labels: O-wasm, C-bug |
| idrust_149945textAvoid monomorphizing intrinsic fallback bodies that the backend does not need | Currently, when an intrinsic with a fallback body gets used, we always monomorphize and codegen that body: mono item collection does not know whether the backend will invoke the fallback body or supply its own implementation. This has led to perf regressions i | labels: I-compiletime, T-compiler |
| idrust_71009textDe-stabilize target spec JSON | In a recent [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Stability.20guarantees.20of.20custom.20target.20specifications), it was noted that we currently consider JSON target specifications unstable, in the sense tha | labels: A-stability, T-compiler, A-target-specs, C-discussion |
| idrust_98338textCurrent handling of Unix close() can lead to silent data loss | While working on #98209 , I went searching for where close() is called. I found it in std/src/os/fd/owned.rs: ``` impl Drop for OwnedFd { #[inline] fn drop(&mut self) { unsafe { // Note that errors are ignored when closing a file descriptor. The // reason for | labels: T-libs-api, C-bug, A-io |
| idrust_137582textICE: `assertion failed: layout.is_sized()` with `feature(adt_const_params)` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: E-easy, I-ICE, E-mentor, T-compiler, C-bug, F-adt_const_params |
| idrust_151610text[ICE]: `Span must not be empty and have no suggestion` | <!-- \u001b[31mICE\u001b[0m: Rustc ./a.rs '-Znext-solver=globally -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' ($TID) panicked at compiler/rustc_errors/src/diagnostic.rs:998:9: 'Span must not be empty and have no suggestion'', 'thread 'rustc' ($TID) panicked at comp | labels: A-diagnostics, I-ICE, T-compiler, C-bug, requires-debug-assertions, WG-trait-system-refactor"} |
| {"id": "rust_101169", "text": "unreachable_pub lint false positive | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![warn(unreachable_pub)] mod foo { pub struct Foo; } use foo::Foo; ``` [He | labels: A-lints, C-bug, L-unreachable_pub"} |
| {"id": "rust_152078", "text": "Potential in-module UB in alloc | `HOOK` is a static variable: https://github.com/rust-lang/rust/blob/5ac8ecea36e7548534e0bc3d4aa1c12bd4908566/library/std/src/alloc.rs#L297 `rust_oom` transmutes a pointer `hook` obtained from HOOK into a function: https://github.com/rust-lang/rust/blob/5ac8ece | labels: C-bug, T-libs"} |
| {"id": "rust_148470", "text": "Partial pointers in padding can make const-eval fail | I'm not sure if this is a bug or not. ```rust #![allow(unused)] #[repr(C, align(16))] #[derive(Clone, Copy)] struct Thing { x: u128, y: u64, // Replace the above line with the below line to make it stop compiling // y: std::mem::MaybeUninit<u64>, // 8 bytes of | labels: T-lang, T-compiler, C-bug, A-const-eval, A-ABI, T-opsem |
| idrust_151591text[ICE]: assertion failed: layout.is_sized() | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, T-compiler, C-bug |
| idrust_151708text[ICE]: generics_of: unexpected node kind Crate(Mod | <!-- \u001b[31mICE\u001b[0m: Rustc ./18074FF2C0026A2CB1DAE74699BC86DCF7076BEED1E87DC391BFFFB43561B701.rs '-Zcrate-attr=feature(min_generic_const_args) -ooutputfile -Zdump-mir-dir=dir' 'error: internal compiler error: compiler/rustc_hir_analysis/src/collect/generics_of.r | labels: I-ICE, T-compiler, C-bug, F-min_generic_const_args"} |
| {"id": "rust_147339", "text": "ICE: `span context mismatch` | <!-- \u001b[31mICE\u001b[0m: Rustc ./meta-variable-misuse.rs '-Cinstrument-coverage -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' ($TID) panicked at compiler/rustc_mir_transform/src/coverage/spans.rs:56:13: 'span context mismatch: body_span=/tmp/im/meta-variable-misu | labels: I-ICE, T-compiler, C-bug, A-code-coverage, requires-debug-assertions"} |
| {"id": "rust_152062", "text": "Deriving Default for non-default generics should work in trivial cases | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> ```rust struct NoDefault {} #[derive(Default)] struct VecHolder<T> { data: Vec<T>, } fn main() { let x | labels: C-bug"} |
| {"id": "rust_151643", "text": "rustc `--color always` doesn't always output color | Zulip discussion: [#t-compiler > Rustc `--color always` doesn't always color output](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Rustc.20.60--color.20always.60.20doesn't.20always.20color.20output/with/568526766) While workin | labels: A-diagnostics, T-compiler, C-bug, D-inconsistent, A-error-codes |
| idrust_152043textMiscompilation with vectors | I tried this code: ```rust use std::ops::{Add, Mul}; #[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)] pub struct Vector2<S> { pub x: S, pub y: S, } impl<S> Add<Vector2<S>> for Vector2<S> where S: Add<Output = S> + Copy, { type Output = Vector2<S>; fn add(sel | labels: C-bug |
| idrust_127643textICE: `assertion failed: layout.is_sized()` with `feature(associated_const_equality)` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, E-needs-test, T-compiler, C-bug, A-layout, F-associated_const_equality |
| idrust_151996textdiagnostic::do_not_recommend can emit an error if it encounters a keyword | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![crate_type = \] pub trait X{} pub struct Y; #[diagnostic::do_not_rec | labels: A-attributes, T-compiler, C-bug |
| idrust_151983textMissing \ warning when using a match guard | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() { match Some(42) { Some(unused) if true => (), _ => (), } } ``` I | labels: A-lints, P-medium, T-compiler, regression-from-stable-to-stable, C-bug, L-unused_variables |
| idrust_142519textFunction no longer auto-vectorizes in 1.87.0 | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### | labels: A-LLVM, I-slow, E-needs-test, P-high, T-compiler, regression-from-stable-to-stable |
| idrust_85532textTracking Issue for bigint helper 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 |
| idrust_151607text[ICE]: ` all spans must be disjoint` | <!-- \u001b[31mICE\u001b[0m: Rustc ./a.rs '' 'assertion `left == right` failed: all spans must be disjoint ' left: Some([SubstitutionPart { span: /tmp/im/2/a.rs:5:13: 5:16 (#0), snippet: \ }, SubstitutionPart { span: /tmp/im/2/a.rs:5:15: 5:16 (#0), snippet: \ } | labels: A-diagnostics, I-ICE, T-compiler, C-bug, requires-debug-assertions |
| idrust_147265textRust 1.90 compiler optimization (O2, O3) triggers UB with Box::from_raw() | ### Code I minimized the issue to the following testcase, which uses serde and `bincode` to serialize a structure by boxing it, serializing the exposed address and reconstructs the box from the deserialized address. I believe this to be valid, as long as one c | labels: A-LLVM, P-medium, T-compiler, regression-from-stable-to-stable, C-bug, T-opsem |
| idrust_151088textAlarming memory use and non-termination. | I cloned the [rust serialization benchmark repository](https://github.com/djkoloski/rust_serialization_benchmark/), which I have been able to `cargo bench`. I made a modification, to use a local checkout of the `columnar` crate, with this diff ``` mcsherry@gal | labels: A-LLVM, I-compiletime, P-high, T-compiler, regression-from-stable-to-stable, C-bug |
| idrust_152007textrustdoc should have some indication of hidden bounds | If you look at <https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html#impl-Iterator-for-RangeInclusive%3CA%3E>, for example, it appears as though `RangeInclusive<A>: Iterator` holds *for all `A`*. That's not the case, however, because there's a | labels: T-rustdoc, C-bug |
| idrust_129004text`if let` not possible in short-hand syntax? | labels: A-diagnostics, C-discussion |
| idrust_151941textPossible AVX2-only performance regression (again). | Hello! Seems I can reproduce a **very similar AVX2-only performance regression** (stable-to-stable) to the one described in the `image-png` issue here: - https://github.com/image-rs/image-png/issues/598 ## Repository / code - Repo: https://github.com/sherman/b | labels: C-bug, regression-untriaged, perf-regression |
| idrust_151878text[ICE]: `expected Binder to have 1 projections, but it has 0` | <!-- \u001b[31mICE\u001b[0m: Rustc ./dyn-compat-self-const-projections-in-methods.rs '-Zsanitizer=cfi -Ccodegen-units=1 -Clto -Cunsafe-allow-abi-mismatch=sanitizer -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' ($TID) panicked at compiler/rustc_middle/src/ty/sty.rs:73 | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions, F-min_generic_const_args, A-control-flow-integrity"} |
| {"id": "rust_151331", "text": "[ICE]: `expected a projection` | <!-- \u001b[31mICE\u001b[0m: Rustc ./DC87D749F7189DB6749EB7B0F246583DCA01BDEC0317D86213F29E3CDF421FE8.rs '-Znext-solver=globally -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' ($TID) panicked at compiler/rustc_type_ir/src/predicate.rs:689:9: 'expected a projection'', | labels: I-ICE, T-compiler, C-bug, F-type_alias_impl_trait, S-has-mcve, WG-trait-system-refactor"} |
| {"id": "rust_138225", "text": "ICE:called `Result::unwrap()` on an `Err` value: ReferencesError(ErrorGuaranteed(())) | **Similar to problem #128094, it may be a duplicate problem, but the compile command is different The issue compilation command I opened is `-C opt-level=1`, and #128094 is `-Zmir-opt-level=5 --edition=2018`** And the code is a little different, so I brought u | labels: I-ICE, E-needs-test, T-compiler, C-bug, A-mir-opt"} |
| {"id": "rust_151728", "text": "Sorting Boxes causes Miri to report UB | This issue was discovered by @orxfun on [zulip](https://rust-lang.zulipchat.com/#narrow/channel/269128-miri/topic/miri.20fails.20when.20sorting.20slice.20of.20boxed.20integers/with/570245641). The following code causes Miri to report UB: ```rust fn main() { // | labels: P-high, regression-from-stable-to-stable, I-unsound, C-bug, T-libs, T-opsem"} |
| {"id": "rust_151951", "text": "[ICE]: Latest rust cannot build ans1-rs | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \"Rust Bug Minimization Patterns\" for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_151868", "text": "Non-deterministic rmeta metadata ordering in rustc 1.95.0-nightly | # Non-deterministic rmeta metadata ordering persists in rustc 1.95.0-nightly ## Summary Building the same crate twice with identical inputs produces `.rlib` files with different hashes due to non-deterministic ordering in `lib.rmeta`. The compiled object code | labels: T-compiler, C-bug, S-needs-repro"} |
| {"id": "rust_94691", "text": "Document FAQ why we have both PartialEq and Eq in PartialEq | The title says it all. It's a frequently asked question; most recently on [reddit](https://www.reddit.com/r/rust/comments/t8d6wb/why_does_rust_have_eq_and_partialeq/). It'd be nice if we could link to the standard library docs to answer this. | labels: A-docs, T-libs"} |
| {"id": "rust_151846", "text": "unused_allocation warning should ignore allocations to pass Box to things taking self: &Box | ### Code ```Rust // Copyright 2026 Google LLC. // SPDX-License-Identifier: Apache-2.0 struct MyStruct; trait TraitTakesBoxRef { fn trait_takes_box_ref(&self); } impl TraitTakesBoxRef for Box<MyStruct> { fn trait_takes_box_ref(&self) {} } impl MyStruct { fn inh | labels: A-diagnostics, T-compiler, L-unused_allocation"} |
| {"id": "rust_151882", "text": "[ICE]: frontmatter: begin <= end (4 <= 0) when slicing `----` | <!-- \u001b[31mICE\u001b[0m: Rustc ./code.rs '' 'thread 'rustc' ($TID) panicked at compiler/rustc_parse/src/lexer/mod.rs:628:30: 'begin <= end (4 <= 0) when slicing `----`'', 'thread 'rustc' ($TID) panicked at compiler/rustc_parse/src/lexer/mod.rs:628:30: 'begin <= end | labels: I-ICE, T-compiler, C-bug, S-has-mcve, F-frontmatter"} |
| {"id": "rust_117216", "text": "Tracking Issue for AArch64 TME intrinsics | <!-- 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, O-AArch64"} |
| {"id": "rust_146842", "text": "rust 1.90.0, 1.91.0 and 1.92.0 on big-endian aarch64 all fail with \"internal error: entered unreachable code: found `99`\" | As mentioned in issue #145230, rust 1.90.0 can now be cross-built for the `aarch64_be-unknown-netbsd` target. However, trying to use the result to build e.g. `dua-cli` (ref. https://github.com/Byron/dua-cli/), fails on the first invocation of the rust compiler | labels: I-ICE, T-compiler, C-bug, A-targets, E-needs-investigation"} |
| {"id": "rust_119905", "text": "-Znext-solver=coherence: stack overflow | <!-- 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: T-compiler, C-bug, I-hang, WG-trait-system-refactor"} |
| {"id": "rust_147825", "text": "Unstable fingerprints in `evaluate_obligation` | ### Code https://github.com/Noratrieb/evaluate_obligation-fingerprints All credits for running into this and creating an initial reproduction and minimization goes to @muja via the Rust Community Discord, I just picked it up and continued minimizing it. This i | labels: I-ICE, T-compiler, A-incr-comp, C-bug"} |
| {"id": "rust_151090", "text": "checksum-freshness: does not work with binary embedded files | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code with `-Zchecksum-freshness` enabled on cargo side: ```rust // random_bytes have to b | labels: T-compiler, C-bug"} |
| {"id": "rust_151855", "text": "Failure when compiling rustc due to file permissions in /usr | ### Summary I'm compiling rustc in an openSUSE docker container. When running `make` I very quickly get an error because it's trying to copy `/usr` to `stage0-sysroot`. The file in question is this one: ```sh -rwsr-x--- 1 root messagebus 56K Jun 20 2023 /usr/l | labels: T-bootstrap, C-bug"} |
| {"id": "rust_150896", "text": "std's tests fail to dynamically link under Windows 7 due to `GetHostNameW` missing | When running `std`'s tests under Windows 7, it fails on the first execution on the following error: ``` Running unittests lib.rs (build/x86_64-unknown-linux-gnu/stage1-std/x86_64-win7-windows-msvc/release/deps/alloctests-6f6372787480eb2d.exe) uploaded \"/builds | labels: C-bug, T-libs, A-io, O-windows-7"} |
| {"id": "rust_149829", "text": "Tracking issue for release notes of #148052: Stabilize `const_mul_add` | This issue tracks the release notes text for #148052. cc @tgross35, @Mark-Simulacrum -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#p | labels: T-lang, relnotes, relnotes-tracking-issue"} |
| {"id": "rust_150532", "text": "Hang in trait solver with mutually recursive trait bounds | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust trait MyTrait<T> {} struct Foo; struct Bar; impl<T> MyTrait<T> for Foo wher | labels: T-compiler, C-bug, I-hang, fixed-by-next-solver"} |
| {"id": "rust_149674", "text": "Tracking issue for release notes of #147224: Emscripten: Turn wasm-eh on by default | This issue tracks the release notes text for #147224. cc @hoodmane, @bjorn3 -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparing- | labels: T-compiler, relnotes, relnotes-tracking-issue"} |
| {"id": "rust_148874", "text": "Tracking issue for release notes of #148798: `OsString` `Debug` implementation prints escaped single quotes | This issue tracks the release notes text for #148798. cc @tamird, @tamird -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparing-re | labels: relnotes, T-libs, A-fmt, relnotes-tracking-issue"} |
| {"id": "rust_148824", "text": "Tracking issue for release notes of #65816: Tracking issue for `vec_into_raw_parts` | This issue tracks the release notes text for #65816. cc @shepmaster -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparing-release- | labels: A-collections, T-libs-api, relnotes, A-raw-pointers, relnotes-tracking-issue"} |
| {"id": "rust_148582", "text": "Tracking issue for release notes of #133508: Tracking Issue for `core_slice_as_array`. | This issue tracks the release notes text for #133508. cc @bjoernager -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparing-release | labels: T-libs-api, relnotes, relnotes-tracking-issue"} |
| {"id": "rust_148419", "text": "Tracking issue for release notes of #146978: Emit error when using path-segment keyword as cfg pred | This issue tracks the release notes text for #146978. cc @mu001999, @petrochenkov -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#prep | labels: A-attributes, T-lang, T-compiler, relnotes, relnotes-tracking-issue"} |
| {"id": "rust_148304", "text": "Tracking issue for release notes of #148301: [rustdoc search] Include extern crates when filtering on `import` | This issue tracks the release notes text for #148301. cc @GuillaumeGomez, @notriddle -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#p | labels: T-rustdoc, relnotes, A-rustdoc-search, T-rustdoc-frontend, relnotes-tracking-issue"} |
| {"id": "rust_148145", "text": "Tracking issue for release notes of #145974: Stabilize -Zno-jump-tables into -Cjump-tables=bool | This issue tracks the release notes text for #145974. cc @pmur, @jieyouxu -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparing-re | labels: A-LLVM, T-compiler, relnotes, relnotes-tracking-issue"} |
| {"id": "rust_148258", "text": "Tracking issue for release notes of #148176: [rustdoc] Include attribute and derive macros when filtering on \"macros\" | This issue tracks the release notes text for #148176. cc @GuillaumeGomez, @notriddle -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#p | labels: T-rustdoc, relnotes, A-rustdoc-search, T-rustdoc-frontend, relnotes-tracking-issue"} |
| {"id": "rust_148111", "text": "Tracking issue for release notes of #145665: Don't require `T: RefUnwindSafe` for `vec::IntoIter<T>: UnwindSafe` | This issue tracks the release notes text for #145665. cc @GrigorenkoPV, @the8472 -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#prepa | labels: T-libs-api, relnotes, relnotes-tracking-issue |
| idrust_148107textTracking issue for release notes of #135889: Tracking Issue for `VecDeque::pop_front_if` & `VecDeque::pop_back_if` | This issue tracks the release notes text for #135889. cc @GrigorenkoPV -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparing-relea | labels: T-libs-api, relnotes, relnotes-tracking-issue |
| idrust_148109textTracking issue for release notes of #146705: Tracking Issue for `fmt_from_fn` | This issue tracks the release notes text for #146705. cc @jmillikin -- original issue/PR authors and assignees for drafting text See the forge.rust-lang.org chapter about [release notes](https://forge.rust-lang.org/release/release-notes.html#preparing-release- | labels: T-libs-api, relnotes, relnotes-tracking-issue |
| idrust_151799textRequest to Participate and Share Academic Survey on Code Review in OSS Security | Hello, I hope you are doing well. My name is Md Niaz Morshed ([[mmorshed@crimson.ua.edu](mailto:mmorshed@crimson.ua.edu)]), and I am a PhD candidate at the University of Alabama conducting an academic survey titled “Understanding Information Needs When Looking | labels: C-discussion |
| idrust_151843textRust Compiler Reads Code After return | I rarely come here, but I’ll just write this because, in my opinion, it’s a language bug. The problem is very simple: ```Rust fn demo() -> () { return; 5 + 2; // ⚠ warning: unreachable code some_undefined_var; // ❌ error: cannot find value `some_undefined_var` | labels: A-diagnostics, T-compiler, C-discussion |
| idrust_142602textE0308 doesn't provide a help message in loops when using `let-else` | ### Code ```Rust pub fn main() { let a = loop { if true { break; } let Some(_) = Some(5) else { break 3; }; }; } ``` ### Current output ```Shell error[E0308]: mismatched types --> src/lib.rs:7:19 | 7 | break 3; | ^ expected `()`, found integer For more informa | labels: A-diagnostics, T-compiler, D-terse, F-let_else"} |
| {"id": "rust_151826", "text": "Partial architecture mismatch: X86_64 objects found in precompiled libcompiler_builtins for loongarch64-unknown-none | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I am cross-compiling a kernel project from an **x86_64 Linux host** to the **loongarch64-unknown-none* | labels: C-bug, O-loongarch"} |
| {"id": "rust_151797", "text": "Lifetime hygiene comments missing `#N` suffix in `-Zunpretty=expanded,hygiene` output | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried the following code (based on [this test file](https://github.com/zalanlevai/mutest-rs/blob/515 | labels: A-pretty, T-compiler, C-bug, A-hygiene"} |
| {"id": "rust_143256", "text": "false positive `unused_parens` causes syntax error around labled loops with ifs | Using the following flags `--force-warn unused_parens` this code: ```rust fn foo() { let _x = || 'outer: loop { let inner = 'inner: loop { let i = Default::default(); if (break 'outer i) { loop { break 'inner 5i8; }; } else if true { break 'inner 6; } break 7; | labels: T-compiler, C-bug, A-suggestion-diagnostics, D-invalid-suggestion, L-unused_parens |
| idrust_151672textIssue | <!-- Thank you for submitting a bootstrap report! Please provide detailed information to help us reproduce and diagnose the issue. --> ### Summary <!-- Provide a brief description of the problem you are experiencing. --> ### Command used ```sh <command> ``` ## |
| idrust_151801textIssue | <!-- Thank you for submitting a bootstrap report! Please provide detailed information to help us reproduce and diagnose the issue. --> ### Summary <!-- Provide a brief description of the problem you are experiencing. --> ### Command used ```sh <command> ``` ## |
| idrust_89106text{f32,f64}::DIGITS is misleading | While they come with a caveat that they are an \ value, these constants are treated as gospel and [invoked by clippy in the excessive_precision lint to create a warning](https://github.com/rust-lang/rust-clippy/blob/92ca25b3ec8cef291f1d3b37bfd01d3c | labels: A-docs, A-floating-point |
| idrust_136420textRust fails to coerce to a fn pointer when passing an array as an argument to a generic function. | I tried this code: ```rust fn foo() {} fn bar() {} fn main() { let _a = if true { foo } else { bar }; let _b = vec![foo, bar]; let _c = [foo, bar]; d(if true { foo } else { bar }); e(vec![foo, bar]); f([foo, bar]); } fn d<T>(_: T) {} fn e<T>(_: Vec<T>) {} fn f | labels: T-compiler, A-inference, C-bug, A-coercions, T-types |
| idrust_116237textScoped thread implicit join doesn't wait for thread locals to be dropped | See also https://github.com/rust-lang/rust/issues/116179: > When a scoped thread is **_implicitly_** joined, the destructors of thread-local variables are not guaranteed to have completed when the scope is exited. When a scoped thread is **_explicitly_** joine | labels: T-libs-api, A-thread-locals, C-bug, finished-final-comment-period, disposition-close, A-thread"} |
| {"id": "rust_127571", "text": "Guarantee that thread-local storage destructors run before join() returns | As discussed in https://github.com/rust-lang/rust/issues/116237#issuecomment-2217941740, this is already the implemented behaviour but it is not guaranteed. Unless there is a good reason not to, this guarantee should be made and documented. | labels: T-libs-api, A-docs, A-thread-locals, C-discussion, A-thread"} |
| {"id": "rust_151269", "text": "`unused_must_use` inside macro suggests `let _ = ` on the macro invocation | ### Code ```Rust fn error() -> Result<(), ()> { Err(()) // actual value irrelevant } macro_rules! foo { () => { { error(); } } } fn main() { let _ = foo!(); } ``` ### Current output ```Shell warning: unused `Result` that must be used --> src/main.rs:15:13 | 14 | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_64458", "text": "Foreign type tests not covering all operations | For example foreign type pointer comparison is not tested. Also `&(*val).0` where field `0` of `*val` is a foreign type is not tested. As a last thing pointer to `*mut ForeignType` casting it not tested. These were all cases which were mishandled in [rustc_cod | labels: A-testsuite, C-enhancement, A-FFI, E-needs-test, T-compiler, requires-nightly"} |
| {"id": "rust_114430", "text": "Tweak output of E0599 to make it less verbose | ### Code ```Rust struct Foo; trait Bar {} trait Baz {} trait Bat { fn bat(&self); } impl<T> Bat for T where T: 'static + Bar + Baz { fn bat(&self) { println!(\); } } pub fn main() { Foo::bat(()); } ``` ### Current output ```Shell error[E0599]: the | labels: A-diagnostics, P-low, T-compiler, D-papercut, D-verbose |
| idrust_151422textRustdoc fails contrast check for a certain element. | <!-- Thank you for filing a rustdoc issue! Rustdoc is the tool that handles the generation of docs. It is usually invoked via `cargo doc`, but can also be used directly. If you have an issue with the actual content of the docs, use the \ | labels: E-easy, T-rustdoc, C-bug, A-rustdoc-ui, T-rustdoc-frontend, A-a11y |
| idrust_150399textAdd comment when new directory is added to `tests/ui` | If a new directory is added under [tests/ui](https://github.com/rust-lang/rust/tree/main/tests/ui), it would be nice to add a comment to [tests/ui/README.md](https://github.com/rust-lang/rust/blob/main/tests/ui/README.md) to update it as well. There are a few | labels: A-testsuite, T-compiler |
| idrust_150174textE0507: `AsyncFn` vs `AsyncFnOnce` not given as cause of error, unlike `Fn` vs `FnOnce` | Contrived example (that might be possible to distill further, but it's short enough and gets the job done): ```rust pub async fn in_transaction<F>(callback: F) -> Result<(), ()> where F: AsyncFn() -> Result<(), ()>, { let result = callback().await?; Ok(result) | labels: A-diagnostics, T-compiler, C-bug, A-async-closures, D-lack-of-suggestion"} |
| {"id": "rust_151595", "text": "[ICE]: rustc panicked at compiler\\rustc_mir_build\\src\\builder\\matches\\mod.rs:2176:44 | <!-- 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, A-closures, T-lang, T-compiler, regression-from-stable-to-beta, A-impl-trait"} |
| {"id": "rust_146515", "text": "incorrect \"consider annotating `ContainsRc<T>` with `#[derive(Clone)]`\" | ```rust use std::rc::Rc; #[derive(Clone)] struct ContainsRc<T> { value: Rc<T>, } fn clone_me<T>(x: &ContainsRc<T>) -> ContainsRc<T> { x.clone() } ``` results in ```rust error[E0308]: mismatched types --> src/lib.rs:9:5 | 8 | fn clone_me<T>(x: &ContainsRc<T>) - | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-invalid-suggestion"} |
| {"id": "rust_151548", "text": "Symbol of items instantiated w/ dyn trait w/ assoc const bindings not demangled (aka `backtrace`'s `rustc-demangle` needs to be bumped) | #### Reproducer ```rs #![feature(min_generic_const_args)] trait Trait { #[type_const] const N: usize; } fn f<T: ?Sized>() { panic!(); } fn main() { f::<dyn Trait<N = 1>>(); } ``` #### Program Output ``` thread 'main' (13) panicked at src/main.rs:5:21: explicit | labels: C-bug, T-libs, A-dyn-trait, A-backtrace, F-min_generic_const_args, A-name-mangling |
| idrust_79878textDocument impl block visibility | It seems that if the type is visible, an impl's pub methods can be used, even if such an impl is encased in multiple private modules. https://play.rust-lang.org/?version=nightly&mode=debug&edition=2015&gist=bf21f358b4b57075d1243a3b07d93da9 I cannot find anywhe | labels: C-enhancement, A-visibility, T-lang, A-docs"} |
| {"id": "rust_151636", "text": "Next solver hangs on cyclic associated type projection in blanket implementation bounds | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust trait StreamingIterator { type Item<'a> ; } struct StreamEnumerate<I> { ite | labels: A-trait-system, C-bug, I-hang, T-types, WG-trait-system-refactor |
| idrust_151238textICE: `parse_expected_identifier_found_keyword_str` | see #149692 for prev case <!-- \u001b[31mICE\u001b[0m: Rustc ./6A037843FEA62B4ED74383176913966D09BD78A595E9BE80AB8E96392DBAAC1A.rs '--edition=2024 -ooutputfile -Zdump-mir-dir=dir' 'thread 'rustc' ($TID) panicked at compiler/rustc_parse/src/parser/diagnostics.rs:2267:44: | labels: A-diagnostics, I-ICE, A-parser, T-compiler, C-bug"} |
| {"id": "rust_117242", "text": "Add `core` and `alloc` columns to platform support | It would be nice instead of asterisks and double asterisks, that `core` and `alloc` had their own column, I think this would make it much easier for people skim through the table for compatibility without having to look up what the asterisks' mean. | labels: C-enhancement, A-docs |
| idrust_137407textBad codegen for widen followed by ARM `vdupq_n_*` | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### | labels: P-medium, T-compiler, regression-from-stable-to-stable, A-SIMD, O-AArch64, C-optimization |
| idrust_60637textInlining + target_feature broken in powerpc64 | [godbolt](https://godbolt.org/z/FsNj8l) ```rust #![feature(repr_simd, powerpc_target_feature)] #![allow(non_camel_case_types)] #[repr(simd)] pub struct u32x4(u32, u32, u32, u32); impl u32x4 { #[inline] // #[inline(always)] fn splat(x: u32) -> Self { u32x4(x, x | labels: A-LLVM, T-compiler, O-PowerPC, A-SIMD, C-bug |
| idrust_150464textregression: \ in `offset_of!` | ``` [INFO] [stdout] error[E0391]: cycle detected when borrow-checking `firmware::operation::implement::stm::gain::tests::test_phase_half` [INFO] [stdout] --> src/firmware/operation/implement/stm/gain.rs:649:5 [INFO] [stdout] | [INFO] [stdout] 649 | fn test_pha | labels: P-medium, T-lang, T-compiler, regression-from-stable-to-beta, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_151730", "text": "[ICE]: builtin derive created an unaligned reference | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, T-compiler, C-bug |
| idrust_145580textFound unstable fingerprints for associated_items(foo[c46e]::{impl#0}) | ### Code ```shell git clone https://github.com/rust-lang/rustc_codegen_cranelift cg_clif cd cg_clif git checkout 420235c0f87bd379e3bd318b401ebbf08d82c44d # incr_ice_repro branch ./scripts/test_rustc_tests.sh ``` ### Meta `rustc --version --verbose`: ``` rustc | labels: I-ICE, T-compiler, A-incr-comp, C-bug, E-needs-mcve |
| idrust_151226textICE `Unable to verify registry association` / `!worker_thread.is_null()` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler |
| idrust_150091textICE: inference variables in normalized parameter environment: unconstrained type | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pat | labels: I-ICE, T-compiler, C-bug |
| idrust_92738text\ when compiling Emscripten side module | Because of the `lib.rmeta` file, linking rust libraries doesn't work with `-Wl,--whole-archive`. When compiling an Emscripten side module as follows: ```sh export RUSTFLAGS=\"-C link-arg=-s -C link-arg=SIDE_MODULE=1 -C relocation-model=pic -C target-feature=+mu | labels: A-linkage, O-wasm, C-bug, O-emscripten"} |
| {"id": "rust_110317", "text": "std::process:Command::spawn panics when pre_exec hook fails if SIGCHLD is ignored | On Linux when a `CommandExt::pre_exec` hook is in use, `std::process::Command::spawn` forks, calls `do_exec` and then runs each of the hooks in order. If `do_exec` fails (if a pre_exec hook or exec itself fails for example), the `Err` bubbles up and the child | labels: C-bug, T-libs, A-io, O-unix, A-process"} |
| {"id": "rust_151673", "text": "\"tuple constructor with invalid base path\" bug or confusing diagnostic - min_generic_const_args | I tried this code with `nightly` feature `min_generic_const_args` #132980: ```rust #![allow(incomplete_features)] #![feature(min_generic_const_args)] pub trait NonDropChecker : Sized { #[type_const] const ND: usize; } impl<T> NonDropChecker for T { #[type_cons | labels: A-diagnostics, T-compiler, D-confusing, F-min_generic_const_args"} |
| {"id": "rust_65868", "text": "Slightly confusing grammar in pinning docs. | Hi, I've just read the `std::pin` docs as part of learning `std::future::Future` and attempting to write my own combinator. This section is pretty dense for my first read, and only at the very end, when it mentioned `Future` combinators did I realize I had a m | labels: C-enhancement, T-libs-api, A-docs |
| idrust_113219textTracking Issue for `const_cstr_from_ptr` | Feature gate: `#![feature(const_cstr_from_ptr)]` This is a tracking issue for using `CStr::from_ptr()` in a const context. This method was previously gated under `const_cstr_methods`, but was split off after discussion in https://github.com/rust-lang/rust/pull/107624#pullrequestr | labels: T-lang, T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period |
| idrust_113222textSuggest `x build library` for a custom toolchain that fails to load `core` | ### Code ```Rust x build std --target x86_64-unknown-linux-gnu cd ../example cargo +stage1 build --target i686-unknown-linux-gnu ``` ### Current output ```Shell error[E0463]: can't find crate for `core` = help: consider downloading the target with `rustup target add i686-unknown- | labels: A-diagnostics, A-resolve, T-compiler, T-bootstrap, E-medium"} |
| {"id": "rust_113235", "text": "regression: c\"...\" are experimental | Not clear to me whether this is expected -- I don't see much in the way of commentary on the RFC, and I thought we had reserved these literals previously, but perhaps that reservation was incomplete? https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/gh/noc7c9.py | labels: P-medium, T-compiler, regression-from-stable-to-beta, S-has-mcve, F-c_str_literals |
| idrust_113236textregression: no rules expected the token `:` | * https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/gh/allan-silva.pratical-rust-macro/log.txt * https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/reg/preftool-dirs-0.2.0/log.txt ``` [INFO] [stdout] error: no rules expected the token `:` [INFO] | labels: T-compiler, regression-from-stable-to-stable |
| idrust_113237textregression: temporary value dropped while borrowed | https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/reg/munge-0.3.0/log.txt ``` [INFO] [stdout] error[E0716]: temporary value dropped while borrowed [INFO] [stdout] --> src/lib.rs:194:18 [INFO] [stdout] | [INFO] [stdout] 194 | a = &mut MaybeUninit::uninit(); [INFO | labels: T-compiler, regression-from-stable-to-stable |
| idrust_113238textthe trait bound `&[u8]: std::convert::From<&[_; 0]>` is not satisfied | * https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/gh/bchallenor.firebreak/log.txt * https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/reg/kresp-0.1.2/log.txt * https://crater-reports.s3.amazonaws.com/beta-1.71-4/beta-2023-06-25/gh/AustinHauge | labels: P-high, T-compiler, regression-from-stable-to-beta, T-libs |
| idrust_113243textNo compiler error message when more than one mutable ref to mutable var is declared. | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. I was trying to write some example code to show that rust won't allow more than one mutable ref to a mutable var. I came up wi | labels: C-bug"} |
| {"id": "rust_113250", "text": "bootstrap: consider filtering `compiler` in the `git log` command for download-rustc | Right now, download-rustc picks a commit to download as follows: 1. Choose the last commit authored by bors as the commit we are comparing to: https://github.com/rust-lang/rust/blob/85c4ea0138fcca2e8cf4515a063cd3b762d64aec/src/bootstrap/config.rs#L1921-L1927 2. Check if there are | labels: T-bootstrap, A-download-rustc"} |
| {"id": "rust_113257", "text": "Raw pointer cast triggers \"lifetime may not live long enough\" | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust struct Foo<'a>(&'a ()); fn foo(v: *const Foo<'_>) -> *const Foo<'static> { v as *const Foo<'sta | labels: T-compiler, C-bug, A-coercions, A-raw-pointers |
| idrust_113261textPut `needs-triage` label on every new issue | The GitHub issue for https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/make.20untriaged.20issues.20explicit so I can nominate it for the teams. I've noticed that we have many issues inside rust-lang/rust that are completely untriaged with no interactivity. I | labels: T-rustdoc, C-enhancement, T-compiler, A-meta, T-libs"} |
| {"id": "rust_113264", "text": "Compiler suggestion ping-pongs between E0283 and E0562 | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried to [call the gtk-rs insert_before function](https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/prelude/trait.Widge | labels: A-diagnostics, T-compiler, C-bug, D-invalid-suggestion"} |
| {"id": "rust_113265", "text": "`cycle detected when computing the variances of` despite not using inherent assoc. types feature flag | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> This is a minimal version of a part from my project (compilable repro [here](https://github.com/Technohacker/rust_inherent | labels: T-compiler, C-bug, F-inherent_associated_types, I-cycle"} |
| {"id": "rust_113266", "text": "uninterned StableCrateId: StableCrateId(10368175013544693233) thread 'rustc' panicked at 'Box<dyn Any>' | I've done `x check` after `git pull` and it ICEd. After I've done `x check` again, it also ICEd. After `x clean` it does not ICEs anymore You could find more data like commits in Shell Output <!-- Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your environ | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_113267", "text": "Probably a borrow issue | ```rust struct Parser { //... v_idx : HashMap<i64, HashSet<u64>> //... } impl Parser { #[inline] fn safe_v_idx(&mut self, lit : &i64) -> &mut HashSet<u64> { if let Some(set) = self.v_idx.get_mut(lit) { return set; } self.v_idx.insert(*lit, HashSet::new()); // Do something else he | labels: C-bug"} |
| {"id": "rust_113268", "text": "rustc 1.70 silently removes function | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> (This has been reproduced on both x86 and RISC-V) I prepared https://github.com/tommythorn/rustc-codegen-issue to complain | labels: A-linkage, T-compiler, C-bug, E-needs-bisection"} |
| {"id": "rust_113272", "text": "ICE: `Failed to normalize Alias(Projection, AliasTy ..` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-bug, glacier"} |
| {"id": "rust_113277", "text": "Unable to use Command::spawn with unallocated console | I'm currently trying to run an executable on Windows with Rust Nightly `1.72.0-nightly (5b377cece 2023-06-30)`. It works when the console is allocated with `winapi::um::wincon::AttachConsole` but whenever the console has been unallocated with `winapi::um::wincon::FreeConsole` it' | labels: O-windows, T-libs, A-process"} |
| {"id": "rust_113278", "text": "opaque type wf check anchor usage is unsound | see the second comment for an explanation: https://github.com/rust-lang/rust/issues/113278#issuecomment-1617700571 ```rust #![feature(trivial_bounds, type_alias_impl_trait)] mod sus { pub type Sep = impl Sized; pub fn define_sep() -> Sep { String::new() } pub type Tait = impl Mk; | labels: I-unsound, A-impl-trait, C-bug, F-type_alias_impl_trait, requires-nightly, T-types"} |
| {"id": "rust_113279", "text": "ICE: generators: `assertion failed: field.0.is_sized()` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-coroutines, F-coroutines, glacier"} |
| {"id": "rust_113280", "text": "ICE unexpected TypeKind for left-hand side of `dyn*` cast: Double | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, glacier, S-bug-has-test, F-dyn_star"} |
| {"id": "rust_113283", "text": "Type annotations needed in assertion | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code I tried this c | labels: regression-from-stable-to-nightly, T-libs-api, C-bug"} |
| {"id": "rust_113299", "text": "Segmentation fault for simplest hello world with Guix in PATH | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() { println!(\"Hello, world!\"); } ``` I expected to see this happen: `cargo run` should | labels: O-guix, C-discussion"} |
| {"id": "rust_113300", "text": "error[E0635]: unknown feature `proc_macro_span_shrink` | ``` error[E0635]: unknown feature `proc_macro_span_shrink` --> $HOME/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30 | 92 | feature(proc_macro_span, proc_macro_span_shrink) | ``` Just trying to use some popular crates, like `thiserror` and | labels: C-bug"} |
| {"id": "rust_113311", "text": "Invalid inexistent link persists in non-documented item | ### Steps to reproduce 1. Apply this quick patch diff to see the issue: ```patch diff --git a/src/librustdoc/passes/lint/bare_urls.rs b/src/librustdoc/passes/lint/bare_urls.rs index e9cee92d22b..4c2583f8eac 100644 --- a/src/librustdoc/passes/lint/bare_urls.rs +++ b/src/librustdoc | labels: T-rustdoc, C-bug"} |
| {"id": "rust_113314", "text": "recursive `type_alias_impl_trait` unsoundly allows different underlying types | *edit: minimized* ```rust #![feature(type_alias_impl_trait)] type Op = impl std::fmt::Display; fn foo() -> Op { &\"hello world\" } fn transform<S>() -> impl std::fmt::Display { &0usize } fn bad() -> Op { transform::<Op>() } fn main() { let mut x = foo(); println!(\"{x}\"); x = bad(); | labels: I-unsound, C-bug, F-type_alias_impl_trait, T-types"} |
| {"id": "rust_113326", "text": "ICE: `thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', compiler/rustc_abi/src/lib.rs:1195:59` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, E-needs-test, T-compiler, C-bug, glacier"} |
| {"id": "rust_113327", "text": "v0 symbol mangling creates a `Const` with a different type to existing `Const` | https://github.com/rust-lang/rust/blob/cd68ead9ecfdb3bfbd65cb5ff444c5eaadd21a4d/compiler/rustc_symbol_mangling/src/v0.rs#L654 weird code that looks sus, why are we creating a `Const` that's exactly the same as an existing `Cosnt` only with a different `ty` field. That sounds supe | labels: A-const-generics, F-adt_const_params |
| idrust_113333textReimplement the lexing of `c\` string literals with backward compatibility in mind | The lexing of `c\` string literals as implemented in #108801 had to be reverted in #113334 since it isn't backward compatible. It breaks code that uses a pre-2021 edition (i.e. the 2015 or the 2018 edition). See https://github.com/rust-lang/rust/issues/113235#issuecomment-16160 | labels: T-compiler, C-bug, F-c_str_literals"} |
| {"id": "rust_113338", "text": "Testing SnoozeThis (please ignore) | Hey there. We were asked to integrate [SnoozeThis](https://www.snoozethis.com/) with rustbot. I want to do some testing, so I'm creating this issue for that. Sorry for the spam. |
| idrust_113342textWrong diagnosis for `extern \ pub fn name() {}` | ### Code ```Rust #[no_mangle] extern \ pub fn id(x: i32) -> i32 { x } ``` ### Current output ```Shell error: expected `{`, found keyword `pub` --> error.rs:2:12 | 2 | extern \ pub fn id(x: i32) -> i32 { x } | ^^^ expected `{` error: aborting due to previous error ``` ### Desi | labels: A-diagnostics, T-compiler |
| idrust_113345textTidy rule against `issue-*` filenames in tests? | These filenames are really quite confounding as they mean that everything requires looking at its contents to understand what it is about. This kind of filename is only slightly better than naming it `test.rs`. We may want to lint against adding new ones. <!-- TRIAGEBOT_START --> | labels: A-testsuite, A-contributor-roadblock |
| idrust_113352textICE: broken MIR (on stable & beta) | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, E-needs-bisection |
| idrust_113354text`while let` suggestion missing when E0308 happens in closure body | ### Code ```Rust fn main() { let _ = || { while Some(_) = None { } }; } ``` ### Current output ```Shell error[E0308]: mismatched types --> src/main.rs:2:24 | 2 | let _ = || { while Some(_) = None { } }; | ^^^^^^^^^^^^^^ expected `bool`, found `()` For more information about this | labels: A-diagnostics, T-compiler |
| idrust_113360textLLVM segfault from custom MIR program | ```rust #![feature(custom_mir, core_intrinsics)] extern crate core; use core::intrinsics::mir::*; #[no_mangle] #[custom_mir(dialect = \, phase = \)] pub fn fn11( mut _2: [i8; 7], mut _13: usize, mut _14: *mut ( *mut u64, ((i64,), u8), [i64; 5], [i64; 5], *mut [boo |
| idrust_113362textDoc test accepts semicolon struct definition with braces | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> This doc test code compiles fine even though the code would not be accepted normally. Notice the semicolon in `struct Exam | labels: C-bug |
| idrust_113366textrustc crash with -Zsanitizer=cfi | Downstream bug: https://bugs.chromium.org/p/chromium/issues/detail?id=1442331 Compiler logs: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8776466488696196673/+/u/compile__with_patch_/stdout ``` Compiler output: [30927/97590] RUST local_rustc_sysroot/lib/rust | labels: I-ICE, T-compiler, C-bug, PG-exploit-mitigations |
| idrust_113367textICE: incremental compilation error with mir_built | Note this happens when I make a code change and then immediately run cargo test, but sometimes it can be a small change like in this case I changed an enum by adding the Debug derive. I couldn't do a backtrace because I already did a cargo clean which makes the error go away and | labels: I-ICE, T-compiler, A-incr-comp, C-bug"} |
| {"id": "rust_113368", "text": "E0507 suggests clone() in the wrong position when using the ? operator | ### Code ```Rust #[derive(Clone)] struct SomethingThatDoesntImplCopy{ x: i32 } struct MyStruct { field: SomethingThatDoesntImplCopy } struct MyWrapper{ field: Option<SomethingThatDoesntImplCopy> } fn test(param: &MyWrapper) -> Option<()>{ let _ = MyStruct{ field: param.field? }; | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_113372", "text": "perf regression between nightly 2023-06-28 and 2023-07-01 | There's some performance regression between `nightly-2023-06-28` and `nightly-2023-07-01`. Compilation times for my company's firmware project went from **13s** on `nightly-2023-06-28` to **1m 43s** on `nightly-2023-07-01`. This is for \"change a single line, then build\", not for | labels: I-compiletime, requires-nightly"} |
| {"id": "rust_113375", "text": "ICE: effects: index out of bounds compiler/rustc_hir_typeck/src/callee.rs | <!-- 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-patterns/ --> ### Code | labels: I-ICE, E-needs-test, T-compiler, C-bug, requires-nightly, glacier"} |
| {"id": "rust_113378", "text": "ice: effects: `parent also has host effect param?` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, glacier, F-effects"} |
| {"id": "rust_113379", "text": "ice: `continue to unknown label` async fn / `assertion failed: ln.index() < self.live_nodes` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, glacier, S-bug-has-test"} |
| {"id": "rust_113381", "text": "ice: effects: `ConstContext::Maybe must have host effect param'` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, E-needs-test, T-compiler, C-bug, requires-nightly, glacier |
| idrust_113401textinternal compiler error: encountered incremental compilation error with mir_built(70cff4bb142b8a2c-2b2efb937f56e202) | ### Code prompt.rs: ```Rust use serde::{Deserialize, Serialize}; use serde_yaml::Value; use std::collections::HashMap; #[derive(Debug, Deserialize)] pub enum Example { CompletionExample { name: String, values: Vec<String>, test: Option<String>, }, ChatExample { input: String, out | labels: I-ICE, T-compiler, C-bug |
| idrust_113403textICE: ` expect >1 RPITITs in call to 'collect_return_position_impl_trait_in_trait_tys'` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, requires-debug-assertions |
| idrust_113404text__asan_globals_registered is not comdat when building a staticlib with LTO | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Disclaimer: I tried to create a testcase from scratch, but for some reason I wasn't able to find a way to trigger the use | labels: A-linkage, T-compiler, A-sanitizers, C-bug"} |
| {"id": "rust_113405", "text": "ice: `item_name: no name for DefPath { .. }` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly"} |
| {"id": "rust_113407", "text": "Subnormal f64 to f32 cast is incorrect in CTFE | ```rust pub fn main() { let f = f64::from_bits(0x19873cc2) as f32; println!(\"{:x}\", f.to_bits()); println!(\"{}\", f == 0.); } ``` ```console $ rustc -Zmir-opt-level=2 -Copt-level=3 repro.rs && ./repro 1 false $ ../miri/miri run repro.rs 2> /dev/null 1 false $ rustc -Zmir-opt-level | labels: I-slow, A-mir-opt, A-floating-point, A-const-prop"} |
| {"id": "rust_113409", "text": "Collection of issues blocked on apfloat situation | apfloat is in a [bit of a situation](https://github.com/rust-lang/rust/issues/55993) and has been for a long time. I'd like to have a central list of things to get back to and fix once that situation is resolved; that is the purpose of this issue. - https://github.com/rust-lang/r | labels: C-tracking-issue |
| idrust_113415textICE: `assertion failed: !self.intercrate` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, A-specialization, C-bug, requires-nightly, F-specialization |
| idrust_113423textice: `assertion failed: supertrait_bound_vars.is_empty()'` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-return_type_notation"} |
| {"id": "rust_113424", "text": "\"the full type name has been written to disk\" causes UI tests to fail | I tried this code: ```./x test --doc``` and ```./x test --no-doc``` I expected to see this happen: All tests passing. No doc tests running when using `--no-doc` Instead, this happened: ``` failures: [ui] tests/ui/mismatched_types/issue-36053-2.rs [ui] tests/ui/typeck/issue-31173. | labels: A-testsuite, A-diagnostics, E-mentor, T-compiler, E-medium, C-bug"} |
| {"id": "rust_113434", "text": "ICE: `tried to get type of this RPITIT with no definition` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, glacier"} |
| {"id": "rust_113436", "text": "nightly/beta regression: fnptrs with types containing `()` is warned to be not FFI-safe, while it is before | ### Code ```Rust #![deny(improper_ctypes_definitions)] #[repr(C)] pub struct Wrap<T>(u8, T); pub extern \"C\" fn f() -> Wrap<()> { todo!() } // This does not warn. const _: extern \"C\" fn() -> Wrap<()> = f; // This warns. ``` ### Current output ```Shell error: `extern` fn uses type | labels: A-lints, A-diagnostics, A-FFI, P-medium, regression-from-stable-to-nightly, T-compiler"} |
| {"id": "rust_113438", "text": "ICE: lower-impl-trait-in-trait-to-assoc-ty `item_name: no name for DefPath` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly"} |
| {"id": "rust_113439", "text": "ICE: `item_name: no name for DefPath` -Zlower-impl-trait-in-trait-to-assoc-ty + rpitit | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly"} |
| {"id": "rust_113447", "text": "Nonsensical help message in error E0277 | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code (while debugging): ```rust async fn handle_binary(server_ref: &Ref<State>, uuid: Uuid, bytes: Bytes) -> | labels: A-diagnostics, T-compiler, C-bug"} |
| {"id": "rust_113459", "text": "`unused_parens` reported on complex enum struct-variant literal in match scrutinee expression is actually necessary | ### Code ```Rust #![allow(dead_code)] enum State { Waiting { start_at: u64 } } fn main() { match (&mut State::Waiting { start_at: 0u64 }) { _ => {} } } ``` ### Current output ```Shell warning: unnecessary parentheses around `match` scrutinee expression --> src/main.rs:8:11 | 8 | | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_113462", "text": "ICE: `const parameters cannot be generic` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, glacier"} |
| {"id": "rust_113481", "text": "ICE when attempting to return `for<'y> Trait<AssocType<'y> = impl Whatever>` | ### Code ```Rust trait Foo { type Bar<'x> where Self: 'x; } fn baz() -> impl for<'y> Foo<Bar<'y> = impl ToString> { 42 } impl Foo for i32 { type Bar<'x> = &'x str; } ``` https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=795395ac04289bbbcb23dbb642116c1f ### | labels: I-ICE, T-compiler, C-bug, glacier"} |
| {"id": "rust_113486", "text": "test issue | who's gonna triage this one? |
| idrust_113494texterror[E0152]: duplicate lang item in crate | Compiler error when I'm build. cargo version: 1.72.0-nightly rustc version: 1.72.0-nightly `error: could not compile `libc` (lib)` | labels: T-compiler, C-discussion"} |
| {"id": "rust_113498", "text": "Exception: User-mode data execution prevention (DEP) violation at location when calling Rust FFI library function on x86 Windows and Linux | I'm using Rust to call a Rust-written FFI library function. The library function runs fine on macOS Pro with an M1 processor. However, when running on x86-based Windows and Linux virtual machines, I encounter an error whenever any method within the library function is called. The | labels: O-x86_64, C-bug |
| idrust_113499textRustdoc doesn't always show feature-gated types | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> [miette](https://docs.rs/miette/5.9.0/miette/index.html) has several types that are feature-gated, such as [`GraphicalRepo | labels: T-rustdoc, C-enhancement"} |
| {"id": "rust_113500", "text": "ICE when compiling packed_simd_2 | https://github.com/Nugine/simd-benches/actions/runs/5497445756/jobs/10018184737 ### Meta `rustc --version --verbose`: ``` rustc 1.72.0-nightly (83964c156 2023-07-08) binary: rustc commit-hash: 83964c156db1f444050a38b2498dbd0da6d5d503 commit-date: 2023-07-08 host: x86_64-unknown-l | labels: I-ICE, T-compiler, C-bug, requires-nightly"} |
| {"id": "rust_113502", "text": "Official Rust Playground is broken | The url of the offical website provides a broken example : https://play.rust-lang.org/?version=stable&mode=debug&edition=2021 This code generates an error : ```rust #![allow(unused)] fn main() { use std::collections::BinaryHeap; // Type inference lets us omit an explicit type sig"} |
| {"id": "rust_113503", "text": "The variant of an enumeration has the same name as the function implemented for it, but this does not conflict and cannot call this function | The variant of an enumeration has the same name as the function implemented for it, but this does not conflict and cannot call this function ## Example ```rust fn main() { let _x = Foo::Value(0, ()); //let _y = Foo::Value(0); // error } pub enum Foo { Value(usize, ()), Nil } impl | labels: A-lints, T-compiler"} |
| {"id": "rust_113504", "text": "Moving line \"hash_vec.push(h)\" slows code 1.6x | Merely moving line `hash_vec.push(h)` from one place to another slows code down 1.6x. This is very unfortunate, because this prevents me from converting my sequential code to rayon (I will explain why). Also, all these problems appeared in real production code base, I will explai | labels: I-slow, T-compiler, C-bug"} |
| {"id": "rust_113516", "text": "ice: clippy on none-lifetime binders | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-non_lifetime_binders, T-clippy"} |
| {"id": "rust_113530", "text": "`packed_simd_2` in `v0.3.8` not compiling with `rustc 1.72.0-nightly` | <!-- 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-patterns/ --> The actua | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_113533", "text": "Macros exported by compiler_builtins should not be in the prelude | compiler_builtins exports some macros for use by its tests, but rustc seems to make these available to any code as if they were part of the prelude. While compiler_builtins should be fixed to not export these, it is also strange that the prelude includes these macros. ```rust // | labels: T-libs"} |
| {"id": "rust_113537", "text": "Lifetime should be invariant WRT associated type? | I believe the lifetime of a type should be invariant with respect to that of (trait) associated types? At any rate, this compiles: ```rust use std::marker::PhantomData as PD; trait Trait {} struct A<T>(Box<dyn Fn(T) -> ()>); impl<T> Trait for A<T> {} struct B<C>(Box<dyn Trait, PD | labels: A-lifetimes, A-trait-system, T-compiler, A-variance"} |
| {"id": "rust_113538", "text": "[BUG] Stable (warning): Async traits Self return requires type specification | When using the `#![feature(async_fn_in_trait)]` flag, I stumbled upon a warning that I don't understand and assume to be a bug/missed implementation. If this is the intended behavior, could anyone please explain why? This is simplified code that generates the warning: ```rust #![ | labels: C-bug, A-async-await, AsyncAwait-Triaged, requires-nightly, F-async_fn_in_trait |
| idrust_113547textInvalid suggestion from E0507 with & and ? | ### Code ```Rust struct A { member: Option<String>, } fn main() { let a = A{ member: None}; function(&a); } fn function(a: &A) -> Option<()> { let member = &a.member?; None } ``` ### Current output ```Shell error[E0507]: cannot move out of `a.member` which is behind a shared refe | labels: A-diagnostics, T-compiler |
| idrust_113564text#[no_coverage] didn't exclude internal functions and closures inside a function | Thus, require \"#[cfg_attr(coverage_nightly, no_coverage)]\" prepend before each internal functions/closures for coverage exclusion, e.g.: https://github.com/mhfan/inrust/blob/d4bd798028b9d06709b1c65ef92993af805ba4a4/src/calc24.rs#L737C1-L762C6 https://github.com/taiki-e/cargo-llvm | labels: requires-nightly, A-code-coverage"} |
| {"id": "rust_113566", "text": "Confusing diagnostic when argument type in impl FnOnce() is not found | ### Code ```Rust type Foo = Bar; fn check(f: impl FnOnce(Foo), val: Foo) { f(val); } ``` ### Current output ``` Compiling playground v0.0.1 (/playground) error[E0412]: cannot find type `Bar` in this scope --> src/lib.rs:1:12 | 1 | type Foo = Bar; | ^^^ not found in this scope err | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_113580", "text": "bootstrap: sanity check install prefix and sysconfdir | In the followup discussion on #110906, we discovered that their original problem was because they had chosen a path under their home directory for `[install] prefix`, but they had not changed the default `sysconfdir = \"/etc\"`. So most things installed fine, but they didn't have p | labels: C-enhancement, T-bootstrap |
| idrust_113582textTracking Issue for rustc internal debug printing of infer var universes | #112984 introduced a way for rustc contributors to debug output the universes of ty/const/region vars. [This comment](https://github.com/rust-lang/rust/pull/112984#pullrequestreview-1524848827) lists a variety of things that should be followed up on. Particularly: - [ ] Introduce | labels: T-compiler, C-tracking-issue |
| idrust_113584textnondeterministic ordering in rmeta section | We are running determinism checks on `rustc` outputs in our build infrastructure, basically running a `rustc` action twice in a row (backing up outputs from the first run) and comparing outputs. We have found that in one of our build environments (not directly accessible), this d | labels: A-metadata, T-compiler, C-bug, A-reproducibility |
| idrust_113585textSpurious clippy CI failure | In https://github.com/rust-lang/rust/pull/113569, clippy CI [failed](https://github.com/rust-lang/rust/actions/runs/5521692418/jobs/10070176140), and I don't think that can be caused by my PR: ``` FAILURES: tests/ui/empty_line_after_doc_comments.rs tests/ui/empty_line_after_outer | labels: A-testsuite, A-spurious, P-critical, T-clippy"} |
| {"id": "rust_113594", "text": "TAIT: \"open drop from non-ADT\" | Note: this **only reproduces with `cargo build`** (or rust-analyzer builds), not `cargo check`. ### Code ```Rust #![feature(type_alias_impl_trait)] pub struct Foo { /// This type must have nontrivial drop glue field: String, } pub type Tait = impl Sized; pub fn ice_cold(beverage: | labels: I-ICE, T-compiler, A-impl-trait, C-bug, F-type_alias_impl_trait, requires-nightly"} |
| {"id": "rust_113597", "text": "Regression when using `linker=arm-none-eabi-gcc` | The [cortex-m](https://github.com/rust-embedded/cortex-m) CI tests building with all our supported linkers: Rust's provided `lld`, ARM GCC's `arm-none-eabi-ld`, and ARM GCC's `arm-none-eabi-gcc`. It recently encountered an error when using `arm-none-eabi-gcc` in nightly builds si | labels: A-linkage, P-medium, regression-from-stable-to-nightly, C-bug, A-CLI |
| idrust_113600textruntime perf regression between nightly `2023-06-14` and `2023-06-15` | I noticed my runtime performance got significantly worse, I'm trying to update LEDs 60 times per second. The host system is an M1 MacBook Pro. It's talking to an rp2040 over serial. Observations: - `2023-06-14`: the update time is around `15.4ms`. - `2023-06-15`: it goes up to ar | labels: O-Arm, C-bug, E-needs-bisection, regression-untriaged, O-bare-metal |
| idrust_113601textExtend incorrect_fn_null_checks lint to useless_ptr_null_checks | I'd suggest extending the newly added `incorrect_fn_null_checks` lint added in #111717 to cover cases of null comparison for other non-nullable types, like for instance in: ```Rust let v: &u8 = &0; (v as *const u8).is_null(); ``` This would involve a renaming of the lint to `usel | labels: A-lints, T-lang"} |
| {"id": "rust_113610", "text": "ICE `DefId(2:2587 ~ core[22a2]::default) does not have a \"generics_of\"` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, glacier"} |
| {"id": "rust_113612", "text": "rustc - signal: 11, SIGSEGV: invalid memory reference when compiling a crate | When the `p384` crate compiling we are getting 'signal: 11, SIGSEGV: invalid memory reference' error. This issue is occurring on 32-bit architecture machines when doing DEBUG build. Also, this issue is observed only when building this in Yocto. In rust tarball sources we couldn't | labels: I-crash, T-compiler, I-compilemem, C-bug, O-x32, E-needs-mcve |
| idrust_113619textType alias impl trait resolves to different concrete types | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(type_alias_impl_trait)] trait Test {} struct A; impl Test for A {} struct B<T> { inn | labels: A-type-system, I-unsound, C-bug, F-type_alias_impl_trait, requires-nightly, T-types |
| idrust_113627textthe `write_at` function from `std::os::unix::prelude::FileExt` doesn't work as described | <!-- the `write_at` function from `std::os::unix::fs::FileExt` doesn't work as described and the example fails --> I'm pretty new to rust and I'm working on a small project where I need to write into a file some data at various offsets, so the `write_at` function seems to perfect | labels: E-easy, T-libs-api, E-help-wanted, A-docs, C-bug, T-libs |
| idrust_113632textfunction `is_copy_modulo_regions` from `rustc_middle::ty::Ty` panick on reference type (nightly) | I'm trying to use this function `is_copy_modulo_regions` from `rustc_middle::ty::Ty`. It can be found in the documentation at https://doc.rust-lang.org/stable/nightly-rustc/rustc_middle/ty/struct.Ty.html#method.is_copy_modulo_regions. I try to check whether values of a type `T` a"} |
| {"id": "rust_113635", "text": "Internal Compiler Error when changing type of field in enum variant | <!-- 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-patterns/ --> ### Expla | labels: I-ICE, T-compiler, A-incr-comp, C-bug"} |
| {"id": "rust_113655", "text": "`-Ztrait-solver=next` proof tree improvements | This is a tracking issue for improvements the proof tree implementation for the new solver. Proof trees can be used for debugging by using `-Zdump-solver-proof-tree` and `-Zdump-solver-proof-use-cache=(true|false)` https://rustc-dev-guide.rust-lang.org/solve/proof-trees.html For | labels: C-tracking-issue, WG-trait-system-refactor"} |
| {"id": "rust_113656", "text": "error: could not document crate: the compiler unexpectedly panicked: Option::unwrap | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-async_fn_in_trait"} |
| {"id": "rust_113660", "text": "Type System Resolution Error with GATs | I can constrain a generic so that a type `T` implements a trait `X` which has an associated type which implements a trait `Y` ([playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=43d30c5961b0d3a068e9806828af59fb)). Once this associated type become | labels: C-bug"} |
| {"id": "rust_113664", "text": "Why isn't the `unsafe` keyword necessary for custom MIR? | Why isn't the `unsafe` keyword necessary for [custom MIR](https://doc.rust-lang.org/std/intrinsics/mir/index.html)? It seems like using custom MIR can potentially introduce memory-related bugs and even trigger internal compiler errors(ICE). | labels: T-compiler, A-MIR, requires-nightly"} |
| {"id": "rust_113678", "text": "`./x.py dist` fails in `rust 1.71.0` on `lint-docs` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Build of `rust 1.71.0` fails on Linux/aarch64 (bootstrapped by system `rust 1.70.0`) with: ```console running: LD_LIBRARY_ | labels: beta-accepted, regression-from-stable-to-stable, T-bootstrap, C-bug, T-release, stable-accepted"} |
| {"id": "rust_113680", "text": "undefined reference to `memfd_create | /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/nix-0.26.2/src/sys/memfd.rs:56: undefined reference to `memfd_create error: could not compile `bpfd` (bin \"bpfd\") due to previous error Attempting to compile bpfd using cargo and rust using a centos7 container. | labels: T-compiler, C-discussion"} |
| {"id": "rust_113689", "text": "ICE when trait resolution defines opaque types | This used to compile and now ICEs: ```rust fn returns_u8(_: impl Fn() -> u8) {} fn foo() -> impl Sized { returns_u8(foo); 0u8 } ``` Compiles on Stable version: 1.70.0 Regressed in 1.71.0-beta.6 (2023-07-08 01b5c40dc1333f0dcdf4) I guess it is #112963, but this shouldn't be in beta | labels: I-ICE, T-compiler, regression-from-stable-to-beta, A-impl-trait |
| idrust_113702textUnstable lints passed on command line can only be ungated from source code | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust rustc hello_world.rs -Wunnameable_types -Zunstable-options ``` I expected to see this happen: S | labels: A-lints, A-diagnostics, T-compiler, C-bug |
| idrust_113727textGenerate documentation for type aliases/definitions | I'm facing similar problem to this [stack overflow question](https://stackoverflow.com/questions/74333290/how-to-generate-rust-docs-for-type-aliases). Specifically, I made a wrapper class that wraps around an FFI object and creates common functionality like `from_ffi`, etc. ```ru | labels: T-rustdoc, S-blocked"} |
| {"id": "rust_113713", "text": "clippy, rustfmt missing from master toolchain | `$ rustup-toolchain-install-master -f -c rustc-dev llvm-tools rust-src clippy rustfmt` ``` fetching master commit hash... detecting the channel of the `bef6ff618f17398775e9d8cd23a6f47d983869dc` toolchain... downloading <https://ci-artifacts.rust-lang.org/rustc-builds/bef6ff618f17 | labels: T-infra, C-bug, P-critical"} |
| {"id": "rust_113718", "text": "rustdoc: is there a way to link to public macros without going through the crate root? | In that case, is there a way to force linking to a macro in a specific path instead of resolving to the crate root? I'm finding it makes some docs weird when the text says one thing but the link goes somewhere else. _Originally posted by @ChrisDenton in https://github.com/rust-la | labels: A-macros, A-intra-doc-links |
| idrust_113721textGAT/extended: wrong lifetime analysis | Using `generic_associated_types_extended` (https://github.com/rust-lang/rust/issues/95451), this code fails: ```rust #![feature(generic_associated_types_extended)] trait Trait { type Ret<'r> where Self: 'r; fn get<'r>(&'r self) -> Self::Ret<'r>; } struct Person<'a> { name: &'a st | labels: A-lifetimes, T-compiler, C-bug, F-generic_associated_types_extended, A-GATs"} |
| {"id": "rust_113726", "text": "Segfault in `std::sync::mpmc::waker::SyncWaker::notify` | I have code that resembles the following in my application. I'm trying to write a reproduction code, but so far no luck. ```rust let (tx, rx) = mpsc::sync_channel(64); let tx = Arc::new(tx); // Rx thread loop { match rx.recv_timeout(wake_up_interval) { Err(sync::mpsc::RecvTimeout | labels: P-high, I-unsound, C-bug, E-needs-mcve, T-libs, A-atomic |
| idrust_113736textICE: `lazy_type_alias` None in compiler/rustc_hir_analysis/src/astconv/mod.rs | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-lazy_type_alias |
| idrust_113744textTracking Issue for `IpvNAddr::{BITS, to_bits, from_bits}` (`ip_bits`) | <!-- 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 process. In that case, y | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period |
| idrust_113757textBounds check elision fails when using cmp::max | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust pub fn foo(v: &mut Vec<MaybeUninit<u8>>, size: usize)-> Option<&mut [MaybeUninit<u8>]> { if v.l | labels: A-LLVM, I-slow, E-needs-test |
| idrust_113760textICE: `field.0.is_sized()` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_113766textCannot use `=>` inside the body of a macro_rules for defining match arms | I tried this code: ```rust enum MyEnum { A(i32), B(i32), C(i32) } macro_rules! broken { ($n:ident) => { MyEnum::$n(n) => n } } fn main() { let e = MyEnum::A(1); match e { broken!(A), broken!(B), broken!(C), } } ``` <details><summary>Cargo expand output</summary> ```rs # of the external crate (as expected): ```d | labels: C-bug |
| idrust_113776textICE: `expected type of closure body to be a closure or coroutine` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, E-needs-test, T-compiler, C-bug, requires-nightly, F-generic_const_exprs |
| idrust_113783textPanic unwinding fails on macOS targets when using the Xcode 15 beta | ### Platform: * macOS Sonoma 14.0 Beta (23A5286i) * Apple Silicon * Xcode 15 beta 4 ### I tried this code: ```rust use std::panic; fn main() { _ = panic::catch_unwind(|| { assert!(false, \); }); println!(\); _ = panic::catch_unwin | labels: O-macos, C-bug, P-critical |
| idrust_113784textbootstrap PGO artifact copies broken | It looks like at least the old Python script hardcoded the channel as \, which won't work on beta and stable branches. https://github.com/rust-lang/rust/pull/113540/commits/27ff8191989ff67c9e07f062d42a6ca1d1e42720 fixed this for last week's promotion from master -> beta, | labels: regression-from-stable-to-beta, T-bootstrap |
| idrust_113788textInline asm: `*const [type error]` does not implement the Copy trait | ### Code ```Rust fn main() { let peb: *const PEB; unsafe { std::arch::asm!(\, out(reg) peb); } } ``` ### Current output ```Shell error[E0412]: cannot find type `PEB` in this scope --> src/main.rs:2:18 | 2 | let peb: *const PEB; | ^^^ not found in this scope err | labels: E-easy, A-diagnostics, T-compiler, D-papercut |
| idrust_113792textRefCell::borrow in `if let` expression is not dropped until after `else` block | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust use std::cell::RefCell; use std::ops::Deref; fn test(foo: RefCell<Option<u32>>) { if let Some(r | labels: C-bug |
| idrust_113794textICE: rpitit: `item_name: no name for DefPath {..}` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: A-lifetimes, I-ICE, T-compiler, C-bug, requires-nightly, F-return_position_impl_trait_in_trait |
| idrust_113796textAFIT no longer seems to play nice with lifetime GATs | Tracking issue: https://github.com/rust-lang/rust/issues/91611 A few months ago I authored a [complete example for a possible `AsyncIterator::lend` method](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=92cb8f410bf782c3c9e59c47c947a0bc). This used to com | labels: A-lifetimes, C-bug, A-async-await, requires-nightly, F-async_fn_in_trait, A-implied-bounds |
| idrust_113798textx test error_index_generator triggers 'nested groups are not supported by GHA' check | ### Command ``` x test error_index_generator ``` ### Output ``` Testing stage1 error-index (x86_64-unknown-linux-gnu) Building tool rustdoc (stage0 -> stage1, x86_64-unknown-linux-gnu) thread 'main' panicked at 'nested groups are not supported by GHA!', tool.rs:486:30 note: run w | labels: regression-from-stable-to-nightly, T-bootstrap, C-bug |
| idrust_113805textBacktrace path usability issue | As an imperfect developer of software that processes imperfect files, backtraces are a... thing. Accurate and navigable backtraces (when using tooling of any kind) are especially helpful. It would be wonderful to be able to generate backtraces that are relative to my workspace, w | labels: A-debuginfo, T-compiler, WG-debugging |
| idrust_113806textError while building samply which depends on bitvec | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_113808textunused_qualification removes generic params | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust // run-pass #![feature(unsized_fn_params)] use std::ops; use std::ops::Index; pub struct A; imp | labels: T-compiler, C-bug, A-suggestion-diagnostics, D-papercut, D-invalid-suggestion, L-unused_qualifications |
| idrust_113809textAdd non-panicking variants of `Steal` methods | It would be better if we had probing variants of methods in `rust_data_structures::steal::Steal`. Currently, there's no way to check if the value is already stolen and should not be even asked to be borrowed again. And by non-panicking variants I mean `try_*` functions. | labels: T-compiler, A-query-system"} |
| {"id": "rust_113817", "text": "red/green color in diffs can get offset from actually changed characters | ### Code ```Rust pub fn stuff(&foo: ()) {} ``` ### Current output ```Shell error[E0308]: mismatched types --> src/main.rs:1:14 | 1 | pub fn stuff(&foo: ()) {} | ^^^^ -- expected due to this | | | expected `()`, found `&_` | = note: expected unit type `()` found reference `&_` hel | labels: A-diagnostics, P-low, T-compiler, D-papercut"} |
| {"id": "rust_113818", "text": "Error in trait resolution on traits with associated types with generic lifetimes | Hi! I think I've found an error in the type system. I think the following code should compile ([Link to rust playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ecb9717ee574fcd93ae3f826cbb5a525)): ```rust pub trait Base { type Item<'a> where Self: | labels: A-type-system, A-trait-system, C-bug, T-types"} |
| {"id": "rust_113826", "text": "Improve error output of “Detect diff markers in the parser” | _Copied from my comment in #106242:_ I'd love this functionality but I'm not a huge fan of the error messages themselves. ``` error: encountered diff marker --> $DIR/enum-2.rs:3:1 | LL | <<<<<<< HEAD | ^^^^^^^ after this is the code before the merge LL | x: u8, LL | ||||||| | --- | labels: A-diagnostics, T-compiler, D-papercut"} |
| {"id": "rust_113831", "text": "cargo check does not catch \"index out of bounds\" error | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Running `cargo check` does not detect \"index out of bounds\" error in the following code: ```rust fn main() { let a: [i32; | labels: C-bug"} |
| {"id": "rust_113834", "text": "Incorrect reference to the glob binding caused by the macro expansion | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust pub mod a { pub use crate::b::*; } mod b { pub mod http { pub struct HeaderMap; } pub use self: | labels: A-resolve, T-compiler, C-bug"} |
| {"id": "rust_113838", "text": "ICE when build serde during work on my PR | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, E-needs-mcve"} |
| {"id": "rust_113839", "text": "rustc --emit=dep-info also includes rustdoc requirements without --cfg=doc | The #[doc] attribute can be used to generate rustdoc from a file: ```rs #[doc = include_str!(\"README.md\")] fn foo() {} fn main() { foo() } ``` However when compiling this code, rustc also reads the md file even though it is not part of its output. This means that bots compiling c | labels: C-bug"} |
| {"id": "rust_113840", "text": "possible bug in vtable formation | While working on #112355 I _think_ I found a bug. Given this program: ```rust #![feature(rustc_attrs)] #[rustc_dump_vtable] pub trait What: Send + Sync { fn a(&self) {} } impl What for () {} fn main() { (&() as &dyn What).a(); } ``` rustc outputs the following vtable layout: ``` | labels: A-trait-system, F-trait_upcasting"} |
| {"id": "rust_113844", "text": "Help message in `E0369` points to wrong file | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I have the following code, split into two files: ```rust // src/main.rs // this appears in the error mod name; use name::N | labels: A-diagnostics, C-bug"} |
| {"id": "rust_113851", "text": "Setting #![windows_subsystem = \"windows\"], processes will not be spawned under Windows server 2008 SYSTEM privileges. | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![windows_subsystem = \"windows\"] use std::process; fn main() { process::Command::new(\"notepad. | labels: O-windows, C-bug, T-libs, A-process, O-windows-7"} |
| {"id": "rust_113852", "text": "Instant::now() broken on emscripten target | When targeting `wasm32-unknown-emscripten` with emscripten versions after probably https://github.com/emscripten-core/emscripten/commit/c8857a6152c3954014d2aefb706471ee4c80fe30 and `ASYNCIFY=1`, all async operations are extremely broken, often waking up after 0 ms or 1000 ms. Thi | labels: O-wasm, C-bug"} |
| {"id": "rust_113860", "text": "ICE: `DefId() reachable Restricted(DefId()) > nominal Restricted(DefId())` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, requires-debug-assertions"} |
| {"id": "rust_113866", "text": "debug ice: `Span must not be empty and have no suggestion`, passing macro into fn that does not expect args | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-suggestion-diagnostics, requires-debug-assertions"} |
| {"id": "rust_113869", "text": "thread 'copy LTO artifacts for 14fjghlwjticu4oo' panicked at 'no saved object file in work product', `compiler\\rustc_codegen_ssa\\src\\back\\write.rs:890:10` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_113874", "text": "PathBuf is_dir is not true | rust: 1.70+ when dir not exist ```rust // Left: false // Right: true #[test] fn test_is_dir() { let mut path_buf = PathBuf::from(\"target/test/\"); assert_eq!(path_buf.is_dir(), true); } ``` | labels: C-bug"} |
| {"id": "rust_113881", "text": "backtrace missing from file | Sometimes when rustc dumps an ICE backtrace to disk, the file only contains ``` rustc version: 1.73.0-nightly (0646a5d1a 2023-07-20) platform: x86_64-unknown-linux-gnu ``` I have yet to find what actual file/ice causes this, its a bit tricky since there is no mapping from ice fil | labels: T-compiler, C-bug, D-diagnostic-infra"} |
| {"id": "rust_113894", "text": "let_underscore_drop: weird \"+\" in output? | ### Code ```Rust #![allow(unused_must_use)] use std::thread; macro_rules! expr { ($e: expr) => { $e } } macro_rules! spawn { ($($code: tt)*) => { expr!(thread::spawn(move|| {$($code)*}).join()) } } pub fn main() { spawn! { println!(\"expr\"); }; let _ = spawn! { println!(\"expr\"); } | labels: A-diagnostics, A-macros, T-compiler, C-bug, A-suggestion-diagnostics, D-diagnostic-infra"} |
| {"id": "rust_113896", "text": "panic documenting local juice repo | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_113897", "text": "Incorrect `size_hint()` on `EncodeUtf16` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust println!(\"{:?}\", \"12345678901234\".encode_utf16().size_hint()); let mut it = \"\\u{101234}\".encode | labels: C-bug, A-iterators, T-libs"} |
| {"id": "rust_113900", "text": "[ICE] when compiling `abi_stable`: Failed to normalize ..., maybe try to call `try_normalize_erasing_regions` instead | ### Code Create an empty crate, add `abi_stable` to dependencies, and `cargo check`. ```toml [dependencies] abi_stable = \"0.11\" ``` ### Affected release channels - [ ] Previous Stable - [ ] Current Stable - [X] Current Beta - [X] Current Nightly ### Rust Version ```Shell First on | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-beta, C-bug"} |
| {"id": "rust_113903", "text": "ICE: `no entry found for key` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-return_position_impl_trait_in_trait"} |
| {"id": "rust_113909", "text": "macro_rules! body errors for Mutex<?Sized> | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> | Channel | stable | nightly | |--------------|----------|------------| | rustc version | `rustc 1.71.0 (8ede3aae2 2023-07 | labels: C-bug"} |
| {"id": "rust_113912", "text": "Improve help for const-able values used in array initialization | ### Code ```Rust fn main() { let x = [None::<String>(); 10]; } ``` ### Current output ```Shell error[E0277]: the trait bound `String: Copy` is not satisfied --> src/main.rs:2:14 | 2 | let x = [None::<String>; 10]; | ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String` | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_113916", "text": "\"correctly\" check opaque type lifetimes to be unique params | see https://rust-lang.zulipchat.com/#narrow/stream/315482-t-compiler.2Fetc.2Fopaque-types/topic/non-defining.20uses.20due.20to.20equal.20lifetimes for more details. This did not get a \"formal approval\" yet but summarizes the previous discussion on zulip. We currently don't check | labels: A-impl-trait, C-bug, F-type_alias_impl_trait, T-types |
| idrust_113919textICE: `'attempted to read from stolen value: rustc_middle::mir::Body', compiler/rustc_mir_transform/src/ffi_unwind_calls.rs:50:78` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, E-needs-mcve |
| idrust_113927textUse size_hint when using `read_to_end` on something that impl's Read | In the [`default_read_to_end`](https://doc.rust-lang.org/src/std/io/mod.rs.html#360) implementation, a parameter for `size_hint` is available. However, when doing the actual [`read_to_end`](https://doc.rust-lang.org/src/std/io/mod.rs.html#726), it's initialized with `None`. When | labels: I-slow, T-libs |
| idrust_113929textrustdoc RPITIT ICE: `compiler\\rustc_middle\\src\\ty\\generic_args.rs:900:9: type parameter `impl ToString/#1` (impl ToString/1) out of range when substituting, args=[MyStruct]` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> The `carg | labels: T-rustdoc, I-ICE, T-compiler, C-bug, A-cross-crate-reexports, F-return_position_impl_trait_in_trait |
| idrust_113935textRust has no ASAN support for catalyst ABI (x86_64-apple-ios-macabi) | Building for `x86_64-apple-ios-macabi` with ASAN enabled produces this error: ``` FAILED: local_rustc_sysroot/lib/rustlib/x86_64-apple-ios-macabi/lib/libcore.rlib \ \ --rustc=../../third_party/rust-toolchain/bin/rustc --depfile=local_rust | labels: O-macos, O-ios, O-x86_64, A-sanitizers, C-bug |
| idrust_113941textthe naive layout isn't refined by the actual layout | <!-- 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-patterns/ --> ### Code | labels: I-ICE, regression-from-stable-to-nightly, T-compiler, C-bug, P-critical"} |
| {"id": "rust_113947", "text": "thread 'rustc' panicked at 'Box<dyn Any>' | ### Code Sorry, didn't try to make minimal example. It likely broke in the latest nightly, because yesterday it worked fine in CI. Error can be reproduced with * checkout https://github.com/facebookexperimental/starlark-rust/ for example, latest revision b0928b782a94bd1b4237b07c6 | labels: I-ICE, T-compiler, C-bug |
| idrust_113951textICE: `has escaping bound vars, so it cannot be wrapped in a dummy binder.` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-bug |
| idrust_113952textICE: `the naive layout isn't refined by the actual layout` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_113953", "text": "ICE: `inconsistent resolution for an import` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-beta, C-bug"} |
| {"id": "rust_113962", "text": "ICE: `compiler/rustc_ty_utils/src/layout_sanity_check.rs:25:9`: the naive layout isn't refined by the actual layout: | ### Code [`compact_str`](https://github.com/ParkMyCar/compact_str/tree/main/compact_str) ### Meta `rustc --version --verbose`: ``` rustc 1.73.0-nightly (0308df23e 2023-07-21) ``` This ICE happpens in [`compact_str` CI](https://github.com/ParkMyCar/compact_str/actions/runs/5630997 | labels: I-ICE, T-compiler, C-bug |
| idrust_113963text`./x.py test` panics | ``` $ ./x.py test Building bootstrap Finished dev [unoptimized] target(s) in 0.18s thread 'main' panicked at 'fs::read_dir(builder.src.join(&relative_path).join(\"redirects\")) failed with No such file or directory (os error 2)', doc.rs:228:21 note: run with `RUST_BACKTRACE=1` envi | labels: T-bootstrap |
| idrust_113971textopaque type definition: strict lifetime equality vs equal-by-inference | The following code compiles but I don't think it should: ```rust #![feature(type_alias_impl_trait)] trait Captures<'a> {} impl<T> Captures<'_> for T {} fn ensure_outlives<'a, X: 'a>(_: X) {} fn relate<X>(_: X, _: X) {} type Opaque<'a> = impl Copy + Captures<'a>; fn test<'x>(_: Op | labels: C-enhancement, A-impl-trait, F-type_alias_impl_trait, T-types |
| idrust_113981textrustc can't read files with more than one dot in filename | ```bash echo \"pub fn main() {}\" > a.b.rs rustc a.b.rs ``` ``` error: invalid character `'.'` in crate name: `a.b` ``` Why would rustc think this is related to crates when I just pass a simple path into it? | labels: A-diagnostics, C-bug"} |
| {"id": "rust_113982", "text": "Doc feature banners won't show up when re-exporting items with wildcard | ### Problem I'm building a big library crate, composed of multiple sub-crates. These sub-crates are gated through [Cargo features](https://doc.rust-lang.org/cargo/reference/features.html), so the user can choose what to import. My goal is to have \"fruits\" and \"colors\" feature ban | labels: T-rustdoc, C-bug, F-doc_cfg, F-doc_auto_cfg"} |
| {"id": "rust_113984", "text": "inline assmbly load symbol address will cause `relocation R_X86_64_32S out of range` | <!-- 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.high address variable http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-pa | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_113989", "text": "Confusing error when trying to assign to a variable matching a constant's name | ### Code ```Rust const test: usize = 15; let test = 33; ``` ### Current output ```Shell error[E0005]: refutable pattern in local binding --> src/windows/mod.rs:883:13 | 883 | let test = 33; | ^^^^ | | | pattern `_` not covered | missing patterns are not covered because `test` is | labels: A-diagnostics, T-compiler, D-confusing |
| idrust_114000text`-Zunpretty=hir` prints weirdly indented output for `println!` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> ```rust $ echo \hi\\\ | rustc - -Zunpretty=hir #[prelude_import] use ::std::prelude::rust_2015: | labels: A-pretty, T-compiler, C-bug, requires-nightly |
| idrust_114007textVTables include uncallable methods (that take `self` by value) | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I expected that given the following method, both methods won't be included in the vtable (note that this trait **is** obje | labels: A-trait-system, T-compiler, C-bug, F-trait_upcasting"} |
| {"id": "rust_114010", "text": "ICE `entered unreachable code: 'expr_to_string' ensures this is a string lit` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_114017", "text": "ICE compiling `burn-import` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, A-incr-comp, C-bug"} |
| {"id": "rust_114030", "text": "Diagnostics for `-D` flags make it slightly harder to allow vs. `#![deny(...)]` | When using `-D` command-line flags to deny some lints, the compiler emits diagnostics that are slightly harder to allow, compared to a denied lint via `#![deny(...)]`. Compare the following cases: ```sh echo \"struct S;\" | rustc --crate-type=lib - echo \"#![deny(dead_code)]\\nstruct | labels: A-lints, A-diagnostics, T-compiler, D-papercut"} |
| {"id": "rust_114031", "text": "ICE compiling `packed_simd_2@0.3.8` (M1 mac, nightly-2023-07-11) | # ICE compiling `packed_simd_2@0.3.8` on M1 mac with nightly-2023-07-11 ``` error: internal compiler error: /rustc/8ca44ef9caa4049d584fbbce218c219cdca33a2f/compiler/rustc_codegen_ssa/src/mir/constant.rs:70:22: Ty( Const { ty: [u32; 16], kind: Branch([Leaf(0x00000000), Leaf(0x0000 | labels: I-ICE, T-compiler, S-waiting-on-author, C-bug"} |
| {"id": "rust_114035", "text": "Cannot upcast `dyn Trait` in a way that reduces the number of associated types | I tried this code: ```rust #![feature(trait_upcasting)] trait A: B { type Assoc; } trait B {} fn upcast(a: &dyn A<Assoc = i32>) -> &dyn B { a } fn main() {} ``` I expected to see it compile. Instead, this happened: ``` error[E0308]: mismatched types --> src/main.rs:9:47 | 9 | fn | labels: C-bug, F-trait_upcasting, T-types"} |
| {"id": "rust_114037", "text": "memory consumption unpredictible | when compiling software like cosmic-epoch: https://github.com/pop-os/cosmic-epoch on a laptop with 8GB and default settings, rust toolchain fails when linking the binaries, as no memory is left. there is an option to only use 1 of the 4 cores, but this is a setting for both, comp | labels: A-linkage, C-feature-request, I-compilemem"} |
| {"id": "rust_114039", "text": "Rustdoc JSON includes unexpected items from `core` and `alloc` | Generated rustdoc JSON for every one of dozens of crates I've looked at seems to contain unexpected inlined items that look like an `impl str` block and its contents. I expected to see this happen: rustdoc JSON file contains only the items defined or re-exported by the correspond | labels: T-rustdoc, C-bug, A-rustdoc-json |
| idrust_114040textTracking Issue for `coinductive_overlap_in_coherence` lint | This is the summary issue for the `coinductive_overlap_in_coherence` future-compatibility warning. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you | labels: C-tracking-issue |
| idrust_114045textthread 'rustc' panicked at 'assertion failed: pos.get() <= self.position()', compiler/rustc_metadata/src/rmeta/encoder.rs:441:9 | From this GH Action run: https://github.com/andrewdavidmackenzie/flow/actions/runs/5647511277/job/15297765273 Log: ``` 2023-07-24 17:19:18 [INFO] (mdbook::book): Book building has started 2023-07-24 17:19:18 [INFO] (mdbook::book): Running the html backend 2023-07-24 17:20:17 [INF | labels: I-ICE, T-compiler, C-bug |
| idrust_114049textrustc panics on Vec::sort_by on type without PartialOrd | ### Code ```Rust // NOTE: Adding the PartialOrd derive compiles. Without it the compiler panics. //#[derive(PartialEq, PartialOrd)] pub struct MyStruct { pub x: f64, } fn main() { let mut v: Vec<MyStruct> = vec![]; v.sort_by(|a, b| a.partial_cmp(b).unwrap()); } ``` ### Meta `rust | labels: I-ICE, T-compiler, C-bug |
| idrust_114057textTrait's types could not be determined | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, C-bug, fixed-by-next-solver"} |
| {"id": "rust_114061", "text": "coherence incorrectly considers `unnormalizable_projection: Trait` to not hold even if it could | ```rust // crate dep trait IsUnit {} impl IsUnit for () {} pub trait WithAssoc<'a> { type Assoc; } // The two impls of `Trait` overlap pub trait Trait {} impl<T> Trait for T where T: 'static, for<'a> T: WithAssoc<'a>, for<'a> <T as WithAssoc<'a>>::Assoc: IsUnit, { } impl<T> Trait | labels: A-associated-items, P-high, I-unsound, C-bug, T-types, A-coherence"} |
| {"id": "rust_114064", "text": "Trivial wrapper Generators waste space relative to wrapped Generators | I'm unclear if this is properly a bug or feature request - it's a missed optimization opportunity that IMO should be guaranteed. I tried this code: (playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021) ```rust #![feature(generators)] #![feature(generat"} |
| {"id": "rust_114077", "text": "rustc stable panicked at 'forcing query with already existing `DepNode` | ### Code I ran `cargo build` from the repo root of this commit: https://github.com/jet-lab/lookup-table-registry/commit/bc516d45fc6c868cf634d3fc5ee61ea180fea08a The following changes were applied to my working copy. Without these changes, there is no panic. ```Rust diff --git a/l | labels: I-ICE, T-compiler, C-bug |
| idrust_114100text1.72.0 crater runs | Note: Please do not conduct triage on these runs without discussing how to do so with a release team member first. Thanks! | labels: S-waiting-on-review, T-release |
| idrust_114112textType specifiers with generic args in certain positions should generate errors that reference the turbofish | ### Code ```Rust I'm having trouble creating a concise example, but perhaps the error below is enough. If the error at least mentioned turbofish it'd have saved a bunch of heartache for a noob. ``` ### Current output ```Shell error: expected one of `)`, `,`, `@`, or `|`, found `< | labels: A-diagnostics, A-parser, E-mentor, T-compiler, D-papercut, D-newcomer-roadblock |
| idrust_114113textCannot upcast to supertrait which has generic arg that needs normalization | I tried this code: ```rust #![feature(trait_upcasting)] trait Mirror { type Assoc; } impl<T> Mirror for T { type Assoc = T; } trait Bar<T> {} trait Foo<T>: Bar<<T as Mirror>::Assoc> {} fn upcast<T>(x: &dyn Foo<T>) -> &dyn Bar<T> { x } fn main() {} ``` I expected to see it compile | labels: C-bug, F-trait_upcasting, T-types, fixed-by-next-solver |
| idrust_114121textICE: `compiler/rustc_const_eval/src/util/compare_types.rs` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_114125textSuggest `by_ref` when taking a reference to an iterator after applying an adaptor | ### Code ```Rust fn main() { let mut iter = vec![1, 2, 3, 4, -1, 5, 6, 7, 8].into_iter(); let _ = iter.take_while(|x| *x > 0).collect::<Vec<_>>(); assert_eq!(iter.next(), Some(5)); } ``` ### Current output ```Shell error[E0382]: borrow of moved value: `iter` --> src/main.rs:4:16 | labels: A-diagnostics, A-borrow-checker, T-compiler |
| idrust_114127textIncompatible ASan runtimes when Rust executable links with C shared library that dynamic links asan runtime | Issues: 1. Address sanitized Rust program can compile, but fails to run, when it links a shared library that dynamic links to `libasan.so`, which is provided by gcc 7.5 2. The error message is ``` ==82818==Your application is linked against incompatible ASan runtimes. ``` 3. It c | labels: T-compiler, A-sanitizers |
| idrust_114131text`suggest_call_as_method` in HIR type check hints incorrect code when dealing with macros | ### Code ```Rust fn main() { let hello = len(vec![]); } ``` ### Current output ```Shell error[E0425]: cannot find function `len` in this scope --> src/main.rs:2:17 | 2 | let hello = len(vec![]); | ^^^ not found in this scope | help: use the `.` operator to call the method `len` o | labels: A-diagnostics, T-compiler |
| idrust_114137textrust-lldb encounters an error displaying local variables | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I've loaded a (test) binary into `rust-lldb` via: ``` $ rust-lldb target/debug/deps/<mylib>-<hash> ``` then I stepped thro | labels: A-debuginfo, C-bug, WG-debugging, S-needs-repro"} |
| {"id": "rust_114142", "text": "async fn trait's method's future does not implement Send trait bound | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(async_fn_in_trait)] #![feature(return_type_notation)] trait Service<Request> { type | labels: C-bug, requires-nightly, F-async_fn_in_trait, T-types"} |
| {"id": "rust_114145", "text": "GAT + RPTIT + Refined lifetimes = ICE | <!-- 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-patterns/ --> ### Code | labels: I-ICE, C-bug, T-types, F-return_position_impl_trait_in_trait"} |
| {"id": "rust_114149", "text": "`read_dir` has unexpected behavior for `\"\"` | `Path::parent` returns `Some(\"\")` for relative paths like `foo.txt`, but `read_dir` throws an error when given `\"\"`, so code like `if let Some(parent) = path.parent() { std::fs::read_dir(parent) }` fails for files in the working directory. Additionally, calling `read_dir` on a re | labels: T-libs-api, finished-final-comment-period, disposition-close, A-io"} |
| {"id": "rust_114151", "text": "ICE: `const evaluatable failed for non-unevaluated const` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-const-eval, requires-nightly, F-generic_const_exprs"} |
| {"id": "rust_114153", "text": "Use of RiscV \"+forced-atomics\" target feature triggers hard-float ABI for symbols.o | When building for RiscV-32, adding the \"+forced-atomics\" target feature (in this case, adding it to a custom target .json file) causes the symbols.o file to be built with the single-float ABI rather than the soft-float ABI used for the all .rcgu.o files, which causes the link to | labels: T-compiler, C-bug, O-riscv, A-target-feature"} |
| {"id": "rust_114160", "text": "ICE: CFI: failed to normalize | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, A-sanitizers, C-bug, requires-nightly, -Zvalidate-mir"} |
| {"id": "rust_114167", "text": "Does I/O safety forbid `dup`ing arbitrary file descriptors? | I/O safety is [summarized as](https://rust-lang.github.io/rfcs/3128-io-safety.html) > a guarantee that if one part of a program holds a raw handle privately, other parts cannot access it I would argue then that if a function is written `foo(fd: OwnedFd)`, then it should be guaran | labels: T-lang, T-libs-api, A-io"} |
| {"id": "rust_114179", "text": "ice: `assertion failed: promoted.is_none() || Q::ALLOW_PROMOTED'` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly |
| idrust_114180textNonsensical suggestion on closure param type error | ### Code ```Rust // Minimal reproduction -- works on rust playground as of 7/28/23 fn main() { let mut v = vec![(1,)]; let compare = |(a,), (e,)| todo!(); v.sort_by(compare); } ``` ### Current output ```Shell Compiling playground v0.0.1 (/playground) error[E0631]: type mismatch i | labels: A-diagnostics, T-compiler, C-bug, D-invalid-suggestion |
| idrust_114185textICE: `failed to get layout for .. ` with mir-opt-level=3, polymorphisation and strict init checks | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, -Zpolymorphize |
| idrust_114187textcfi: llvm error: `inlinable function call in a function with debug info must have a !dbg location` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-crash, T-compiler, C-bug, requires-nightly, PG-exploit-mitigations |
| idrust_114188textcfi: llvm error: `!dbg attachment points at wrong subprogram for function` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: `rustc -Zsanitizer=cfi -Clto --edition=2021 -Cdebuginfo=2 -Copt-level=2 treereduce.out` ```rust trait r | labels: I-crash, C-bug, requires-nightly, PG-exploit-mitigations |
| idrust_114192textgeneric const items: polymorphically recursive consts lead to compiler stack overflow | I expected the following code to lead to an error (overflow, const eval, or cycle): ```rs #![feature(generic_const_items)] const RECUR<T>: () = RECUR::<(T,)>; fn main() {} ``` Instead, the memory & CPU usage of the compiler quickly grew until the OOM killer terminated the process | labels: I-crash, T-compiler, C-bug, S-bug-has-test, F-generic_const_items |
| idrust_114212textcompiler crash caused by using feature(generic_const_exprs) | This a minimized code that causes the compiler to crash. While the example itself doesn't need the ```generic_const_exprs``` feature, the original library uses it and even compiles, but a binary that depends on the library and itself does not include ```generic_const_exprs``` fea | labels: I-ICE, T-compiler, C-bug, F-generic_const_exprs"} |
| {"id": "rust_114213", "text": "lazy_type_alias: breaks visibility: `private type alias .. in public interface` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![allow(nonstandard_style)] #![allow(clippy::missing_safety_doc, unused)] type pid_t = i32; pu | labels: A-visibility, T-compiler, C-bug, requires-nightly, F-lazy_type_alias"} |
| {"id": "rust_114214", "text": "lazy_type_alias: error `doesn't have a size known at compile-time` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: `src/tools/miri/tests/pass/issues/issue-36278-prefix-nesting.rs` ```rust // Issue 36278: On an unsized | labels: T-compiler, C-bug, E-needs-mcve, requires-nightly, F-lazy_type_alias |
| idrust_114215textInconsistent behavior across platform of split-debuginfo | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Setting up a release profile with stripped binaries and split debuginfo is made very complicated due to subtle differences | labels: O-windows, O-linux, O-macos, A-debuginfo, T-compiler, C-bug |
| idrust_114216textlazy_type_alias: causes error `no nominal type found for inherent implementation` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: `tests/rustdoc/deref/deref-typedef.rs` ```rust #![crate_name = \] // @has 'foo/struct.Bar.html' // | labels: T-compiler, C-bug, requires-nightly, F-lazy_type_alias |
| idrust_114219texterror about `async move { ` block could suggest using later edition in edition 2015 | ### Code with edition 2015: ```rust error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found keyword `move` --> g.rs:4:11 | 4 | async move {}(); | ^^^^ expected one of 8 possible tokens error: aborting due to previous error ```` with edition 2018: ```` err | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-papercut, D-newcomer-roadblock |
| idrust_114220textlazy_type_alias: `return type references an anonymous lifetime, which is not constrained by the fn input types` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: `tests/ui/late-bound-lifetimes/late_bound_through_alias.rs` ```rust #![feature(lazy_type_alias)] // che | labels: A-lifetimes, T-compiler, C-bug, requires-nightly, F-lazy_type_alias |
| idrust_114221textlazy_type_alias causes lifetime error | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: `tests/ui/regions/regions-scope-chain-example.rs` ```rust // run-pass #![allow(dead_code)] #![allow(unu | labels: T-compiler, C-bug, requires-nightly, A-variance, S-has-mcve, F-lazy_type_alias |
| idrust_114252textSTATUS_ACCESS_VIOLATION during cargo install | ### Problem Running `cargo install --locked tokio-console` I get the error `exit code: 0xc0000005, STATUS_ACCESS_VIOLATION`. In the log below the error was produced during building `clap_complete`, but when running the command repeatedly different libraries produce the error. ### | labels: I-crash, C-defective-hardware |
| idrust_114232textThe speed is unstable when using `powi()` with `for` loop. Is this a compiler optimization problem? | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![allow(warnings)] use std::time::Instant; fn product_powers(p: f64, T: f64) -> f64 { const IJ |
| idrust_114233textCI: use `--filter=tree:0` for git clone of repos in CI? | I was working on clippy ci and came across https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ which sped up the clone noticeably. Maybe we could use `--filter=tree:0` in bootstrap on ci? Some numbers on my local machine (~7 mbs download) `git clo | labels: T-infra, A-CI |
| idrust_114235text`format argument must be a string literal` could suggest inline args | ### Code ```Rust let stderr = 3; eprintln!({stderr}) ``` ### Current output ```Shell | 4 | eprintln!({stderr}) | ^^^^^^^^ | help: you might be missing a string literal to format with | 4 | eprintln!(\, {stderr}) | +++++ ``` ### Desired output ```Shell | 4 | eprintln!({stderr}) | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics |
| idrust_114245text`x.py fmt` counts untracked files as formatted? | `x.py fmt` ```` Building bootstrap Finished dev [unoptimized] target(s) in 0.03s skip untracked path CFI/ during rustfmt invocations skip untracked path builtin-if-attr during rustfmt invocations skip untracked path empty_loop_no_std.empty_loop_no_std.55ad194a3f0b8c5c-cgu.0.rcgu. | labels: T-bootstrap, C-bug |
| idrust_114271textfeat: double dot operator in if statement | rust offers the possibility to match only certain elements of a struct, using .. pattern: ```rust match event { Event::Keyboard(keyboard::Event::KeyPressed { key_code: keyboard::KeyCode::Escape, .. }) => { }, _ => { } } ``` but this don't work in if statement: ```rust if event == | labels: C-feature-request"} |
| {"id": "rust_114274", "text": "ICE: `couldn't find DefId(..) in the HIR map` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-return_position_impl_trait_in_trait |
| idrust_114275textICE: cfi: `None` with `extern \ fn .. -> #[repr(transparent)` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, PG-exploit-mitigations |
| idrust_114281texttype keyword no generics example | ### Location https://doc.rust-lang.org/stable/std/keyword.type.html ### Summary The docs don't provide an example of a type with a generic, for example: ```rust type ArcMutex<T> = Arc<Mutex<T>>; ``` While it is fairly obvious, I think it'd be nice to have it documented. | labels: A-docs |
| idrust_114285textICE: `Region parameter out of range when substituting in region` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> While com | labels: I-ICE, T-compiler, C-bug |
| idrust_114289textresolve failed for macro-2.0 | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(decl_macro)] macro_rules! m { ($i:ident) => { mod $i { pub struct A; } } } m!(x); fn | labels: T-compiler, A-decl-macros-2-0, C-bug, F-decl_macro |
| idrust_114290textICE with rustdoc at collect_intra_doc_links.rs: panicked at 'no resolution for \"num_integer\" MacroNS' | ### Code Caused by trying to document curv-kzen crate. Older version of the crate (I also use 0.2.7) doesn't panic. Neither did it panic with rustc version 1.69. ```toml [package] name = \"kzens\" version = \"0.1.0\" edition = \"2021\" [dependencies] curv-v09 = { package = \"curv-kzen\", | labels: T-rustdoc, I-ICE, A-macros, C-bug, A-intra-doc-links"} |
| {"id": "rust_114291", "text": "stage 0 miri tests are broken | `./x.py test --stage 0 miri` used to work, but now it is broken. Every single test fails saying \"can't find crate for `std`\} |
| {: , : } |
| {: , : } |
| {: , : Value of a is: {}\} |
| {: , : C\} |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : mov rax, rcx\lock cmpxchg [{save}],{new}\mov rcx, rax\rcx\aaa == {expect |
| idrust_114361textcannot compile `serde_traitobject` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: Pull the code from master branch of https://github.com/alecmocatta/serde_traitobject ```rust none ``` I | labels: C-bug |
| idrust_114369textCan't reference function-scoped type from function-scoped module | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() { enum Outer { A, B, } mod inner { #[allow(unused_imports)] use super::*; // I was ho | labels: C-bug"} |
| {"id": "rust_114374", "text": "borrow error gives unhelpful let binding suggestion | ### Code ```Rust fn bar<'a>(_: std::fmt::Arguments<'a>) { } fn main() { let foo = format_args!(\"{}\", \"hi\"); bar(foo); } ``` ### Current output ```Shell error[E0716]: temporary value dropped while borrowed --> src/main.rs:6:15 | 6 | let foo = format_args!(\"{}\", \"hi\"); | ^^^^^^^^^^ | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_114375", "text": "ICE: broken mir while building rustc | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-type_alias_impl_trait, requires-nightly, P-critical"} |
| {"id": "rust_114381", "text": "return_type_notation vs return_position_impl_trait_in_trait marking return type Send on functions with arguments does not compile | **Issue** I understand that async traits MVP is supposed to get stabilized in 2023 and I have looked at a couple of current recommendations specifically on how to deal with marking return type of Future as Send for spanned tasks within generic functions. I understand that both of | labels: requires-nightly, F-return_type_notation"} |
| {"id": "rust_114388", "text": "Wrong caller location for overloaded index operator | <!-- 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-patterns/ --> ### Code | labels: A-diagnostics, T-compiler, C-bug"} |
| {"id": "rust_114389", "text": "Associated type constraints on super traits allowing for unsound transmutation to trait objects | This code allows for unsound transmutation to trait objects of trait with impossible constraints. ```rust trait TypeEq { type This: ?Sized; } impl<T: ?Sized> TypeEq for T { type This = T; } fn identity<T: ?Sized>(t: &<T as TypeEq>::This) -> &T { t // T::This is deduced to be T } | labels: A-associated-items, T-compiler, I-unsound, C-bug, A-coercions, T-types"} |
| {"id": "rust_114392", "text": "Bad span for ? removal suggestion in parentheses | ### Code ```Rust fn foo() -> Option<()> { let x = Some(()); (x?) } ``` ### Current output ```Shell warning: unnecessary parentheses around block return value --> src/lib.rs:3:5 | 3 | (x?) | ^ ^ | = note: `#[warn(unused_parens)]` on by default help: remove these parentheses | 3 - | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-invalid-suggestion"} |
| {"id": "rust_114398", "text": "Apparent miscompilation in a benchmark | I encountered this (run `cargo bench`): https://github.com/AaronKutch/triple_arena/tree/miscompile . An iterator in a loop that should only last 8 iterations wraps around to 0, additionally dragging an unrelated variable along with it that should only be counting up. I originally | labels: T-compiler, C-bug, E-needs-mcve"} |
| {"id": "rust_114401", "text": "Cleanup: Place::is_indirect vs Place::has_deref | Since https://github.com/rust-lang/rust/pull/97077 we have these two methods `is_indirect` and `has_deref` that are documented as doing the exact same thing, but don't even mention each other in the documentation. Calling the wrong one can either lead to slow code or to subtle bu | labels: C-cleanup, T-compiler, A-MIR |
| idrust_114405textRegression in checking for unneccessary mutable references | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code Checking the [ | labels: regression-from-stable-to-nightly, C-bug, T-clippy |
| idrust_114411textstrip = \ doesn't work when cross-compiling from linux to macOS | Currently, when compiling for macOS with `-C strip=symbols`, rustc will try to invoke `strip` on the output binary to remove its symbols. This, unfortunately, fails when cross-compiling from linux, as the `strip` binary on linux only understands ELF files and will choke on the ma | labels: A-linkage, O-macos, A-cross, T-compiler, C-bug"} |
| {"id": "rust_114416", "text": "Regression when using `#[expect(unused)]` more than once in an impl block | At some point between `rustc` `nightly-2023-03-05` (works) and `nightly-2023-07-01` (does not work) the following stopped compiling: ```rust #![deny(warnings)] struct X; impl X { #[expect(unused)] fn unused(); // This is failing with `warning: this lint expectation is unfulfilled | labels: A-lints, T-compiler, C-bug, F-lint_reasons"} |
| {"id": "rust_114423", "text": "ICE: None in `compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs` | <!-- 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-patterns/ --> ### Code | labels: E-easy, I-ICE, E-mentor, T-compiler, C-bug"} |
| {"id": "rust_114425", "text": "Failed to normalize ... maybe try to call `try_normalize_erasing_regions` instead | * https://crater-reports.s3.amazonaws.com/beta-1.72-2/beta-2023-07-23/reg/abi_stable-0.11.2/log.txt ``` [INFO] [stdout] error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize unsafe extern \"C\" fn(sabi_types::rref::RRe | labels: T-compiler, regression-from-stable-to-beta"} |
| {"id": "rust_114426", "text": "mismatched types: TypeId size changes | * https://crater-reports.s3.amazonaws.com/beta-1.72-2/beta-2023-07-23/reg/febug-0.2.1/log.txt * https://crater-reports.s3.amazonaws.com/beta-1.72-2/beta-2023-07-23/reg/anymap-1.0.0-beta.2/log.txt * https://crater-reports.s3.amazonaws.com/beta-1.72-2/beta-2023-07-23/reg/anymap2-0. | labels: T-libs-api, regression-from-stable-to-beta"} |
| {"id": "rust_114432", "text": "Confusing sentence about errors in `fs::read` | ### Location `fs::read`'s errors section ### Summary It holds this hard to follow sentence: \ [fs::read](https://doc.rust-lang.org/std/fs/fn.read.html) | labels: A-docs, T-libs, Libs-Small |
| idrust_114433textfalse positive `unused-qualifications` | ### Code ```Rust #![warn(unused_qualifications)] fn bar3() { match Option::<Option<()>>::None { /* help: remove the unnecessary path segments | 4 - match Option::<Option<()>>::None { 4 + match None { | */ Some(v) => {} None => {} } } fn main() {} ``` ### Current output ```Shell w | labels: A-diagnostics, T-compiler, D-invalid-suggestion |
| idrust_114435textICE: `failed to get layout for `{type error}`: ReferencesError(ErrorGuaranteed(()))` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: E-easy, I-ICE, T-compiler, C-bug |
| idrust_114437textBroken MIR in DropGlue when compiling anyhow with -Zvalidate-mir | `cargo bisect-rustc` says this but I'm not sure I believe it: Regression in https://github.com/rust-lang-ci/rust/commit/cda7b6d23b278697bf0cb457e00d594dd4a8a33b searched nightlies: from nightly-2023-07-01 to nightly-2023-08-02 regressed nightly: nightly-2023-08-01 searched commit | labels: I-ICE, T-compiler, C-bug, E-needs-mcve"} |
| {"id": "rust_114441", "text": "Tracking Issue for `cstr_count_bytes` | Feature gate: `#![feature(cstr_count_bytes)]` This is a tracking issue for adding a `.count_bytes()` method to `CStr`. ### Public API ```rust impl CStr { pub fn count_bytes(&self) -> usize; } ``` ### Steps / History - [x] ACP: https://github.com/rust-lang/libs-team/issues/256 - [ | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period"} |
| {"id": "rust_114442", "text": "Extend useless_ptr_null_checks to more functions | Filing an issue as #113657 has been merged and we now warn on a bunch of functions/casts that return raw pointers that will never be null. The standard library contains a larger set than the specified one though, as [pointed out in this comment on the PR](https://github.com/rust- | labels: A-lints, T-compiler"} |
| {"id": "rust_114444", "text": "Cannot build Rust 1.71.1 with 1.71.0 | Apparently Rust 1.71.0 added a check that only allows it to be built with the exact same version of Rust, or a Rust that's one minor release older. However, this also makes it impossible to build Rust 1.71.1 with a Rust that's one micro release older (1.71.0). ``` Unexpected rust | labels: T-bootstrap, C-bug, P-critical"} |
| {"id": "rust_114445", "text": "How to link dylib files? | #[link(name = \"Mylib\" )] works on the Windows, but Mac failed🚬 I try code in build.rs ``` let manifest_dir = std::env::var(\"CARGO_MANIFEST_DIR\").unwrap(); println!(\"cargo:rustc-link-search=native={}\", manifest_dir.display()); println!(\"cargo:rustc-link-lib=Mylib\"); but also not w | labels: A-linkage, O-macos, T-compiler"} |
| {"id": "rust_114447", "text": "Disallow *references* to `static mut` [Edition Idea] | Now that we have `ptr::addr_of_mut!`, the 2024 edition would be a great time to do @RalfJung's idea from https://github.com/rust-lang/rust/issues/53639#issuecomment-415487264: **Disallow `&MY_STATIC_MUT` and `&mut MY_STATIC_MUT` entirely.** `ptr::addr_of_mut!(MY_STATIC_MUT)` coul | labels: T-lang, E-help-wanted, E-medium, A-maybe-future-edition, A-edition-2024 |
| idrust_114456textICE: `lazy_type_alias`: `cannot relate consts of different types` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-adt_const_params, S-bug-has-test |
| idrust_114458textICE: broken mir with `-Zprint-mono-items=eager` between passes `RemoveStorageMarkers` and `Inline` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly |
| idrust_114460text`std::process::Command` Terminal execution command never returns? | Creating an OCI Bundle ```shell # create the top most bundle directory mkdir /mycontainer cd /mycontainer # create the rootfs directory mkdir rootfs # export busybox via Docker into the rootfs directory docker export $(docker create busybox) | tar -C rootfs -xvf - ``` I tried thi | labels: C-bug |
| idrust_114463textICE caused by using feature(generic_const_exprs) | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly |
| idrust_114464textICE caused by using feature(generic_const_exprs):`compiler/rustc_borrowck/src/universal_regions.rs:880:36` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, E-needs-test, T-compiler, C-bug, A-const-generics, requires-nightly |
| idrust_114468textICE: lazy type alias: IOOB `compiler/rustc_hir_analysis/src/variance/constraints.rs` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-lazy_type_alias |
| idrust_114471text`invalid_nan_comparisons` suggests invalid `5f32.is_nan()` in const context | ### Code ```Rust fn main() { const TEST: bool = 5f32 == f32::NAN; } ``` ### Current output ```Shell warning: constant `TEST` is never used --> src/main.rs:2:11 | 2 | const TEST: bool = 5f32 == f32::NAN; | ^^^^ | = note: `#[warn(dead_code)]` on by default warning: incorrect NaN co | labels: A-diagnostics, T-compiler, D-invalid-suggestion |
| idrust_114473textsegmentation fault in risc-v code | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> see https://github.com/MaxHearnden/rust-bug for accompanying files The function tokio::runtime::scheduler::multi_thread::p | labels: A-LLVM, I-unsound, C-bug, O-riscv |
| idrust_114478textICE: `Should not be resolving bound region.` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-type_alias_impl_trait, requires-nightly, requires-debug-assertions |
| idrust_114484textCompiler panic on recursion limit finding the struct tail | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, S-bug-has-test |
| idrust_114488textReferencePropagation exposed a latent miscompile, found in the wild with regex | Better reproducer here: https://github.com/rust-lang/rust/issues/114488#issuecomment-1678292299 --- I do not have proof that this isn't UB in `regex` but considering how much we have run that crate in Miri I think it is much more likely that this is a miscompilation of some kind. | labels: A-debuginfo, A-codegen, regression-from-stable-to-nightly, T-compiler, I-unsound, C-bug"} |
| {"id": "rust_114493", "text": "Option and_then documentation clarity | https://github.com/rust-lang/rust/blob/e173a8e6634d787a1529ff6ec5dc63273425ca34/library/core/src/option.rs#L1381C8-L1381C8 Hi, I have a concern about the documentation here. It says that other languages call and_then a flat map operation. However, some searching has led me to thi | labels: A-docs, T-libs"} |
| {"id": "rust_114508", "text": "RISC-V Codegen Problem with type information | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Codegen for `riscv64gc-unknown-linux-gnu` sends wrong type information to LLVM. When I compile on godbolt.org with the fol | labels: A-LLVM, A-codegen, T-compiler, C-bug, O-riscv"} |
| {"id": "rust_114522", "text": "Full paths in type-based search don't work | While searching [`vec -> usize`] works, [`vec::vec -> usize`] doesn't. [`vec -> usize`]: https://doc.rust-lang.org/1.71.1/std/?search=vec%20-%3E%20usize [`vec::vec -> usize`]: https://doc.rust-lang.org/1.71.1/std/?search=vec%3A%3Avec%20-%3E%20usize | labels: T-rustdoc, C-enhancement, A-type-based-search, A-rustdoc-search"} |
| {"id": "rust_114527", "text": "Unused parameter error occurs for an actually used type parameter. | Original discussion: [*Why does some code with type parameters used only in trait bounds compile without PhantomData? - Stack Overflow*](https://stackoverflow.com/questions/76840309/why-does-some-code-with-type-parameters-used-only-in-trait-bounds-compile-withou) This code doesn' | labels: T-compiler, C-bug |
| idrust_114529textICE: const eval: `expected type differs from actual type.` `()` vs `i32` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-const-eval |
| idrust_114530textError((( | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, E-needs-mcve |
| idrust_114540textCompiler error after struct move | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, S-needs-repro |
| idrust_114555textTypo in RefCell's section (immutable -> mutable) | ### Location https://doc.rust-lang.org/std/cell/index.html#refcellt An immutable reference to a ``RefCell``’s inner value (``&T``) can be obtained with borrow, and a mutable borrow (``&mut T``) can be obtained with ``borrow_mut``. When these functions are called, they first verif | labels: A-docs"} |
| {"id": "rust_114557", "text": "`#[expect(dead_code)]` does not behave identically to `#[allow(dead_code)]` | In its [RFC](https://rust-lang.github.io/rfcs/2383-lint-reasons.html#expect-lint-attribute), the [`#[expect(...)]` lint attribute](https://github.com/rust-lang/rust/issues/54503) is said to function identically to `#[allow(...)]`. However, when trying out the attribute in the ker | labels: T-compiler, C-bug, F-lint_reasons"} |
| {"id": "rust_114572", "text": "Incorrect lifetime bound check in async + impl_trait_in_assoc_type | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(type_alias_impl_trait)] #![feature(impl_trait_in_assoc_type)] use std::{fmt::Display | labels: C-bug, F-type_alias_impl_trait, WG-async, F-impl_trait_in_assoc_type"} |
| {"id": "rust_114575", "text": "Incremental compilation error | I'm getting this bug since a couple of weeks that keeps coming up, forcing me to always cargo clean and/or `rm -rf target/`. Code is here: https://github.com/radicle-dev/heartwood ### Meta `rustc --version --verbose`: ``` rustc 1.70.0 (90c541806 2023-05-31) binary: rustc commit-h | labels: I-ICE, T-compiler, C-bug |
| idrust_114577textICE caused by calling partial_cmp on type which doesn't implement it | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_114579", "text": "Crate cloud-storage does not compile on nightly-2023-07-27 | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> Got compilation error w | labels: A-impl-trait, C-bug, regression-untriaged, T-types"} |
| {"id": "rust_114580", "text": "Cast from f32 to f64 isn't flawless | I tried this code: ```rust fn main() { println!(\, 0.1_f32, 0.1_f64, 0.1_f32 as f64); } ``` I expected to see this happen: Output `0.1 0.1 0.1` Instead, this happened: Output `0.1 0.1 0.10000000149011612` ### Meta Here's a playground for this issue: https://play.rust-lan | labels: C-bug"} |
| {"id": "rust_114582", "text": "Non-temporal stores (and _mm_stream operations in stdarch) break our memory model | I recently discovered [this funny little intrinsic](https://doc.rust-lang.org/nightly/std/intrinsics/fn.nontemporal_store.html) with the great comment > Emits a !nontemporal store according to LLVM (see their docs). Probably will never become stable. Unfortunately, the comment is | labels: O-x86_64, P-medium, T-lang, I-unsound, T-opsem, O-x86_32"} |
| {"id": "rust_114583", "text": "`OsString` `Debug` implementation prints escaped single quotes | ```rust fn main() { let string = \"'\{:?}\{:?}\\\\\\\\\} |
| {: , : compiler serde\} |
| {: , : `ExitCode`\exit status\`ExitStatus`\wait status\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : 1\11111\{:?}\} |
| {: , : {:p}\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : previous use here\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Guess the number!\Please, input your guess \failed to read line :(\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : 1456\image\https://github.com/rust-lang/rust/assets/5070879/5bade25b-75f9-40b2-a990-7c383b376418\1391\image\} |
| {: , : } |
| {: , : 1468\image\https://github.com/rust-lang/rust/assets/5070879/ead70921-3ebd-41dd-a78e-7aa50ed0283f\} |
| {: , : Hello World\} |
| {: , : unresolved imports `std::any::Demand`, `std::any::Provider`\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : -flto,\-flto=thin\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : drop\} |
| {: , : 拒绝访问\} |
| {: , : } |
| {: , : a\it works! | labels: C-bug, T-libs, O-neutrino |
| idrust_114984textError: internal compiler error: TyKind::Error constructed but no error reported | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(inherent_associated_types)] #![allow(incomplete_features)] struct Foo<T>(T); impl<'a | labels: I-ICE, T-compiler, C-bug, F-inherent_associated_types, I-cycle"} |
| {"id": "rust_114994", "text": "Function pointer signature containing `&mut T` should work in const context | Proposing to extract this from #57349. The following examples shouldn't error: ```rust const fn get_some_fn() -> fn(&mut String) { String::clear } const fn use_const_fn(_f: fn(&mut String)) { () } const fn some_const_fn() { let _f: fn(&mut String) = String::clear; } // mutable re | labels: C-bug, A-const-eval |
| idrust_114995textAdd information about cargo-pgo to the Profile-Guided Optimization documentation | ### Location https://doc.rust-lang.org/rustc/profile-guided-optimization.html ### Summary I think would be nice to mention [cargo-pgo](https://github.com/Kobzol/cargo-pgo) in the Rustc Profile-Guided Optimization documentation. With `cargo-pgo` it's much easier to apply PGO to th | labels: A-docs"} |
| {"id": "rust_114997", "text": "Unclear cause for a `type annotations needed` error | ### Code ```Rust fn f(s: &str, v: &[String]) { if let Ok(idx) = s.parse() { if let Some(val) = v.get(idx) { let val: String = val.clone(); } } } ``` ### Current output ```Shell error[E0282]: type annotations needed --> src/lib.rs:4:35 | 4 | let val: String = val.clone(); | ^^^^^ | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_115013", "text": "non-defining opaque type use: bogus \"generic lifetime used twice\" | I expect this to compile: ```rust #![feature(type_alias_impl_trait)] type Opaque<'lt> = impl Sized + 'lt; fn test<'a>( arg: impl Iterator<Item = &'a u8>, ) -> impl Iterator<Item = Opaque<'a>> { arg } ``` Instead, it is an error in 1.73.0-nightly (2023-08-16 07438b0928c6691d6ee7): | labels: T-compiler, C-bug, F-type_alias_impl_trait |
| idrust_115014text`missing_copy_implementations` shouldn't warn for unions | ### Code ```Rust #![deny(missing_copy_implementations)] #![allow(dead_code)] pub union Foo { int: i16, float: f64 } pub struct Bar { discriminant: i8, foo: Foo } ``` ### Current output ```Shell error: type could implement `Copy`; consider adding `impl Copy` --> src/lib.rs:3:1 | 3 | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_115019", "text": "ICE: debug assertions: E0191 overlapping spans | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-suggestion-diagnostics, requires-debug-assertions"} |
| {"id": "rust_115022", "text": "Stabilizing panic_immediate_abort | Forgive me if there's already a tracking issue for this, but I haven't been able to find one. I see that the build script for the precompiled serde_derive binary uses this feature (and thus a nightly toolchain), so there's clearly demand for it. How can we users help get it stabi | labels: T-libs-api, C-feature-request, T-libs, -Zfixed-x18, A-panic |
| idrust_115028textDiffering results for `std::mem::size_of` computation | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel is relevant to replicating the bug. --> I have a project that is split into two repositories: - https://github.com/hash-org/hashc (`hashc`) - https://github.co | labels: C-discussion |
| idrust_115033texterror: internal compiler error: no errors encountered even though `delay_span_bug` issued | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> can't com | labels: I-ICE, regression-from-stable-to-nightly, P-high, T-compiler, C-bug"} |
| {"id": "rust_115036", "text": "hread 'rustc' panicked at 'index out of bounds: the len is 1389811 but the index is 1826700', /rustc | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, A-incr-comp, C-bug, E-needs-mcve"} |
| {"id": "rust_115038", "text": "RefCell docs say \"immutable\" where they mean \"mutable\" | ### Location https://doc.rust-lang.org/std/cell/index.html#refcellt ### Summary The docs say \"When these functions are called, they first verify that Rust’s borrow rules will be satisfied: any number of immutable borrows are allowed or a single immutable borrow is allowed, but ne | labels: E-easy, A-docs"} |
| {"id": "rust_115040", "text": "Nightly and beta miscompilation when codegen-units = 1 | I tried [this](https://github.com/Licenser/simd-test) code: ```rust const STR: &str = r#\" [\"{\\\"arg\\\":\\\"test\\\"}\"] \"#; fn main() { let mut str_bytes = STR.to_string().into_bytes(); let mut r: Vec<String> = simd_json::from_slice(&mut str_bytes).unwrap(); let simd_string = r.pop().un | labels: C-discussion"} |
| {"id": "rust_115041", "text": "error: manifest path `/public/home/litz/mysw/rust-31032ecb1550a402a726e9c244f6a716b214cc9d/src/tools/cargo/Cargo.toml` does not exist | here are what I have done to install rust from source, and I am new in rust. can someone offer me some help about this error and give me detailed instruction on how to install rust from source correctly? 1. I download the zip file to /public/home/litz/mysw 2. unzip the zip file i | labels: T-bootstrap"} |
| {"id": "rust_115042", "text": "Update the examples for E0191 | ### Location https://doc.rust-lang.org/error_codes/E0191.html > Trait objects need to have all associated types specified. Please verify that all associated types of the trait were specified and the correct trait was used. Example: > ```rust > trait Trait { > type Bar; > } > > ty | labels: A-docs"} |
| {"id": "rust_115043", "text": "#![feature(bench_black_box)] doesn't work? | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(bench_black_box)] fn main() { let x = obfstr::obfstr!(\); println!(\); } `` | labels: C-bug |
| idrust_115047textTable broken in description of target `aarch64-unknown-teeos` | ### Location The rustc book > 6. Platform support > 6.16. aarch64-unknown-teeos https://doc.rust-lang.org/nightly/rustc/platform-support/aarch64-unknown-teeos.html https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/aarch64-unknown-teeos.md ### Summar | labels: A-docs |
| idrust_115051textICE 1.73 nightly | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, E-needs-test, regression-from-stable-to-nightly, T-compiler, C-bug |
| idrust_115052textinternal compiler error: compiler/rustc_monomorphize/src/collector.rs:1038:9: no MIR available for DefId | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, S-has-mcve |
| idrust_115060textAdd a rustdoc commandline parameter to disable generation of source code pages | Kind of related to https://github.com/rust-lang/rust/issues/67804 and the [`html_no_source`](https://doc.rust-lang.org/nightly/rustdoc/write-documentation/the-doc-attribute.html#html_no_source) attribute. The behaviour would be the same as the latter but wouldn't require any sour | labels: T-rustdoc, C-feature-request, A-rustdoc-ui"} |
| {"id": "rust_115062", "text": "rustdoc collect intralinks ICE | <!-- 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-patterns/ --> ### Code | labels: T-rustdoc, I-ICE, C-bug, A-intra-doc-links"} |
| {"id": "rust_115063", "text": "platform support has sparc-unknown-none-elf on the wrong tier | https://doc.rust-lang.org/nightly/rustc/platform-support.html lists sparc-unknown-none-elf as Tier 2, but it's Tier 3 as you don't build libcore for it. My bad - no idea how I managed to put it in the wrong table. It's not even alphabetically in the right place. | labels: T-compiler, A-docs, A-targets |
| idrust_115064textICE in rustdoc `redundant_explicit_links` with non-ASCII link text | ### Code Reduced from the source code of `bumpalo 3.13.0`: ```Rust /// [`…foo`] [`…bar`] [`Err`] pub struct Broken {} ``` ### Meta <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --> `rustc --v | labels: T-rustdoc, I-ICE, C-bug"} |
| {"id": "rust_115065", "text": "Bumping rustc version in-tree causes Fuchsia builders to fail | Fuchsia's rustc builders bootstrap using betas that we also build ourselves. When `src/version` is updated (as in #115034), there's a period of time where the beta referred to by `stage0.json` is not allowed to build tip of tree. The beta given by `stage0.json` normally points to | labels: T-bootstrap, C-bug"} |
| {"id": "rust_115069", "text": "LLVM 18 breakage: `failed to get bitcode from object file` after LLVM 6b539f5eb8e | Filing this to keep track of llvm/llvm-project@6b539f5eb8ef1d3a3c87873caa2dbd5147e1adbd breaking `tests/codegen/lto-removes-invokes.rs` and `tests/codegen/sanitizer/sanitizer-recover.rs#MSAN-RECOVER-LTO`, both with the message `error: failed to get bitcode from object file for LT | labels: A-LLVM"} |
| {"id": "rust_115071", "text": "Weird f32 PartialEq behavior on 1.64 -> 1.65 | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> I am trying to upgrade | labels: C-bug"} |
| {"id": "rust_115072", "text": "#[start] maybe not behaving as expected for x86_64-unknown-none | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried to compile this code for `x86_64-unknown-none`: ```rust #![feature(start)] #![no_std] #![no_main] #[start] pub fn | labels: A-linkage, C-bug"} |
| {"id": "rust_115073", "text": "bootstrap atop nix atop non-nix (old, Linux) OS fails with inscrutable errors | After being introduced to Nix by a colleague, I have been trying to use the Nix package manager as a basis for rustc development. However, if I install Nix atop an old Linux OS distribution (or, more precisely, atop a Linux OS that has a relatively old glibc version), I hit probl | labels: T-bootstrap, C-bug"} |
| {"id": "rust_115097", "text": "rust-gdbgui shell script crashes due to improper string quoting | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```sh rust-gdbgui $my_executable ``` I expected to see this happen: gdbgui starts Instead, this happene | labels: C-bug"} |
| {"id": "rust_115099", "text": "Running doctests fails on Windows due to 'path not found' | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> When running our doctests on Windows (Version 10.0.20348.1906), I received the following panic: ``` thread 'rustc' panicke | labels: C-bug"} |
| {"id": "rust_115113", "text": "ScalarReplacementOfAggregates causes rustc to emit invalid LLVM debuginfo (and sometimes rustc segfaults) | https://rust.godbolt.org/z/9YvvvcMKj ```rust pub struct Endian; #[allow(dead_code)] pub struct EndianSlice<'input> { slice: &'input [u8], endian: Endian, } pub fn test(s: &[u8]) { let slice = EndianSlice { slice: s, endian: Endian }; } ``` Compiled with ``` --emit=llvm-ir -C debu | labels: A-debuginfo, T-compiler, regression-from-stable-to-stable, C-bug, A-mir-opt, P-critical"} |
| {"id": "rust_115116", "text": "`cargo doc` => thread 'rustc' panicks with \"byte index 2 is not a char boundary ...\" on nightly | ### Code The error only appears on nightly. steps to reproduce: ```bash cargo init # or cargo init --lib cargo add axum # this crate caused the error cargo doc ``` `rustc --version --verbose`: ``` rustc 1.74.0-nightly (ef85656a1 2023-08-21) binary: rustc commit-hash: ef85656a1065 | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_115130", "text": "x test --bless fails to run compiler-builtilns build script: \"Failed to find tool. Is `` installed?\" | Running `x test` works fine, but adding `--bless` results in: ``` $ ./x.py test --bless … error: failed to run custom build command for `compiler_builtins v0.1.100` Caused by: process didn't exit successfully: `/home/mara/rust/build/x86_64-unknown-linux-gnu/stage1-std/release/bui | labels: T-bootstrap, C-bug |
| idrust_115132textstd::fs::copy doesn't work on windows 11 | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() -> std::io::Result<()> { let current_dir = std::env::current_exe() .unwrap() .parent( | labels: C-bug"} |
| {"id": "rust_115142", "text": "Crash (SEGFAULT) when building Firefox for ARMv7 or x86 Android with 1.72 | Building Firefox for the thumbv7neon-linux-androideabi and i686-linux-android fails with a rust compiler crash: ``` /builds/worker/fetches/rustc/lib/librustc_driver-796e47691512e4e9.so(+0x3116d63)[0x7fd329284d63] /lib/x86_64-linux-gnu/libc.so.6(+0x3bf90)[0x7fd325e27f90] /builds/w | labels: C-bug"} |
| {"id": "rust_115143", "text": "ICE: NormalizationError during linting | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-high, T-compiler, regression-from-stable-to-stable, C-bug, S-has-mcve"} |
| {"id": "rust_115145", "text": "Miri ICE: InvalidProgram(ConstPropNonsense): uninhabited variant in project_downcast | Reduced example: https://github.com/rust-lang/rust/issues/115145#issuecomment-1849050889 https://github.com/axodotdev/axoasset at `10e2f44ee1bccaa5ae0dca28ee5061af04c0ae8d` ``` MIRIFLAGS=-Zmiri-disable-isolation cargo miri test it_copies_remote_assets ``` ### Error output ``` err | labels: I-ICE, P-high, T-compiler, I-unsound, C-bug, A-coroutines"} |
| {"id": "rust_115146", "text": "`cargo doc` failed on a crate dependent on `axum` | <!-- 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-patterns/ --> ### Code | labels: T-rustdoc, I-ICE, C-bug, A-intra-doc-links"} |
| {"id": "rust_115150", "text": "CFI: f32 and f64 are encoded incorrectly for cross-language CFI | I missed changing the encoding for f32 and f64 when I introduced the integer normalization option in #105452 as integer normalization does not include floating point. `f32` and `f64` should be always encoded as `f` and `d` since they are both FFI safe when their representation ar | labels: T-compiler, C-bug, requires-nightly, PG-exploit-mitigations"} |
| {"id": "rust_115156", "text": "Compiler SIGSEGV When Compiling `hartex-discord-worker` | My current attempts to compile my project, [`discord-frontend`](https://github.com/TeamHarTex/HarTex/tree/nightly/discord-frontend), fails with the `hartex-discord-worker` crate (the following output comes from [GitHub Actions CI](https://github.com/TeamHarTex/HarTex/actions/runs | labels: I-crash, A-LLVM, A-debuginfo, A-codegen, regression-from-stable-to-nightly, T-compiler"} |
| {"id": "rust_115160", "text": "Missing auto-vectorization for take+sum | LLVM cannot auto-vectorize the following code: ```rust pub fn slice_sum(s: &[u64], l: usize) -> u64 { s.iter().take(l).sum() } ``` <details> <summary>ASM</summary> ```asm example::slice_sum: test rdx, rdx je .LBB0_1 shl rsi, 3 xor ecx, ecx xor eax, eax .LBB0_3: cmp rsi, rcx je .L | labels: I-slow, A-iterators, T-libs"} |
| {"id": "rust_115161", "text": "Missing tracking information on generated dlls for windows | Hi, as u can see the dlls generated by #[no_mangle] on windows contains no version information <img width=\"269\" alt=\"image\" src=\"https://github.com/rust-lang/rust/assets/1041352/94d9e625-c05c-4810-96bf-384bafcd541a\"> Im having trouble clients of this library to accept it as it is | labels: O-windows"} |
| {"id": "rust_115168", "text": "Include ABI information in rustc_layout(debug) | It is currently rather hard to figure out which [`PassMode`](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/abi/call/enum.PassMode.html) a type will get. It would be great to have some way to display that information, similar to [`rustc_layout(debug)`](https://play."} |
| {"id": "rust_115171", "text": "compiletest: \"ignore-debug\" tests are ignored even with debug-assertions-std = false | Some tests need to be disabled when the standard library is built with debug assertions, since that can affect mir-opts codegen through inlining. For that purpose we have the `ignore-debug` clause in compiletest. However, unfortunately it seems like compiletest actually checks wh | labels: A-testsuite, T-bootstrap, C-bug"} |
| {"id": "rust_115175", "text": "ignored lifetime constraints in type annotations | The following compiles since the full transition to NLL in v1.63, although it shouldn't: ```rust struct Static<T: 'static>(T); fn test<T>() { let _ = None::<Static<T>>; } ``` | labels: P-medium, T-compiler, regression-from-stable-to-stable, I-unsound, A-NLL, C-bug"} |
| {"id": "rust_115178", "text": "Collect lang items on the AST instead of HIR | Lang items are collected on HIR in `rustc_passes::lang_items`. However, AST -> HIR lowering may need to know of some lang items, for instance for loops of async desugaring. Having lang items ready before lowering may simplify those code paths. This requires re-implementing lang i | labels: C-cleanup, E-mentor, T-compiler, E-help-wanted, E-medium, A-lang-item"} |
| {"id": "rust_115179", "text": "ICE when building documentation: DefId(20:797 ...) does not have a \"object_lifetime_default\" | <!-- 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-patterns/ --> I found o | labels: T-rustdoc, I-ICE, regression-from-stable-to-stable, C-bug, P-critical, A-cross-crate-reexports"} |
| {"id": "rust_115180", "text": "Cannot write ICE files to disk on Windows hosts | While investigating the ICE in #115179, I saw that every `rustc` attempt at writing the ICE details to a file (first implemented in #108714) would fail on my Windows machine with error messages of this kind: ```none warning: the ICE couldn't be written to `C:\\Users\\User\\Dev\\dicom | labels: O-windows, T-compiler, C-bug |
| idrust_115181textInconsistent derivation for type which stores associated type | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #[derive(Debug)] pub struct Foo<T: Iterator>(T::Item); #[derive(Debug)] pub struct Bar<T: Itera | labels: A-trait-system, A-macros, A-associated-items, T-compiler, C-bug |
| idrust_115185textDiagnostics don't identify `cfg` condition on `use std::os::fd::OwnedFd;` | ### Code ```Rust use std::os::fd::OwnedFd; fn main() {} ``` ### Current output ```Shell /tmp/my-portable-project$ cargo +nightly build --target x86_64-pc-windows-gnu Compiling my-portable-project v0.1.0 (/tmp/my-portable-project) error[E0432]: unresolved import `std::os::fd` --> | labels: A-diagnostics, A-resolve, T-compiler"} |
| {"id": "rust_115188", "text": "Spurious \"cannot check whether the hidden type of opaque type satisfies auto traits\" errors | I have a proprietary code base that contains a GraphQL backend using async-graphql `#[Object]` macros on top code that uses sqlx compile-time query validation. If the query validation doesn't work correctly, I get a large amount of extra spew from the compiler. ### Current output | labels: T-compiler, C-bug, I-cycle |
| idrust_115189text`const_trait_impl` with associated types broken by `effects`, but now requires `effects` to be used in `const fn` | In current beta and beyond, `#![feature(effects)]` is required to use `const_trait_impl` in `const fn` contexts - #114808 . However, turning on `#![feature(effects)]` with an output type on the trait [yields an error about 'host' not being equal to 'true'](https://play.rust-lang. | labels: C-bug |
| idrust_115199textCFI: core and std have explict CFI violations | Even though the user can now rebuild both `core` and `std` with CFI enabled (see #90546) using Cargo [build-std feature](https://doc.rust-lang.org/cargo/reference/unstable.html#build-std) (which is recommended), both have explicit CFI violations that prevent the compiled program | labels: C-enhancement, A-sanitizers, requires-nightly, T-libs, PG-exploit-mitigations, A-control-flow-integrity |
| idrust_115203text3d vector compiler bug | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-bug, regression-untriaged |
| idrust_115205textCompiler panic in 1.72.0 | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_115207textrustc 1.72.0 hangs on release build of the `simple` example in `rfd` crate | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: https://github.com/PolyMeilex/rfd/tree/0.11.4 with ``` cargo build --example simple --release --no-defa | labels: I-compiletime, P-high, regression-from-stable-to-stable, C-bug, I-hang |
| idrust_115208text`invalid_from_utf8_unchecked` does not fail for include_bytes! | This code should fail if invalid.txt contains invalid UTF-8. ```rs let str = include_bytes!(\); let str = unsafe { std::str::from_utf8_unchecked(str) }; ``` This should fail as the byte sequence is known at compile time! | labels: C-bug |
| idrust_115209textCalling `std::thread::current()` in global allocator results in non-obvious error | Global allocator is a special piece of code because it runs before `main()`. Parts of standard library are not available at this time and it’s (as far as I know) not documented in safety contract of `GlobalAlloc`, or, for that matter, anywhere else. It seems like some sort of a d | labels: T-libs-api, C-bug, T-libs |
| idrust_115212textNearly 50% performance regression when copying/moving small byte arrays between 1.71 and 1.72 | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Summary Nearly 50% | labels: A-LLVM, I-slow, regression-from-stable-to-stable, C-bug |
| idrust_115213text`python3 x.py install` attempts to install some files multiple times and leaves \ files | In a fresh install of 1.72.0 there are some `.old` files: ``` /opt/rustc-1.72.0/share/doc/rustc-1.72.0/README.md.old /opt/rustc-1.72.0/share/doc/rustc-1.72.0/LICENSE-MIT.old /opt/rustc-1.72.0/share/doc/rustc-1.72.0/LICENSE-APACHE.old /opt/rustc-1.72.0/bin/cargo-fmt.old /opt/rustc | labels: T-bootstrap, C-bug |
| idrust_115218textmips64-unknown-linux-gnuabi64 for Rust 1.72 is missing in rustup | mips64-unknown-linux-gnuabi64 target for Rust 1.72 is missing in rustup, producing the following error while trying to update: ``` error: component 'rust-std' for target 'mips64-unknown-linux-gnuabi64' is unavailable for download for channel 'stable' error: If you don't need the | labels: O-MIPS, A-docs"} |
| {"id": "rust_115222", "text": "On method chain expression failure, look for missing method in earlier segments of the chain | ### Code ```Rust struct A; struct B; struct C; struct D; impl A { fn b(&self) -> B { B } } impl B { fn c(&self) -> C { C } fn foo(&self) {} } impl C { fn d(&self) -> D { D } } impl D { fn e(&self) {} } fn main() { A.b().c().d().foo(); } ``` ### Current output ```Shell error[E0599 | labels: A-diagnostics, P-low, T-compiler, D-papercut, D-terse"} |
| {"id": "rust_115225", "text": "Segfault on no-std binary on 1.72.0, since nightly 2023-06-17 | ### Summary I've written a [tiny-stdlib that works without libc](https://github.com/MarcusGrass/tiny-std), binaries produced by it seems to be broken per nightly-2023-06-17 and forward. A small repro can be found [here](https://github.com/MarcusGrass/segfault-repro). Running gdb | labels: A-LLVM, T-compiler, C-bug, regression-untriaged |
| idrust_115234textRandom linker failure involving alloc symbols on stable 1.72.0 to currently nightly | I have a toy program to fuzz Rust's compilation errors. I noticed that on nightly it randomly fails with linker issues. I then went and tested it on stable 1.72.0 and the same thing happens. This error seems to be almost completely random, and the fuzzer has to generate a few tho | labels: T-compiler, C-bug, S-needs-repro"} |
| {"id": "rust_115239", "text": "hashbrown tests fail on many platforms | Hashbrown crate starts fail when running: [test (ubuntu-latest, armv7-unknown-linux-gnueabihf, nightly)](https://github.com/rust-lang/hashbrown/actions/runs/5971536254/job/16200729505?pr=459#logs), [test (ubuntu-latest, i686-unknown-linux-gnu, nightly)](https://github.com/rust-la | labels: A-linkage, T-compiler, C-bug"} |
| {"id": "rust_115250", "text": "rustdoc - redundant_explicit_links panics on unicode ellipsis inside backticks | <!-- 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-patterns/ --> ### Code | labels: T-rustdoc, I-ICE, T-compiler, C-bug"} |
| {"id": "rust_115251", "text": "Add information about PGO and BOLT effects on Rustc performance to the documentation | ### Location Don't know the right place for this information - needs to be clarified. ### Summary The official Rustc distribution is not the only Rustc binary version, which is used by Rust users. E.g. there are provided by multiple OS packages (like Fedora `rust` [package](https | labels: A-docs, T-infra |
| idrust_115259textWrong syntax suggested by \ with mut parameter in closure when iterating a vector | ### Code ```Rust fn main() {} pub trait Layer { fn process(&mut self) -> u32; } pub struct State { layers: Vec<Box<dyn Layer>>, } impl State { pub fn process(&mut self) -> u32 { self.layers.iter().fold(0, |result, mut layer| result + layer.process()) } } ``` ### Current output `` | labels: A-diagnostics, A-closures, T-compiler, A-suggestion-diagnostics, D-invalid-suggestion |
| idrust_115262textDocumentation tests don't give accurate line numbers | I couldn't find a proper issue filed for this, so I'm going to open one and am fine with being redirected to an existing one if that's the case. Right now, documentation tests don't give accurate line numbers when reporting panics. For example, take this code: [(playground link)] | labels: C-bug"} |
| {"id": "rust_115264", "text": "ICE: ` no name for HirId` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_115265", "text": "ICE: index out of bounds `#[rustc_host]` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-low, T-compiler, regression-from-stable-to-beta, C-bug, F-rustc_attrs"} |
| {"id": "rust_115268", "text": "Tracking Issue for `Literal::byte_character` | <!-- 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 process. In that case, y | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period"} |
| {"id": "rust_115271", "text": "performance regression of binary_search | This affects my real project. `[usize]` seems to cause a huge performance regression. After investigation, it is caused by the new binary_search introduced by this pr https://github.com/rust-lang/rust/pull/74024 . Why is the new `binary_search` not `binary_search_unstable` ? macO | labels: I-slow, T-libs"} |
| {"id": "rust_115275", "text": "Invalid checksum in bootstrap | on d1fb1755aa4e05a5addb5ca2d1d49f09da76a2d5 I ran `./x clean` after doing a git pull (unsure from what commit) and got: ``` downloading https://static.rust-lang.org/dist/2023-08-22/rustc-nightly-aarch64-unknown-linux-gnu.tar.xz ##### 2.6% curl: (28) Operation too slow. Less than | labels: T-bootstrap, C-bug"} |
| {"id": "rust_115284", "text": "Undefined behavior in safe rust using `rustc_layout_scalar_valid_range_start` | Given the following struct: ```rust #[rustc_layout_scalar_valid_range_start(2)] struct NonZeroAndOneU8(u8); ``` trying to initialise it directly with `NonZeroAndOneU8(1)` (rightfully) results in the error: ```rust error[[E0133]](https://doc.rust-lang.org/nightly/error_codes/E0133 | labels: C-bug, F-rustc_attrs, requires-internal-features"} |
| {"id": "rust_115285", "text": "`c_unwind` full stabilization request: change in `extern \"C\"` behavior | Tracking issue: #74990 This is a separate issue to enable using the FCP bot a second time. The request-for-stabilization comment is duplicated below, without modification. RFC \"C-unwind ABI\": https://github.com/rust-lang/rfcs/pull/2945 Feature gate to be stabilized: `#![feature(c | labels: T-lang, disposition-merge, finished-final-comment-period"} |
| {"id": "rust_115295", "text": "Inconsistent rustdoc constant expansion from macro | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust pub struct WithConst<const N: usize>; pub trait Trait<T> {} macro_rules! spans_from_macro { () | labels: T-rustdoc, C-bug, A-rustdoc-ui"} |
| {"id": "rust_115297", "text": "Compile stuck forever with --release and 1.72: yash-syntax | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I found a possible regression in rustc with a crate that builds with Rust 1.71.1, but does not build anymore with the late | labels: I-compiletime, T-compiler, regression-from-stable-to-stable, C-bug, I-hang"} |
| {"id": "rust_115298", "text": "Compiler panics when disk is full | When compiling my project, the disk filled up and I got: ``` thread 'rustc' panicked at 'assertion failed: pos.get() <= self.position()', compiler/rustc_metadata/src/rmeta/encoder.rs:447:9 ``` I’m assuming this is a compiler bug, if only because the error message is not helpful. | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_115302", "text": "track_caller does not work with closures and Fn* types | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() { my_function(); } #[track_caller] fn my_function() { my_result().unwrap_or_else(|e| | labels: E-easy, A-closures, C-bug, F-track_caller, T-libs"} |
| {"id": "rust_115316", "text": "Executing `./src/ci/docker/run.sh x86_64-gnu` raises errors | I tried this code: ``` git clone git@github.com:rust-lang/rust.git cd rust/src/ci/docker ./run.sh x86_64-gnu ``` I expected to see this happen: image is built and executed Instead, this happened: ``` ... Compiling build_helper v0.1.0 (/checkout/src/tools/build_helper) Finished de | labels: C-bug"} |
| {"id": "rust_115336", "text": "`extern \"C\" fn` on sparc64 targets does not respect repr(transparent) | I tried the following code: ```rust #![feature(rustc_attrs)] #[rustc_abi(debug)] extern \"C\" fn test1(_x: [u8; 0]) {} #[repr(transparent)] struct Wrap<T>(T); #[rustc_abi(debug)] extern \"C\" fn test2(_x: Wrap<[u8; 0]>) {} ``` When running this with `--target sparc64-unknown-linux-gn | labels: A-FFI, P-high, T-compiler, I-unsound, O-SPARC, A-ABI"} |
| {"id": "rust_115337", "text": "After 1.72 code fails to compile in release mode | ### Code I tried to compile this crate: https://github.com/thscharler/spreadsheet-ods I expected to see this happen: It should compile without any issue. Instead, this happened: the code compiles just fine in debug mode, but fails to compile in release mode with the following out | labels: C-bug"} |
| {"id": "rust_115339", "text": "Performance regression of `array::IntoIter` vs `slice::Iter` | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code I tried this c | labels: A-LLVM, I-slow, P-medium, T-compiler, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_115344", "text": "Failed to compile a project with LTO + PGO | In https://github.com/vectordotdev/vector/issues/15631#issuecomment-1694554798 I tried to optimize [Vector](https://vector.dev) with LTO + PGO enabled. But during the optimization phase (done with `cargo pgo optimize`) I get the following error: https://github.com/Kobzol/cargo-pg | labels: A-LLVM, T-compiler, C-bug, A-LTO, A-PGO"} |
| {"id": "rust_115348", "text": "necessary `unsafe` keywords marked as unnecessary when inside incomplete match | ### Code ```Rust enum MyEnum { Red, Blue, Purple, Gray, Orange, } fn my_fn(input: MyEnum) -> u32 { let bytes1 = [1u8, 2u8, 3u8, 4u8]; let bytes2 = [1u8, 3u8, 3u8, 4u8]; let bytes3 = [1u8, 2u8, 0u8, 4u8]; let bytes4 = [1u8, 7u8, 3u8, 4u8]; match input { MyEnum::Red => unsafe { cor | labels: A-lints, A-diagnostics, P-medium, T-compiler, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_115351", "text": "ICE: `argument of integer logarithm must be positive` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, S-has-mcve, WG-trait-system-refactor"} |
| {"id": "rust_115360", "text": "ICE: `Could not resolve Lifetime` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-associated_type_bounds, F-return_position_impl_trait_in_trait"} |
| {"id": "rust_115369", "text": "ICE: rustdoc lib: violation of UTF-8 char boundary | ### Command ``` $ cargo doc ``` ### Code ```Rust fn main() {} ``` Cargo.toml: ```toml [package] name = \"example-name\" version = \"0.0.0\" edition = \"2021\" [dependencies] axum = \"=0.6.20\" ``` It doesn't panic with any crate, but specifically with `axum`. ### Meta <!-- If you're usin | labels: T-rustdoc, I-ICE, C-bug"} |
| {"id": "rust_115375", "text": "bad suggestion for type lifetime bounds with anonymous lifetimes | Given this code: ```rust type Lt<'lt> = *mut &'lt u8; fn outlives<'lt, T: 'lt>(_: T, _: Lt<'lt>) {} pub fn test<A>(arg: A, lt: Lt<'_>, _: &str) { outlives(arg, lt); //~^ ERROR the parameter type `A` may not live long enough } ``` The current error message is this: (note the inval | labels: A-diagnostics, A-borrow-checker, T-compiler, C-bug, A-suggestion-diagnostics, D-invalid-suggestion"} |
| {"id": "rust_115377", "text": "Adding `#[derive()]` changes blob import semantics |  I tried this code: ```rust use module::*; mod module { pub enum B {} impl B { pub const ASSOC: bool = true; } // used to distinguish the `B`s } #[derive()] pub enum B {} impl B { pub c | labels: P-medium, T-compiler, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_115380", "text": "no MIR available ICE instead of an ambiguity error | I tried this code: a.rs: ```rust pub use a::*; mod a { pub use a::*; pub use b::*; mod a { pub fn f() {} } mod b { pub fn f() {} } } ``` b.rs: ```rust pub fn main() { a::f(); } ``` ```console rustc a.rs --edition=2018 --crate-type=lib rustc b.rs --edition=2018 --crate-type=lib -L | labels: A-resolve, I-ICE, T-compiler, C-bug"} |
| {"id": "rust_115382", "text": "Errors are too verbose since 1.72.0 | ### Code ```Rust // cargo new testx // cd testx // cargo add tokio -F full #[tokio::main] async fn main() -> Result<(), impl std::error::Error> { tokio::spawn(run()).await } async fn run() { let i: u8 = \"\"; // E0308 is here } ``` ### Current output ```Shell Checking testx v0.1.0 | labels: A-diagnostics, T-compiler, D-verbose"} |
| {"id": "rust_115383", "text": "ICE when using `rustc_layout_scalar_valid_range_start` on newtype wrapper for `f64` | ### Code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=5b4996044f6a479d545f82dc64513a72)) ```Rust #![allow(internal_features)] #![feature(rustc_attrs)] #[repr(transparent)] #[rustc_layout_scalar_valid_range_start(0b01)] pub struct NonZeroF | labels: I-ICE, T-compiler, C-bug, requires-nightly, F-rustc_attrs, requires-internal-features"} |
| {"id": "rust_115385", "text": "Failed assert `2 != 2` after update to LLVM 17 | Running this code in release mode fails: `main.rs`: ```rust use serde::Deserialize; #[derive(Deserialize)] pub struct TestExecutionPlan { pub pos: usize, /// List of actions to performs. pub actions: Vec<String>, pub expected_reboot: bool, pub unexpected_reboot_count: u8, pub fai | labels: A-LLVM, T-compiler, regression-from-stable-to-beta, C-bug, P-critical"} |
| {"id": "rust_115396", "text": "Undetected unsound usage of packed field by unsize coercion | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> The following code was tried: ```rust use core::mem::ManuallyDrop; use core::fmt::Debug; #[repr(packed)] struct Unaligned< | labels: P-high, T-compiler, I-unsound, C-bug"} |
| {"id": "rust_115399", "text": "ICE in sparc64 `fn_abi_of_instance` | I tried the following code: ```rust #[repr(transparent)] #[derive(Default)] struct Wrapper2<T>((), T); type T = (i8, i16, f32); extern \"C\" fn test(x: Wrapper2<T>) {} fn main() { test(Default::default()); } ``` Building this for the sparc64-unknown-linux-gnu target causes an ICE: | labels: I-ICE, T-compiler, O-SPARC, C-bug, A-ABI"} |
| {"id": "rust_115402", "text": "ICE: `not implemented: SizeOverflow([u8; usize::MAX])` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_115403", "text": "rustc refuses to compile const function due to potential drops even when nothing is being dropped | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust use core::marker::PhantomData; use std::sync::Arc; struct Foo<T> { drop_value: Arc<u32>, pd: Ph | labels: A-destructors, T-compiler, C-bug, A-const-eval"} |
| {"id": "rust_115405", "text": "^^^^^^^ expected `()`, found `Result<ServiceResponse<B>, _>` ??? not related not informative .. | ### Code ```Rust //main.rs use actix_web::{get,web,http,Result,App,HttpServer,HttpRequest, Responder, HttpResponse}; use serde::{Deserialize,Serialize}; use actix_cors::Cors; mod heartbeat; static PORT :u16 = 9091; #[get(\"/\")] async fn index()->impl Responder { HttpResponse::Ok() | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_115407", "text": "Program Hangs when Using Associated Types in Structs with Trait Bounds | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code(reduced): ```rust //... trait Trait { type AssTrait; } //... struct St<'a, T: Trait> { _var1: Box<&'a T> | labels: A-trait-system, A-associated-items, T-compiler, C-bug, I-hang, T-types"} |
| {"id": "rust_115410", "text": "regression: destructor of `[MaybeUninit<T>; N]` cannot be evaluated at compile-time | ### Code I tried this code: ```rust pub const fn f<T, const N: usize>(_: [std::mem::MaybeUninit<T>; N]) {} ``` I expected it to compile successfully. Instead, this happened: ``` error[E0493]: destructor of `[MaybeUninit<T>; N]` cannot be evaluated at compile-time --> x.rs:1:35 | | labels: A-destructors, P-high, T-compiler, regression-from-stable-to-beta, C-bug, A-const-eval"} |
| {"id": "rust_115414", "text": "out of memory | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: I found this code would make rustc eat more than 20 gb of memory until OOM killer stopped it ```rust fn | labels: I-crash, P-medium, T-compiler, regression-from-stable-to-stable, I-compilemem, C-bug"} |
| {"id": "rust_115423", "text": "`format_args!` does not respect integer literals' type | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> When using the `1234i8` syntax in the Display format in formatting macros, the `i8` is ignored and treated as a `u128`. I | labels: P-medium, T-compiler, regression-from-stable-to-stable, C-bug, A-fmt |
| idrust_115430textLinking error on Rust 1.72.0 x86_64-unknown-linux-musl toolchain | I have [a project](https://gitlab.com/ogarcia/rockpass) that currently compiles and links with Rust 1.71.0 and earlier but gives a linking error in version 1.72.0 with x86_64-unknown-linux-musl toolchain. The failure occurs both when creating the debug version and the release ver | labels: regression-from-stable-to-stable, O-musl, C-bug |
| idrust_115432textfloat break while makes it infinite | <!-- i dont specify but, i know this bug from C times, i tried it on Rust and... It still bugging, so... i guess problem in f32 because with f64 it work correct, so... --> I tried this code: ```rust fn main() { let mut x: f32 = 16700000.0; while x < 17000010.0 { x += 1.0; print!( | labels: C-bug |
| idrust_115437textInvalid \ | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust use std::future::{pending, Future}; use std::sync::Mutex; fn foo() -> impl Future<Output = ()> | labels: C-bug |
| idrust_115451textlack of documentation on the issue that using std::io::Write::write_all with a std::net::TcpStream results in undefined behavior when non_blocking(true) | ### Location lack of documentation on the issue that using std::io::Write::write_all with a std::net::TcpStream results in undefined behavior when non_blocking(true) ### Summary lack of documentation on the issue that using std::io::Write::write_all with a std::net::TcpStream res | labels: A-docs, T-libs, A-io |
| idrust_115458text#115296 broke include_bytes! on paths with untrustworthy metadata | In https://github.com/rust-lang/rust/pull/115296 this diff is subtly broken: ```diff - fn read_binary_file(&self, path: &Path) -> io::Result<Vec<u8>> { - fs::read(path) + fn read_binary_file(&self, path: &Path) -> io::Result<Lrc<[u8]>> { + let mut file = fs::File::open(path)?; + | labels: regression-from-stable-to-nightly, P-high, T-compiler, C-bug |
| idrust_115462text`PatField` and `ExprField` produce no warning for `#[doc(...)]` attribute | ### Code ```Rust struct X { foo: i32, } #[allow(unused_variables)] // Not necessary for reproducing. Just to suppress an unrelated warning fn main() { let X { #[doc(alias = \)] foo } = X { foo: 123 }; let _ = X { #[doc(alias = \)] foo: 123, }; } ``` # | labels: A-diagnostics, T-compiler |
| idrust_115463text`opt-level=z` fails to remove bounds checks/panics even if every other opt-level succeeds | If compiling with `-Copt-level=z` we fail to remove bounds checks and panicking branches in code like this (godbolt <https://godbolt.org/z/YsoMszxPe>): ```rust pub fn read_up_to_8(buf: &[u8]) -> u64 { if buf.len() < 4 { // actual instance has more code. return 0; } let lo = u32:: | labels: I-slow, T-libs-api, T-compiler, C-bug, I-heavy |
| idrust_115464textRPITIT forces Self: Sized upon all other methods in a given trait. | I tried this code: ```rust #![feature(return_position_impl_trait_in_trait)] fn main() { let vec: Vec<Box<dyn Trait>> = Vec::new(); for i in vec { i.fn_2(); } } trait OtherTrait {} trait Trait { fn fn_1(&self) -> impl OtherTrait where Self: Sized; fn fn_2(&self) -> bool; } ``` I e | labels: C-bug, requires-nightly, T-types, F-return_position_impl_trait_in_trait |
| idrust_115465textMultiple nested loops taking very long to compile with CPU extensions | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code I tried this c | labels: A-LLVM, P-medium, I-compiletime, T-compiler, regression-from-stable-to-stable, C-bug |
| idrust_115466textRaw identifiers don't work in formatting strings | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() { let r#type = \"foobar\"; println!(\"It is {r#type}\"); } ``` I expected to see this hap | labels: C-enhancement, T-libs-api"} |
| {"id": "rust_115468", "text": "Coverage instrumentation sometimes thinks the negation operator isn't executable | #111752 introduced this behaviour in coverage reports: ``` LL| | if LL| | ! LL| 1| is_true LL| 0| { ``` Notice that the line with `!` no longer has a coverage count, even though it should have the same count as `is_true`. --- This is caused by the fact that MIR building specifica | labels: T-compiler, C-bug, A-code-coverage |
| idrust_115474textice `Not enough bound vars: BoundRegion ` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions |
| idrust_115475text`#[allow(private_bounds)]` does not work when applied directly to the \ item. | I tried this code: ```rust #[allow(private_bounds)] pub trait Foo: FooImpl {} trait FooImpl {} ``` I expected to see this happen: The `private_bounds` lint is allowed. Instead, this happened: The `private_bounds` lint still triggers. (Applying `#[allow(private_bounds)]` to the en | labels: A-lints, A-visibility, T-compiler, C-bug |
| idrust_115479textThe generator should internally receive a value first and then pass a value. | I think there is a problem with the current yield syntax. This is because the resume method passes in a parameter and then receives a value. So responsively, inside the generator, it should receive a value before generating a value. However, the current yield does the opposite. I |
| idrust_115480text`std` docs has `equivalent` methods in the search index that lead nowhere | I was checking if `std` exposed [`hashbrown::Equivalent`](https://docs.rs/hashbrown/latest/hashbrown/trait.Equivalent.html) and found these seemingly non existent methods https://doc.rust-lang.org/std/index.html?search=equivalent | labels: T-rustdoc, C-bug, A-rustdoc-search |
| idrust_115481textriscv64gc-unknown-linux-gnu `extern \` ABI violates repr(transparent) on unions | The types `(i32, f32)` and `MaybeUninit<T>` do not have the same ABI, as demonstrated by this testcase: ```rust #![feature(rustc_attrs)] type T = (i32, f32); #[rustc_abi(debug)] extern \ fn test1(_x: T) {} #[rustc_abi(debug)] extern \ fn test2(_x: std::mem::MaybeUninit<T>) {} | labels: P-medium, T-compiler, I-unsound, O-riscv, A-ABI |
| idrust_115483textnon-blocking stream & io::Write::write_all method are not compatible and result in unexpected user behavior | ### Location This is a continuation of https://github.com/rust-lang/rust/issues/115451 ### Summary The following block of code has unexpected behavior as it will likely not write_all bytes to the stream but there is no way for user to know who many if any where written. Perhaps t | labels: A-docs, T-libs, A-io |
| idrust_115497textICE: `unexpected bound var resolution for HirId(DefId(..))` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, E-needs-test, T-compiler, C-bug, F-associated_type_bounds, F-generic_const_exprs |
| idrust_115498textice `self.lines.iter().all(|r| !r.iter().any(|sc| sc.chr == \\'\\\\t\\'))` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions |
| idrust_115500textICE: \ | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, WG-trait-system-refactor |
| idrust_115502textconfig.toml generated by ./configure does not include tools= definition anymore | I compile Rust by downloading it from https://forge.rust-lang.org/infra/other-installation-methods.html#source-code, unpacking, then calling > ./configure --enable-optimize-llvm --enable-extended --llvm-root=/usr/local --enable-llvm-link-shared --enable-sanitizers --enable-local- | labels: T-bootstrap, C-bug |
| idrust_115509textloongarch64-unknown-linux-gnu `extern \` ABI violates repr(transparent) on unions | The types `(i32, f32)` and `MaybeUninit<T>` do not have the same ABI, as demonstrated by this testcase: ```rust #![feature(rustc_attrs)] type T = (i32, f32); #[rustc_abi(debug)] extern \ fn test1(_x: T) {} #[rustc_abi(debug)] extern \ fn test2(_x: std::mem::MaybeUninit<T>) {} | labels: P-medium, T-compiler, I-unsound, A-ABI, O-loongarch |
| idrust_115511text`std::sys::windows::process::Command::spawn`: `mem::size_of::<c::STARTUPINFOW> as c::DWORD` compiles to a garbage value | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code ```rust use st | labels: O-windows, C-bug, regression-untriaged |
| idrust_115517textICE: `has escaping bound vars, so it cannot be wrapped in a dummy binder.` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, E-needs-test, P-medium, T-compiler, regression-from-stable-to-stable, C-bug |
| idrust_115528textTracking Issue for XXX | <!-- NOTE: For library features, please use the \ template instead. Thank you for creating a tracking issue! 📜 Tracking issues are for tracking a feature from implementation to stabilisation. Make sure to include the relevant RFC for the feature if it has o | labels: C-tracking-issue |
| idrust_115533textError: the compiler unexpectedly panicked (features: const_trait_impl, effects) | I cannot provide a minimal example, but I found my project [`components-arena`]() [fails to build](https://github.com/A1-Triard/components-arena/actions/runs/6075290946/job/16481173209) with the following command: `cargo test --verbose --workspace --tests --no-default-features -- | labels: E-easy, A-metadata, E-needs-test, T-compiler, C-bug, F-const_trait_impl |
| idrust_115550text1.73.0 crater runs | Note: Please do not conduct triage on these runs without discussing how to do so with a release team member first. Thanks! | labels: S-waiting-on-review, T-release |
| idrust_115551textFormat Macro Named Argument Example is Confusing | ### Location https://doc.rust-lang.org/std/macro.format.html#examples ### Summary I was sent here from the [Rust website tracker](https://github.com/rust-lang/www.rust-lang.org/issues/1862). Please advise if I am posting in the wrong area. ### What needs to be fixed? format! macr | labels: C-enhancement, A-docs, T-libs |
| idrust_115556textError: the rustc unexpectedly panicked | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, A-incr-comp, C-bug, S-needs-repro |
| idrust_115564textDifference in output of llvm-args=--help-list-hidden when llvm.linked-shared is set to true or false | I noticed a difference in the output of the `llvm-args=--help-list-hidden` flag when the `llvm.link-shared` configuration option is set to true or false in config.toml. Steps to reproduce on Mac: 1. Set `llvm.link-shared=true` and `llvm.download-ci-llvm=false` in the `config.toml | labels: C-bug |
| idrust_115565text--emit asm when combined with cdylib and wasm32-unknown-unknown doesn't actually emit asm | It seems like setting `crate-type = [\"cdylib\", \"lib\"]` makes it so `--emit asm` stops producing `mylib.s` file at least when combined with `wasm32-unknown-unknown` target. Removing `cdylib` fixes the problem. Same with using native target. Command that I expect to produce an `myl | labels: T-compiler, O-wasm, C-bug, A-CLI"} |
| {"id": "rust_115569", "text": "Don't suggest dereferencing on &dyn T where T is a trait | ### Code ```Rust fn use_iterator<I>(itr: I) where I: IntoIterator<Item = i32> {} fn pass_iterator<I>(i: &dyn IntoIterator<Item = i32, IntoIter = I>) where I: Iterator<Item = i32> { use_iterator(i); } ``` ``` ### Current output ```Shell error[E0277]: `&dyn IntoIterator<IntoIter = | labels: A-diagnostics, T-compiler |
| idrust_115571text`register_late_mod_pass` doesn't visit all attributes | I was testing using per module passes (like #113734) in Clippy and saw test failures when trying [`clippy::allow_attributes`](https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/allow_attributes.rs), it seems only inner attributes of the root crate are visited b"} |
| {"id": "rust_115576", "text": "Iterator::position() does not return the index position when used with rev() | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Iterator::position() returns the number of iterations to find the true predicate, so it fails to return the index position | labels: C-bug"} |
| {"id": "rust_115597", "text": "`core_intrinsics` should be marked as an internal feature | Using the `intrinsics` feature triggers a warning about this being \"internal to the compiler or standard library\", but `core_intrinsics` does not. Clearly `core_intrinsics` is internal as well, so it should also get the warning. `core_intrinsics` is a library feature though, not | labels: A-stability, T-compiler, T-libs"} |
| {"id": "rust_115599", "text": "ICE error when matching uninitialized constant with constant pattern in Rust | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_115610", "text": "default binary size increase due to ice dumps logic | #108714 slightly increased default binary size (checked on x86_64-pc-windows-msvc), the reason is now code https://github.com/rust-lang/rust/blob/a0c28cd9dc99d9acb015d06f6b27c640adad3550/library/std/src/panicking.rs#L304-L308 unconditionally includes File::open (~ 2kb out of 130) | labels: T-compiler, I-heavy, T-libs, A-panic"} |
| {"id": "rust_115618", "text": "Import suggestion breaks `#[cfg]` attribute for previous imports | ### Code ```Rust #[cfg(unix)] use std::os::unix::fs; fn main() { let _ = stdout(); #[cfg(unix)] { // Using unix specific stuff here. let _function = fs::chroot::<&str>; } } ``` ### Current output ```Shell error[E0425]: cannot find function `stdout` in this scope --> src/main.rs:5 | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-invalid-suggestion"} |
| {"id": "rust_115620", "text": "TypeId should be (u64, u64) instead of u128 to save space | On Apple Silicon (unlike x86_64) `u128` is 16-bytes aligned. So it takes extra space with little or no benefit. I looked at generated code, it is the same: https://rust.godbolt.org/z/3sE7sMsjj (Note just using `repr(packed(8))` won't work because it will pass `TypeId` by referenc | labels: C-bug, T-libs |
| idrust_115621textNightly thread_local segment fault | cargo 1.73.0-nightly (45782b6b8 2023-07-05) Cross compiled from mac with \ (stable 11.0.1) cargo build --release --target x86_64-pc-windows-gnu or cargo build --target x86_64-pc-windows-gnu ```rust #[derive(Clone, Copy)] pub enum EntityIdFlag { Normal, Hash | labels: T-compiler, A-thread-locals, C-discussion |
| idrust_115628textice: `called `Result::unwrap()` on an `Err` value: Unknown(<SeStr<S, E> as std::ptr::Pointee>::Metadata)` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-bug |
| idrust_115635textstd::iter::Iterator.take() returns an element with the smallest i32 value if used on an iterator with a smaller number of elements than specified in take() | Edit: I also asked this on https://stackoverflow.com/questions/36221430/why-does-the-closure-for-take-while-take-its-argument-by-reference I tried running the below code on rustc 1.72.0 with cargo run : ``` fn main() { let ea = (1..).filter(|x| *x < 10).take(10); // Initialize a |
| idrust_115642textRust building and testing fails while bootstrapping it in poky | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> Getting error while bui | labels: T-bootstrap |
| idrust_115647textICE: `!ty.has_late_bound_regions()` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions, WG-trait-system-refactor |
| idrust_115658textICE: called `Option::unwrap()` on a `None` value | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-return_position_impl_trait_in_trait, S-needs-repro |
| idrust_115664text`extern \ fn` ABI on aarch64 violates repr(transparent) | On aarch64-unknown-linux-gnu (a tier 1 target), consider this testcase: ```rust #![feature(rustc_attrs)] type T = (f32, f32, f32); #[repr(transparent)] struct Wrapper2<T>((), T); #[rustc_abi(debug)] extern \ fn test1(_x: T) {} #[rustc_abi(debug)] extern \ fn test2(_x: Wrapper | labels: I-unsound, O-AArch64, A-ABI |
| idrust_115666textwasm32-unknown-unknown \ ABI doesn't use proper ABI adjustments | rustc has a `PassMode` enum to declare how arguments should be passed between functions. `PassMode::Direct` is used for the simple case where we can just generate LLVM IR with an argument type that matches the usual LLVM type for this Rust type. It should only be used for types w | labels: T-compiler, O-wasm, A-ABI"} |
| {"id": "rust_115667", "text": "The x86_64 extern \"C\" fn ABIs is wrong when packed structs are involved | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: t.rs: ```rust #[repr(packed, C)] struct P { i: i8, f: f32, } #[no_mangle] extern \"C\" fn test(p: P) { le | labels: C-bug"} |
| {"id": "rust_115674", "text": "Crate build fails only on native armv7 | ### Problem The [opcua crate](https://github.com/locka99/opcua) fails to build on \"native\" armv7 only (using docker buildx), it works fine with other architectures (namely aarch64 and x86_64) and also works when doing cross-compilation. The error is `memory allocation of 131072 b | labels: I-crash, O-Arm, T-compiler, I-compilemem, C-bug"} |
| {"id": "rust_115675", "text": "compiletest fails when rustc prints too much JSON | Sometimes a rustc ICE (or rustc invocation in general) can produce so much output that compiletest's logic to skip part of the output kicks in, and then that logic destroys the JSON format, and then compiletest fails. Then things become essentially impossible to debug, since the | labels: A-testsuite, T-bootstrap, C-bug |
| idrust_115676textrustc_layout(debug) does not complain about nonsense types | I tried this code: ```rust #![feature(rustc_attrs)] struct S<T>(T, T); #[rustc_layout(debug)] type T = S<str>; ``` This should complain about using an unsized type in a way that doesn't work. Instead, it prints some layout. Probably the rustc_layout logic needs to fire of some so | labels: C-enhancement, T-compiler, F-rustc_attrs, A-layout"} |
| {"id": "rust_115679", "text": "Rust fails to build cross target libraries when building on M1 Mac | I am trying to build Rust from source. Besides my host target `aarch64-apple-darwin` I also want to build support for another target. Let's say `x86_64-apple-darwin` (it doesn't really matter as it happens for all targets as far as I can tell). When I do this it will always emit | labels: O-macos, O-x86_64, A-cross, T-bootstrap, C-bug, O-AArch64"} |
| {"id": "rust_115680", "text": "stable rustdoc accepts unstable nightly flags | `~/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustdoc implied-bounds-unconstrained-2.rs \"--document-private-items\" \"--document-hidden-items\" -Zunstable-options --edition=2021` will print a bunch of errors but still generate docs it seems. ```` error: the option `docum | labels: T-rustdoc, C-bug"} |
| {"id": "rust_115681", "text": "Miscompile with `-Copt-level=1` after update to LLVM 17 | Minimized from [code in the Fuchsia tree](https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/connectivity/bluetooth/lib/bt-obex/src/header/mod.rs#507): ```rust fn main() { enum Bits { None = 0x00, Low = 0x40, High = 0x80, Both = 0xC0, } let value = Box::new(0x40u8); l | labels: A-LLVM, A-codegen, T-compiler, regression-from-stable-to-beta, I-unsound, C-bug"} |
| {"id": "rust_115701", "text": "Rust does not detect `avx` or `avx2`? | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust use core::arch::x86_64 as x86; use core::mem; #[cfg(target_feature = \"avx\")] pub(crate) struct | labels: C-bug"} |
| {"id": "rust_115714", "text": "unsafe const fn should recover-parse as const unsafe fn | https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=125d16cb6ffba02dc50df65194611ec5 ### Code ```Rust struct Thing {} impl Thing { unsafe const fn from_u32(val: u32) -> Self { Self {} } fn oof(self) -> u32 { 0 } } fn main() { Thing {}.oof(); } ``` ### Current | labels: A-diagnostics, A-parser, T-compiler"} |
| {"id": "rust_115718", "text": "Documentation size can grow significantly due to documentation of impls on type aliases | In the latest nightly (I’ve tested `62ebe3a2b 2023-09-08`), from #115201 we get better/more documentation on type aliases, including inherent and trait impls of the aliased type. For some crates, this can have a severe effect on the size of the generated documentation (and the ti | labels: T-rustdoc, regression-from-stable-to-nightly, P-high, C-bug, I-heavy, A-rustdoc-ui"} |
| {"id": "rust_115720", "text": "Do not suggest \"using a local generic parameter\" for constants | ### Code ```Rust fn main() {} trait Trait { const X: u32; } impl Trait for () { const X: u32 = 0; } impl<T: Trait> Trait for [T] { const X: u32 = { const TEMP: u32 = T::X + 1; TEMP }; } ``` ### Current output ``` error[E0401]: can't use generic parameters from outer function --> | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-invalid-suggestion |
| idrust_115721textInconsistent #[link] attribute | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ### lib.rs ```rust #[link(name = \, kind = \)] extern \ { pub fn GetStdHa | labels: O-windows, C-bug |
| idrust_115729textSearch is broken on nightly rustdoc | Both of the following are broken (in Firefox and Chromium): https://doc.rust-lang.org/nightly/std/?&search=Vec https://doc.rust-lang.org/nightly/nightly-rustc/?search=Place That seems like complete failure of search on current nightly? Cc @rust-lang/rustdoc |
| idrust_115737textscientific notation incorrect decimal places | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust assert_eq!(\, format!(\, 1001)); assert_eq!(\, format!(\, 1000)); ass | labels: C-bug, T-libs, A-fmt |
| idrust_115742textPattern matching on enum creates unecessary jump table | I tried this code: Say we define an AST type for expressions, each carrying a span to give its position in the original source code: ```rust pub type ByteSpan = (u32, u32); pub enum Expr<'core> { Error(ByteSpan), Int(ByteSpan, u64), Array(ByteSpan, &'core [Self]), Call(ByteSpan, | labels: A-LLVM, I-slow, C-bug, llvm-fixed-upstream |
| idrust_115745text`File::create` fails on hidden files on Windows | Reported on discord, using `OpenOptions::new().write(true).create(true).truncate(true).open(&path)` will fail on Windows if the file is hidden. This also affects methods like `File::create` or `fs::write` that open the file the same way. The reason for this is that we use `CREATE | labels: O-windows, C-bug, T-libs, A-io |
| idrust_115750textcould not compile `v8` | When I was building the project, I encountered the following error while compiling v8: ``` Compiling v8 v0.68.0 Compiling serde_v8 v0.89.0 thread 'rustc' panicked at 'range end index 7124114 out of range for slice of length 7118958', compiler/rustc_codegen_ssa/src/back/archive.rs | labels: I-ICE, T-compiler, C-bug, E-needs-mcve |
| idrust_115760textcargo doc: shows different return types for re-exported methods | Running `cargo doc` for the [`async-net`](https://github.com/smol-rs/async-net) and [`smol`](https://github.com/smol-rs/smol) repositories show different return types for `async fn` methods. (Links to docs.rs provided below as a quick preview of the issue.) ``` git clone https:// | labels: T-rustdoc, C-bug, A-async-await, A-cross-crate-reexports, S-has-mcve |
| idrust_115774textregression: no MIR available for | ``` [INFO] [stdout] error: internal compiler error: compiler/rustc_monomorphize/src/collector.rs:961:9: no MIR available for DefId(24:625 ~ noise[a4da]::noise_fns::generators::perlin::{impl#0}::new) ``` * https://crater-reports.s3.amazonaws.com/beta-1.73-1.2/beta-2023-09-10/gh/AA | labels: I-ICE, T-compiler, regression-from-stable-to-beta |
| idrust_115775textregresion: parsing failure in derive expansion? | ``` [INFO] [stdout] error: expected one of: `for`, parentheses, `fn`, `unsafe`, `extern`, identifier, `::`, `<`, square brackets, `*`, `&`, `!`, `impl`, `_`, lifetime [INFO] [stdout] --> tests/happy.rs:9:13 [INFO] [stdout] | [INFO] [stdout] 9 | thing: &'static str, [INFO] [stdout | labels: T-compiler, regression-from-stable-to-beta, A-proc-macros, S-has-mcve"} |
| {"id": "rust_115776", "text": "regression: destructor of ... cannot be evaluated at compile-time | https://crater-reports.s3.amazonaws.com/beta-1.73-1.2/beta-2023-09-10/reg/construe-0.0.3/log.txt Fix is pending beta backport approval (https://github.com/rust-lang/rust/pull/115527), this issue is tracking that approval so we can add to release notes if backport doesn't happen. | labels: T-compiler, regression-from-stable-to-beta |
| idrust_115778textregression: as_place unwrap None | ``` [INFO] [stderr] thread 'rustc' panicked at compiler/rustc_mir_build/src/build/expr/as_place.rs:253:31: [INFO] [stderr] called `Option::unwrap()` on a `None` value ``` * https://crater-reports.s3.amazonaws.com/beta-1.73-1.2/beta-2023-09-10/gh/bonedaddy.ellidri/log.txt * https: | labels: I-ICE, P-high, T-compiler, regression-from-stable-to-beta |
| idrust_115780textregression: generic args in patterns require the turbofish syntax | ``` [INFO] [stdout] error: generic args in patterns require the turbofish syntax [INFO] [stdout] --> src/lib.rs:142:16 [INFO] [stdout] | [INFO] [stdout] 142 | ret<TCon> (Clone::clone(x_val), Clone::clone(y_val)); [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] ::: src/mdo.r | labels: A-parser, P-high, T-compiler, regression-from-stable-to-beta, S-has-mcve |
| idrust_115781textregression: concrete type differs from previous defining opaque type use | ``` [INFO] [stdout] error: concrete type differs from previous defining opaque type use [INFO] [stdout] --> src/execution.rs:222:13 [INFO] [stdout] | [INFO] [stdout] 222 | impl Iterator<Item = Node<'tree>> + 's, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [std | labels: P-medium, T-compiler, regression-from-stable-to-beta, A-impl-trait, T-types |
| idrust_115784textVec(Deque)::truncate documentation says 'greater' when it should say 'greater or equal' | ### Location https://doc.rust-lang.org/std/vec/struct.Vec.html#method.truncate ### Summary The documentation currently says > If `len` is greater than the vector’s current length, this has no effect. But it also doesn't have an effect if the two lengths are equal, so I think it s | labels: E-easy, A-docs, T-libs"} |
| {"id": "rust_115788", "text": "rustdoc: private items get `broken_intra_doc_links` warning even when using `--document-private-items` | ### Code ```Rust /// Used by [bar::qux]. fn foo() {} mod bar { fn qux() { super::foo(); } } ``` ### Current output ``` warning: unresolved link to `bar::qux` --> foo.rs:1:14 | 1 | /// Used by [bar::qux]. | ^^^^^^^^ no item named `qux` in module `bar` | = note: `#[warn(rustdoc::br | labels: T-rustdoc, A-lints, C-bug, A-intra-doc-links"} |
| {"id": "rust_115789", "text": "ICE: `dereferencing Adt(..)` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-mir-opt"} |
| {"id": "rust_115791", "text": "ICE: effects: `is not fully resolved ` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-effects"} |
| {"id": "rust_115792", "text": "ice: `effects` + `trait-solver=next-coherence` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, WG-trait-system-refactor, F-effects"} |
| {"id": "rust_115806", "text": "ice `assertion failed: !value.has_infer()` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, WG-trait-system-refactor"} |
| {"id": "rust_115807", "text": "Compiler error involving HRTBs | ### Code ```rust trait Chip: for<'a> TraitWithLifetime<'a> + SomeMarker { fn compute(&self); } trait SomeMarker {} trait TraitWithLifetime<'a>: SomeMarker {} trait Machine { fn run(); } struct BasicMachine; impl Machine for BasicMachine { fn run() { let chips: [&dyn Chip; 0] = [] | labels: I-ICE, T-compiler, C-bug |
| idrust_115808textice: `Failed to normalize Alias(Projection, AliasTy {` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-generic_const_exprs, S-bug-has-test |
| idrust_115809textICE: `layout.is_sized()` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-nightly, -Zpolymorphize |
| idrust_115813text[Windows/Clang-cl] Linker errors while linking Rust-built static lib into a main project | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> In our C/C++ project we | labels: C-bug |
| idrust_115814textDeallocation of 37.3 G takes 10 minutes | Consider this code: ```rust fn main() { println!(\, std::time::SystemTime::now()); { const N: usize = 1_000_000_000; let mut v = Vec::with_capacity(N); for _ in 0..N { v.push(Box::new(0u8)); } println!(\, std::time::SystemTime::now()); } println!(\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : 0.14.16\full\0.24.1\} |
| {: , : miri*\} |
| {: , : } |
| {: , : effects\Rust Bug Minimization Patterns\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : Rows and cols must not be zero\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : available_parallelism={:?}\core num = {:?}\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : fatal runtime error: failed t | labels: C-bug |
| idrust_115918textconflicting implementation false positive for fix point over GAT | I tried this code (on stable 1.72 and nightly 1.74): ```rust pub trait HasFrame { type Frame<X>; } pub struct Fix<F: HasFrame>(pub Box<F::Frame<Fix<F>>>); // conflicts with impl<T> From<T> for T; impl<F> From<F::Frame<Fix<F>>> for Fix<F> where F: HasFrame { } ``` I expected it to | labels: A-trait-system, T-compiler, F-generic_associated_types, A-GATs |
| idrust_115922textRegression in lint for non-exhaustive ZST in `repr(Transparent)` | Lifted from #78586 --- I believe this future compatibility warning was badly affected by #115334. Minimal repro: ```rust // src/lib.rs #[non_exhaustive] pub struct ZeroSizedNonExhaustive {} ``` ```rust // src/main.rs #![deny(warnings)] #[repr(transparent)] pub struct Transparent( | labels: regression-from-stable-to-nightly, P-high, T-compiler, C-bug |
| idrust_115938textNightly warning for codeblock languages with non-alphanumeric characters | ### Code I tried this code with `cargo doc`: ```rust /// This is a test: /// ```ASN.1 /// foo /// ``` fn main() { println!(\); } ``` I expected to see this happen: rust doc generated without any warnings. Instead, this happened: ``` warning: unexpected character `.` | labels: T-rustdoc, regression-from-stable-to-nightly, C-bug |
| idrust_115953textCFI breaks on trait Address Taken functions | ``` mmaurer@anyblade:~/github/rust-lang$ rustc -Z sanitizer=cfi -C lto -C codegen-units=1 badsample.rs mmaurer@anyblade:~/github/rust-lang$ ./badsample Illegal instruction mmaurer@anyblade:~/github/rust-lang$ rustc -C lto -C codegen-units=1 badsample.rs mmaurer@anyblade:~/github/ | labels: T-compiler, A-sanitizers, C-bug, requires-nightly, PG-exploit-mitigations |
| idrust_115966textFalse positive `#[warn(unused_imports)]` warning while glob importing macros defined in nested modules | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust mod a { mod b { macro_rules! macro_b { () => { \ }; } pub(crate) use macro_b; } p | labels: A-diagnostics, T-compiler, C-bug, D-incorrect |
| idrust_115970textInfinite loop in LLVM 17 (DominatorTreeBase) | ### Code https://github.com/kornelski/cavif-rs/tree/a0a3652ce8a36d4aee9c5da2ab35b4e97cd20fea/ravif (https://github.com/kornelski/cavif-rs/issues/78) ```bash cargo +nightly build --release ``` `rustc` never finishes building the `ravif` crate (0.11.3) when building with optimizati | labels: A-LLVM, regression-from-stable-to-nightly, P-high, T-compiler, C-bug, I-hang |
| idrust_115976text1.72.1 is not released on GitHub | The 1.72.1 release was announced: https://blog.rust-lang.org/2023/09/19/Rust-1.72.1.html Actually, this tag exists: https://github.com/rust-lang/rust/releases/tag/1.72.1 However, this version does not seem to exist in GitHub Releases: https://github.com/rust-lang/rust/releases It | labels: T-release |
| idrust_115977textunknown unstable option: `ignore-directory-in-diagnostics-source-blocks` | When I run `./x.py test` locally, I get errors: ``` ---- [ui] tests/ui-fulldeps/session-diagnostic/invalid-variable.rs stdout ---- error: test compilation failed although it shouldn't! [..] --- stderr ------------------------------- error: unknown unstable option: `ignore-directo | labels: C-bug"} |
| {"id": "rust_115980", "text": "Decision: semantics of the `#[expect]` attribute | This issue is spun out from #54503 to serve as the decision issue for a specific question. The question is what the 'mental model' for the `expect` attribute should be. Two proposed options: 1. The expectation is fulfilled, if a #[warn] attribute in the same location would cause | labels: T-lang, disposition-merge, finished-final-comment-period, F-lint_reasons"} |
| {"id": "rust_115989", "text": "RUST_TEST_TIME_INTEGRATION and RUST_TEST_TIME_UNIT ignored | The below defected/unimplemented feature is NOT documented in Cargo book, but it's in the public & documented interface of `library/test/src/time.rs` and its submodule `time_constants` (even though it may be accessible from Rust tools only). `https://github.com/rust-lang/rust/blo | labels: C-bug |
| idrust_115992textstruct initialization incorrectly suggests using assoc function | ### Code ```Rust struct Foo { field: u32, } impl Foo { fn field(&self) -> u32 { self.field } fn new() -> Foo { Foo { field } } } ``` ### Current output ```Shell error[E0425]: cannot find value `field` in this scope --> src/lib.rs:11:15 | 11 | Foo { field } | ^^^^^ a field by this | labels: A-diagnostics, T-compiler, D-incorrect |
| idrust_115994textrustc unexpectedly overflowed its stack! (Nested Datatypes) | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: A-debuginfo, I-ICE, T-compiler, C-bug, S-bug-has-test |
| idrust_115998textICE due to bad sized to unsized pointer cast in const item | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-stable, C-bug |
| idrust_116000textArrayChunks::into_remainder does not return None when there is no remainder | I tried this code: ```rust #![feature(iter_array_chunks)] fn main() { let line = \; let mut chunks = line.chars().array_chunks::<3>(); let _result: Vec<_> = chunks.by_ref().collect(); if let Some(rem) = chunks.into_remainder() { assert!(rem.count() != 0); } } ``` I expected t | labels: T-libs-api, C-bug, T-libs |
| idrust_116003textfn() -> impl T { todo!() } not compiling | I tried this code: ```rust trait Foo {} fn not_implemented() -> impl Foo { todo!() } ``` https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=55e475624b24e243aef53a2ace435156 I expected to see this happen: compiles. Instead, this happened: ``` Compiling playgro | labels: T-lang, C-bug |
| idrust_116020textrustc-1.72.1 does not build against llvm-17.0.1 | rustc-1.72.1 does not build against llvm-17.0.1. I just installed llvm-17 on my x86_64-apple-darwin system, and tried to build rustc using the tarball release. It fails during: ``` Building compiler artifacts (stage0 -> stage1, x86_64-apple-darwin) ``` ``` The following warnings | labels: C-bug |
| idrust_116022text`rav1e` compilation time regression (4s -> >1hr) on LLVM 17 | ### Code Applications including https://github.com/xiph/rav1e , including the repo's `example`, never complete compilation in `--release`. I waited over an hour on my 2019 desktop (i7-8700k). I tested [f8b95d97517a6e223f1c6a90a467188586dd090f](https://github.com/xiph/rav1e/commit | labels: A-LLVM, regression-from-stable-to-beta, C-bug, I-hang"} |
| {"id": "rust_116031", "text": "ICE: `item_name: no name for DefPath` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-type_alias_impl_trait"} |
| {"id": "rust_116032", "text": "should report unused_import when it reexports nothing | ### Code ```Rust mod a {} pub use a::*; fn main() {} ``` ### Current output ```Shell nothing ``` ### Desired output ```Shell unused import: `a::*` ``` ### Rationale and extra context _No response_ ### Other cases _No response_ ### Anything else? _No response_ | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_116050", "text": "Wasm modules not instantiating correctly with shared memory | Hello, I'm currently attempting to use rust built to wasm as a scripting language. The exact issue is that the first memory allocation or use of memory from that allocation in a wasm function causes a panic. This is likely because I'm loading several different wasm modules with t | labels: T-compiler, O-wasm, C-bug"} |
| {"id": "rust_116051", "text": "Fixed value in \"struct\" should not require manual type addressing | When creating a `struct` with a set value, like here: ```rs pub struct Colour(u32); impl Colour { pub const BLACK: u32 = 0x000000; pub const WHITE: u32 = 0xFFFFFF; } ``` It should NOT require the user to manually address the types for the constants when the ``struct`` has pre-def"} |
| {"id": "rust_116053", "text": "Unresolved import in module located in function | ```Rust mod m1 { struct T1; const C1: i32 = 123; fn foo() { struct T2; const C2: i32 = 123; mod m2 { use super::T1; // OK use super::T2; // error[E0432]: unresolved import `super::T2` use super::C1; // OK use super::C2; // error[E0432]: unresolved import `super::C2` } } } ``` rus"} |
| {"id": "rust_116055", "text": "ice: -Zmeta-stats `Bad file descriptor` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_116060", "text": "RPITIT allows the impl to assume more implied bounds than the trait | This is a use-after-free that compiles with 1.74.0-nightly (2023-09-13 8142a319ed5c1d1f96e5): ```rust #![feature(return_position_impl_trait_in_trait)] trait Extend { fn extend(_: &str) -> (impl Sized + '_, &'static str); } impl Extend for () { fn extend(s: &str) -> (Option<&'stat | labels: I-unsound, C-bug, requires-nightly, T-types, F-return_position_impl_trait_in_trait |
| idrust_116063text`wrapping_rem` methods should document panic-on-zero | ### Location All [`wrapping_rem` methods](https://doc.rust-lang.org/std/?search=wrapping_rem). ### Summary As reported in https://github.com/yoshuawuyts/futures-concurrency/issues/156, when calling the `wrapping_rem` functions with a value of `0`, a panic is triggered. The docume | labels: A-docs, T-libs, Libs-Small |
| idrust_116064textAdd operations for easy arithmetic that panics on overflow | See the ACP at https://github.com/rust-lang/libs-team/issues/270. The ACP has been seconded so it seems like the next step is implementation. This should be fairly easy to do, just following the patterns established by the existing methods and adjusting them to panic on overflow. | labels: E-easy, T-libs-api, T-libs |
| idrust_116065textAnother(?) 'failed to get layout for...' ICE | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_116079textICE: if_let_guard + mir drop tracking: broken mir | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, A-MIR, C-bug, requires-nightly, -Zvalidate-mir |
| idrust_116095texterror[E0599]: the function or associated item `new` exists for struct `Box<dyn Display>`, but its trait bounds were not satisfied | this compile: ```rs let bp: Box<dyn Display> = Box::new(Point(30, 40)); ``` this compile error: ```rs let bp = Box::<dyn Display>::new(Point(30, 40)); ``` I think they are the same, should all compile. |
| idrust_116100textlazy type alias: type parameters are not considered constrained in impls | Uplifted from https://github.com/rust-lang/rust/issues/112792#issuecomment-1713933644. ```rs #![feature(lazy_type_alias)] #![allow(incomplete_features)] type Faa<A> = Foo<A>; struct Foo<A>(A); impl<A> Faa<A> {} ``` ``` error[E0207]: the type parameter `A` is not constrained by th | labels: T-compiler, C-bug, F-lazy_type_alias |
| idrust_116121text\ syntax gets accepted on stable in cfg-disabled code | The following code builds on stable without even a warning: ```rust #[cfg(any())] auto trait Foo {} ``` That is surprising since there was some effort recently to start ensuring that unstable syntax does not \ into stable Rust, so I expected at least a future-compatibility w | labels: E-easy, E-mentor, T-compiler, C-bug, F-auto_traits, A-auto-traits |
| idrust_116122textTracking issue for `const_patterns_without_partial_eq` lint | We used to (accidentally) accept some constants in patterns that don't even implement `PartialEq`. This is an accident and we'd like to hard-reject all such cases in the future. This lint catches those cases. Relevant PRs: - https://github.com/rust-lang/rust/pull/115893: lint imp | labels: C-tracking-issue |
| idrust_116130text`todo!` documentation should mention optional format arguments | ### Location https://doc.rust-lang.org/std/macro.todo.html ### Summary The documentation of the `todo!` macro currently does not mention at all that it also accepts optional format arguments, for example: ```rust todo!(\, 1); ``` Other macros like `unimplemented!` at leas | labels: A-docs, T-libs |
| idrust_116135textRPITIT refinement lint false positive when HRTB is involved | ### Code ```Rust #![feature(return_position_impl_trait_in_trait)] pub trait Tr<T> { fn foo() -> impl for<'a> Tr<&'a Self>; } impl<T> Tr<T> for () { fn foo() -> impl for<'a> Tr<&'a Self> {} } ``` ([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gis | labels: A-diagnostics, T-compiler, F-return_position_impl_trait_in_trait |
| idrust_116137texterror: could not compile `packed_simd_2` (lib) due to 6 previous errors | I am using microsoft/Spartan and when building the following errors occur: Compiling packed_simd_2 v0.3.8 error: unrecognized platform-specific intrinsic function: `simd_shuffle2` --> /home/aly/.cargo/registry/src/index.crates.io-6f17d22bba15001f/packed_simd_2-0.3.8/src/codegen/l |
| idrust_116141textgeneric `OpaqueCast` causes `elaborate_drops` ICE | ```rust #![feature(type_alias_impl_trait)] fn foo<T>(x: T) { type Opaque<T> = impl Sized; let foo: Opaque<T> = (x,); let (a,): (T,) = foo; } fn main() { foo::<u32>(1); } ``` this should compile, but results in ``` error: internal compiler error: /rustc/37390d65636dd67e263753a3c04 | labels: I-ICE, T-compiler, C-bug, F-type_alias_impl_trait |
| idrust_116155textWrong `help` message for `Vec::resize_with` calls that constrain the `Vec` to a wrong type | ### Code ```Rust struct S { xs: Vec<usize> } fn main() { let mut xs = Vec::new(); xs.resize_with(42, || true); S { xs }; } ``` ### Current output ```Shell error[E0308]: mismatched types --> <source>:6:9 | 5 | xs.resize_with(42, || true); | -- ------- this argument has type `[clos | labels: A-diagnostics, T-compiler, D-invalid-suggestion |
| idrust_116164textSuggestion to import item via `pub use X as _` re-export, which doesn't work | ### Code ```Rust #![allow(unused_imports)] mod inner { pub enum Example { ExOne, ExTwo, } } mod reexports { pub use crate::inner::{ Example as _, }; } use crate::reexports::*; fn check() { ExOne; } ``` ### Current output ```Shell error[E0425]: cannot find value `ExOne` in this sc | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-papercut, D-invalid-suggestion"} |
| {"id": "rust_116165", "text": "documentation for fmt binary trait: slightly misleading example | ### Location https://doc.rust-lang.org/std/fmt/trait.Binary.html Specifically the last assert in the Examples section: `assert_eq!( format!(\"l as binary is: {l:#032b}\"), \"l as binary is: 0b000000000000000000000001101011\" );` ### Summary This example shows how to format the binary | labels: A-docs, T-libs"} |
| {"id": "rust_116171", "text": "Make coverage robust against MIR optimizations removing all counter-increment statements | When coverage instrumentation and MIR opts are both enabled, coverage relies on two assumptions: - MIR opts that would delete `StatementKind::Coverage` statements instead move them into bb0 and change them to `CoverageKind::Unreachable`. - MIR opts won't delete all `CoverageKind: | labels: T-compiler, A-mir-opt, A-code-coverage |
| idrust_116177text64 bit shift is broken in nightly build for MIPS | I tried this code: ```rust const SHIFTVALUE : i64 = 10000000000i64; fn main() { fn shiftleft(a : i64, b : i64) -> i64 { a << b } assert_eq!(shiftleft(black_box(SHIFTVALUE), black_box(2)), SHIFTVALUE << 2); } ``` Nightly fails running on MIPS emulator assertion `left == right` fai | labels: A-LLVM, P-medium, O-MIPS, T-compiler, I-unsound, C-bug |
| idrust_116179textScoped thread implicit join completes before thread-locals are dropped | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> When a scoped thread is **_implicitly_** joined, the destructors of thread-local variables are not guaranteed to have comp | labels: A-thread-locals, C-bug, T-libs, A-thread |
| idrust_116180textError recovery after errors during macro expansion is usually futile | ### Code ```Rust // https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=13d58799822d542a2c53296f715ac44c macro_rules! define { (enum $name:ident) => { struct $name {} }; } define! { struct Hello } fn main() { Hello; } ``` ### Current output ```Shell error: no | labels: A-diagnostics, A-macros, T-compiler, E-medium, D-verbose |
| idrust_116186textICE: `expected usize, got UnevaluatedConst` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-generic_const_exprs |
| idrust_116203textTracing warning with invalid expansion | ```rust extern \ { thread_local! { static FOO: u32 = 0; } } ``` This is of course invalid, thread_local expands to a static item with an initializer. ```rust WARN rustc_errors::emitter Invalid span src/main.rs:4:12: 110:22 (#15), error=DistinctSources(DistinctSources { begin: ( | labels: A-diagnostics, A-macros, T-compiler, C-bug |
| idrust_116206textaarch64-apple-ios-sim target doesn't set cfg(target_env = \"sim\") | I tried to identify iOS devices (not simulators) with the following `cfg` attribute: ```rust #[cfg(all(target_os = \"ios\", target_arch = \"aarch64\", not(target_env = \"sim\"))) ``` This is to distinguish the `aarch64-apple-ios` and `aarch64-apple-ios-sim` targets (the latter promoted | labels: C-bug"} |
| {"id": "rust_116212", "text": "ICE: gvn: `node .. is not reachable` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-never_type, A-mir-opt"} |
| {"id": "rust_116226", "text": "Tracking Issue for `{u8,i8,...}::isqrt` | <!-- 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 process. In that case, y | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period"} |
| {"id": "rust_116235", "text": "`String::push` is slow | An alternative [implementation](https://rust.godbolt.org/z/enG5eP3eT) of `String::push`, which reserves space if needed and then performs `push_unchecked`, gives a significant performance improvement. current `push`: ``` test bench_push_1_byte ... bench: 10,927 ns/iter (+/- 147) | labels: I-slow, T-libs, A-str, C-optimization"} |
| {"id": "rust_116242", "text": "Code no longer compiles after -Zdrop-tracking-mir was enabled by default | Some code that used to compile no longer does after #107421. We don't think was ever *supposed* to compile. Don't have an MCVE yet. Snippet: ```rust let selecting_fut = selecting .do_selecting( &client_config, &test_socket_provider, &mut rng, &time, &mut stop_receiver, ) .fuse(); | labels: T-compiler, regression-from-stable-to-beta, C-bug, A-async-await, AsyncAwait-Triaged, P-critical"} |
| {"id": "rust_116243", "text": "Survey: Open-Source Documentation for Newcomers | Hello Rust Community! We are researchers from George Mason University in the United States, looking for open-source contributors to participate in our survey on open-source software (OSS) project documentation use when onboarding. If you are 18 or older and contributed to an OSS | labels: C-discussion"} |
| {"id": "rust_116252", "text": "Make diff conflict marker error higher priority than unclosed delimeter | I tried this code: ```rust mod tests { #[test] <<<<<<< HEAD fn test1() { ======= fn test2() { >>>>>>> 7a4f13c blah blah blah } } ``` I expected to see this happen: *explanation* `error: encountered diff marker` Instead, this happened: *explanation* `error: this file contains an u | labels: E-hard, A-diagnostics, A-parser, T-compiler, C-bug, D-terse"} |
| {"id": "rust_116255", "text": "query stack during panic | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \"Rust Bug Minimization Patterns\" for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, S-needs-repro"} |
| {"id": "rust_116265", "text": "ICE: `'discriminant' called on unexpected type Alias(Opaque` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-type_alias_impl_trait"} |
| {"id": "rust_116285", "text": "Problem with build infrastucture after 4ea90af70f2211fb07a5b722f21850ce99f06cf8 commit | I'm getting verification error during build rust compiler: ``` > ./x.py build && ./x.py install downloading https://static.rust-lang.org/dist/2023-08-22/rust-std-beta-x86_64-unknown-linux-gnu.tar.xz ################################################################################# | labels: T-bootstrap |
| idrust_116291textAttempt to read from stolen value with -Zmir-enable-passes=+Inline, but not -Zinline-mir | ### Code ```Rust fn main() { let func = || 123u8; func(); } ``` ``` rustc +nightly -Zmir-opt-level=0 -Zmir-enable-passes=+Inline ``` ### Meta <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --> | labels: I-ICE, T-compiler, C-bug, A-mir-opt, A-mir-opt-inlining"} |
| {"id": "rust_116293", "text": "duplicate note on `platform_intrinsics` feature gate | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(platform_intrinsics)] pub fn main() {} ``` note the duplicate ` = note: using it is | labels: A-diagnostics, T-compiler, C-bug"} |
| {"id": "rust_116294", "text": "MIR opts ICE or not depending on file name being compiled | While trying to build a test for https://github.com/rust-lang/rust/issues/116291, I renamed my test file and it stopped ICEing. I have no idea what's happening here. Create a file with this contents called `demo.rs` ```rust fn main() { let func = || 123u8; func(); } ``` Then ``` | labels: T-compiler, C-bug |
| idrust_116303textICE: `symbol_names: unsupported constant of type 'str'`, `-Cinstrument-coverage` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-code-coverage, F-adt_const_params |
| idrust_116306textICE: assertion failed: !hidden_types.has_erased_regions() | I might be able to `git bisect` this tomorrow, unfortunately cargo-bisect-rustc can't help because this is a debug assertion. ```Rust cargo +stage1 install cargo-nextest --force ``` Starts at least on this commit: ``` ca62d2c445628587660ae48013f460b08b1f5552 ``` ### Error output | labels: I-ICE, T-compiler, C-bug, T-types, requires-debug-assertions"} |
| {"id": "rust_116308", "text": "ice: `Const::from_anon_const: couldn't lit_to_const TypeError` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-adt_const_params, S-bug-has-test |
| idrust_116321textice: stack overflow | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-crash, I-ICE, T-compiler, C-bug |
| idrust_116324textTracking Issue for `ptr::addr_eq` | <!-- 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 process. In that case, y | labels: T-lang, T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period |
| idrust_116332textICE: broken MIR with `type_alias_impl_trait` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_116333textICE: \ on tantivy v0.21 in release mode | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, regression-from-stable-to-nightly, P-high, T-compiler, C-bug |
| idrust_116334textdecl_macro. no field `0` on type. a field with a similar name exists: `0` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: https://github.com/planetoryd/rust_bug_missing_field ```rust #![feature(decl_macro)] make_struct!(Uh); | labels: A-diagnostics, T-compiler, A-decl-macros-2-0, F-decl_macro, D-confusing, D-incorrect |
| idrust_116335textBad diagnostics using ? operator on Option<Cow<'_, str>> [E507] | ### Code ```Rust use std::borrow::Cow; struct Foo<'a> { list: Vec<Bar<'a>>, } impl<'a> Foo<'a> { fn bar(&self) -> Option<String> { Some(self.list.first()?.inner?.into_owned()) } } struct Bar<'a> { inner: Option<Cow<'a, str>>, } ``` ### Current output ```Shell error[E0507]: cannot | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics, D-invalid-suggestion"} |
| {"id": "rust_116339", "text": "Rust does not specify IEEE 754 rounding mode for signed zero | ### Location https://doc.rust-lang.org/std/primitive.f32.html ### Summary The Rust documentation on `f32` states (emphasis mine): > When the number resulting from a primitive operation (addition, subtraction, multiplication, or division) on this type **is not exactly representabl | labels: T-lang, A-docs"} |
| {"id": "rust_116348", "text": "Cross compilation errors for x86_64-unknown-linux-musl from v1.72 | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code The cargo buil | labels: A-linkage, O-musl, C-bug, E-needs-bisection, regression-untriaged"} |
| {"id": "rust_116377", "text": "Unable to put trait bound on associated type in generic method in trait with its own associated type | I'm trying to get the following to compile. ```rust pub trait MyTryFrom<T> { type Error; } pub trait Foo { type FooType; fn foo<E>(x: Self::FooType) -> E where E: MyTryFrom<Self::FooType>, E::Error: Sized; } struct MyFoo; impl Foo for MyFoo { type FooType = MyFooType; fn foo<E>(x | labels: A-trait-system, A-associated-items, T-compiler, C-bug, fixed-by-next-solver |
| idrust_116382textICE when building regex-syntax with -Zvalidate-mir | ### Code Build regex-syntax-0.7.5 (or any crate that uses regex, which is a lot) with `-Zvalidate-mir`. ### Meta <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --> `rustc --version --verbose`: | labels: I-ICE, T-compiler, C-bug, S-has-mcve"} |
| {"id": "rust_116383", "text": "ICE: nested return types | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_116397", "text": "Unable to build LLVM with clang on master/stable 1.73 | ### Build steps I tried this code: ```bash ./configure --enable-llvm-static-stdcpp --enable-optimize-llvm --enable-clang --set llvm.ninja=false --enable-lld ./x.py build src/llvm-project/ src/llvm-project/lld ``` #### LLVM configuration options > running: cd \"/rust/build/x86_64-u | labels: P-low, regression-from-stable-to-stable, T-bootstrap, C-bug"} |
| {"id": "rust_116398", "text": "forcing unstable flags during bootstrap does not work | `RUSTC_BOOTSTRAP=1 RUSTFLAGS=\"-Zvalidate-mir\" ./x.py check` ``` Building bootstrap error: failed to run `rustc` to learn about target-specific information Caused by: process didn't exit successfully: `/home/matthias/.cargo/bin/sccache /home/matthias/vcs/github/rust/build/x86_64-u | labels: T-bootstrap, C-bug |
| idrust_116403textrustc attempts to load non-existent PDB during `delay_span_bug()` | At various points, rustc may use `std::backtrace::Backtrace::capture()` to get a backtrace of the current thread such as if `delay_span_bug()` or similar functions are called. On Windows, this results in `dbghelp.dll` attempting to load the hardcoded path of rustc's PDB which, on | labels: O-windows, A-debuginfo, C-enhancement, T-compiler"} |
| {"id": "rust_116418", "text": "rustc panic | ### Code ```Rust cargo install adder-viz ``` ### Meta `rustc --version --verbose`: ``` rustc 1.72.1 (d5c2e9c34 2023-09-13) binary: rustc commit-hash: d5c2e9c342b358556da91d61ed4133f6f50fc0c3 commit-date: 2023-09-13 host: x86_64-unknown-linux-gnu release: 1.72.1 LLVM version: 16.0 | labels: I-ICE, T-compiler, C-bug, E-needs-mcve"} |
| {"id": "rust_116425", "text": "ICE: unstable -Z drop-tracking + labeled loop | ### Code ```Rust async fn f() { 'a: { break 'a; } } fn main() { } ``` ### Meta <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --> `rustc --version --verbose`: ``` rustc 1.74.0-nightly (35e4163 | labels: I-ICE, T-compiler, C-bug |
| idrust_116433textError output is spuriously truncated | Running from [this commit](https://github.com/google/zerocopy/commit/d1c1541d97bae03474c4464a389f3aea9b7c46ed), I get [this unexpected GitHub Actions failure](https://github.com/google/zerocopy/actions/runs/6411470438/job/17407059827?pr=183). The source of the failure is that the |
| idrust_116434textE0412 is correct but E0782 is emitted (in trait definitions) | ### Code ```Rust trait Foo { type Clone; fn foo() -> Clone } ``` ### Current output ```Shell error[E0782]: trait objects must include the `dyn` keyword --> src/main.rs:4:17 | 4 | fn foo() -> Clone; | ^^^^^ | help: add `dyn` keyword before this trait | 4 | fn foo() -> dyn Clone; | | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics |
| idrust_116440text`mips64` crashes or hangs on 128 bit division | This target either crashes or hangs with different arguments to a 128 bit division ```rust #[inline(never)] fn test(x: u128, y: u128) -> u128 { x.wrapping_div(y) } fn main() { dbg!(test(123 << 64, (32 << 64) | 65)); //dbg!(test(1 << 96, 1 << 64)); } ``` this happens with `cross r | labels: A-LLVM, O-MIPS, T-compiler, I-unsound, C-bug |
| idrust_116459textICE when `pin` is unavailable for diagnostic in `no_core`/`no_std` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: A-diagnostics, I-ICE, T-compiler, C-bug |
| idrust_116464textIncorrect suggestion to define associated type in type parameter list | ### Code ```Rust pub trait One<T> { type Assoc; } impl<T, S> One<T, S> for () {} ``` ### Current output ```Shell error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied --> src/lib.rs:5:12 | 5 | impl<T, S> One<T, S> for () {} | ^^^ expected 1 generic ar | labels: A-diagnostics, A-associated-items, T-compiler, A-suggestion-diagnostics, D-invalid-suggestion |
| idrust_116473textICE: E0109: `suggestion must not have overlapping parts` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: A-diagnostics, I-ICE, T-compiler, C-bug, requires-debug-assertions |
| idrust_116491texttvOS unresolved import `crate::sys::thread_local_dtor::register_dtor` | Over in https://github.com/rust-lang/rust/pull/104385, [`register_dtor` was added for iOS and watchOS but not tvOS](https://github.com/rust-lang/rust/blob/64fa0c34d7cb1a2d522414ab2c87024e465bd613/library/std/src/sys/unix/thread_local_dtor.rs#L70). My test cases: ```rust fn main() | labels: C-bug, O-tvos |
| idrust_116495textDoctests sometimes being executed from different working directories | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: A example workspace had to be created: https://github.com/Carter12s/bug-repo I expected to see this hap | labels: C-bug |
| idrust_116502textAssertion fail in debug mode | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-debug-assertions |
| idrust_116504textlinking with lld causes product sigsegv on ubuntu 22.04 | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() { println!(\); } ``` I expected to see this happen: `exit code 0` Inste | labels: C-bug, E-needs-mcve |
| idrust_116513textice: `slices are not scalars` | File: `./tests/ui/consts/issue-67696-const-prop-ice.rs` mvce: ````rust trait A { fn foo(&self) -> Self where Self: Copy; } impl A for [fn(&())] { fn foo(&self) -> Self where Self: Copy, { *(&[] as &[_]) } } fn main() {} ```` original: ````rust // check-pass // compile-flags: --em | labels: I-ICE, T-compiler, C-bug |
| idrust_116516text`#[target_feature(enable = \)]` does not work properly on 1.73, but work fine on 1.72.1 | ### Code I tried this code on 1.73: ```rust use std::arch::wasm32::*; #[target_feature(enable = \)] fn foo() { const FOO: v128 = i8x16(0, 1, -1, -1, -1, -1, -1, -1, 2, 3, -1, -1, -1, -1, -1, -1); println!(\, FOO); } fn main() { foo(); } ``` Compiled it with `cargo bu | labels: P-medium, C-bug, regression-untriaged |
| idrust_116523textOpenBSD socket address is padded with zeroes | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code on my Linux machine: ```rust use std::os::unix::net::UnixListener; fn main() { let listener = UnixListen | labels: O-openbsd, C-bug, T-libs, A-io |
| idrust_116524textI seem to have noticed a problem with the clarity of error messages for syntax like `pub(in simplepath::method) struct`. | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_116525textICE: `Ok([Binder { ... }` is not fully resolved | [rustc-ice-2023-10-08T05:52:57.573161602Z-313198.txt](https://github.com/rust-lang/rust/files/12839887/rustc-ice-2023-10-08T05.52.57.573161602Z-313198.txt) <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can r | labels: I-ICE, T-compiler, C-bug, F-async_fn_in_trait, S-has-mcve |
| idrust_116538textbootstrap sets `-Zunstable-options` on \ but not \, leading to build script reruns | When working on Miri I noticed \ gets rebuilt every time I switch between a check-build and actutally running tests. This boils down to `RUSTFLAGS` being different between the two invocations: in check builds it contains `-Zunstable-options` but in test builds it | labels: T-bootstrap, C-bug |
| idrust_116544textAdd contributors section in readme.md file | I want to add the list of contributers in the Readme.md file. And also add a \ button at the bottom of readme which will scroll to top on clicking. <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${\:\}$$TRIAGEB |
| idrust_116552textmacOS: Building profiler runtime with system clang 15 gives `warning: argument unused during compilation: '-stdlib=libc++'` | On macOS, if I have `profiler = true` in my `config.toml` and I run `x build library`, the build succeeds but I see dozens of console warnings: ``` warning: clang: warning: argument unused during compilation: '-stdlib=libc++' [-Wunused-command-line-argument] ``` <details> <summar | labels: O-macos, T-bootstrap, C-bug |
| idrust_116554textICE (Internal Compiler Error) triggered in code with const generics and enum initialization | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> I got thi | labels: I-ICE, T-compiler, C-bug |
| idrust_116558textThe `extern \` ABI of SIMD vector types depends on target features (tracking issue for `abi_unsupported_vector_types` future-incompatibility lint) | The following program has UB, for very surprising reasons: ```rust use std::mem::transmute; #[cfg(target_arch = \)] use std::arch::x86::*; #[cfg(target_arch = \)] use std::arch::x86_64::*; extern \ fn no_target_feature(_dummy: f32, x: __m256) { let val = unsafe { tra | labels: T-compiler, I-unsound, A-SIMD, C-tracking-issue, F-simd_ffi, A-ABI |
| idrust_116562text`rustc` cannot find crate if different target is used | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I have a self build of `rust 1.73.0` on `ARM/Linux` configured to include two targets: * `armv7-unknown-linux-gnueabihf` ( | labels: requires-custom-config |
| idrust_116567text1.74.0 crater runs | Note: Please do not conduct triage on these runs without discussing how to do so with a release team member first. Thanks! | labels: S-waiting-on-review, T-release |
| idrust_116582text`datetime` tests fail in release mode since 1.73 on powerpc64le | The [datetime](https://github.com/rust-datetime/datetime) tests have regressed on Fedora `ppc64le` since upgrading to Rust 1.73.0, and I can also reproduce this on `rustup` toolchains. https://koschei.fedoraproject.org/build/16447830 I expected to see this happen: all tests pass | labels: A-LLVM, P-high, T-compiler, regression-from-stable-to-stable, I-unsound, O-PowerPC |
| idrust_116587textCode suggestion for derive when struct is defined in another file | ### Code main.rs ```Rust mod my_mod; fn main() { let res = my_mod::MyStruct::new(\.to_string()); eprintln!(\, res); res.say(); } ``` my_mod.rs: ```rust pub struct MyStruct { my_str: String, } impl MyStruct { pub fn new(my_str: String) -> Self { Self { my_s | labels: A-diagnostics, T-compiler |
| idrust_116592textTracking Issue for `no-jump-tables` | This is a tracking issue for the `-Zno-jump-tables` compiler flag ### About tracking issues Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking i | labels: T-compiler, C-tracking-issue, A-CLI |
| idrust_116599textCompiler Error while trying to prototype a workaround for const methods in traits | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, E-needs-test, T-compiler, C-bug, S-has-mcve |
| idrust_116604text`unreachable_pub` false negative when an unreachable type is mentioned in a type alias | I tried this code: ```rust #![deny(unreachable_pub)] mod foo { pub enum FooError {} pub type FooResult<T> = Result<T, FooError>; } pub use foo::FooResult; ``` I expected an `unreachable_pub` lint because `FooError` is unreachable. Instead, there is no diagnostic output. The `FooE | labels: A-lints, A-visibility, T-compiler, C-bug, L-unreachable_pub |
| idrust_116608textCompiler error for if/let chaining when not using it inside a map closure syntax error | ### Code ```Rust fn main() { vec![].into_iter().map({ |x| let y = x; y }) } ``` ### Current output ```Shell error[E0658]: `let` expressions in this position are unstable ``` ### Desired output ```Shell Something related to `map({ |x|` is a syntax error and should be `map(|x| {` ` | labels: A-diagnostics, T-compiler |
| idrust_116615textProvide context when type error happens due to different fn arguments with the same type parameter are called with different types | ### Code ```Rust fn main() { foo(1, 2.); } fn foo<T>(a: T, b: T) {} ``` ### Current output ```Shell error[E0308]: mismatched types --> src/main.rs:2:12 | 2 | foo(1, 2.); | --- ^^ expected integer, found floating-point number | | | arguments to this function are incorrect | note: | labels: A-type-system, A-diagnostics, T-compiler, D-newcomer-roadblock, D-terse"} |
| {"id": "rust_116616", "text": "E0277 should use short paths when possible | Type errors (and others) use `tcx.short_ty_string` and similar to write types that are too long to disk, so the cli output is easier to read. Trait bound errors do not do that. https://twitter.com/ceccon_me/status/1707741832824734186 <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN | labels: E-easy, A-diagnostics, T-compiler, D-papercut, D-verbose |
| idrust_116626textcargo relies on unknown crate type warnings to detect if a target supports crate types, which can be suppressed by `-Awarnings` and thus break cargo's detection | When compiling a Rust project for the `wasm32-unknown-unknown` target with the `-Awarnings` flag, the following error is encountered: ```rust error: output of --print=file-names missing when learning about target-specific information from rustc command was: `.../.rustup/toolchain | labels: T-compiler, T-cargo, C-bug, A-CLI"} |
| {"id": "rust_116629", "text": "Weird `<const host: bool = true>` generics popping in beta docs | Examples include: - https://doc.rust-lang.org/beta/core/ptr/struct.NonNull.html#method.dangling - https://doc.rust-lang.org/nightly/core/cell/struct.OnceCell.html#method.new - Most of https://doc.rust-lang.org/nightly/core/net/struct.Ipv6Addr.html This is probably related to the | labels: T-rustdoc, C-bug, F-effects"} |
| {"id": "rust_116631", "text": "`overflowing_literals` error not triggered in `format_args` for integer literal with default formatting | ### Code ```Rust println(\"{}\", 0xffff_ffff_u8); // Simplest case std::io::stdout().write_fmt(format_args!(\"{}\\n\", 0xffff_ffff_u8)); ``` ### Current output ```Shell No error, program compiles and prints `4294967295` ``` ### Desired output ```Shell overflowing_literals lint should | labels: A-lints, T-compiler, regression-from-stable-to-stable, C-bug, A-fmt"} |
| {"id": "rust_116634", "text": "Add Some Documentation on how to Package a Custom Distribution | ### Location https://rust-lang.github.io/rustup/concepts/toolchains.html#custom-toolchains ### Summary There is some really good documentation out there on how to build a toolchain, modify and test it. I am currently looking into running some LLVM plugins with Rust, requiring me | labels: A-docs"} |
| {"id": "rust_116638", "text": "rustc ice | <!-- 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-patterns/ --> ### Code | labels: A-resolve, I-ICE, T-compiler, C-bug, S-needs-repro"} |
| {"id": "rust_116639", "text": "Inconsistent lifetime inference when using `impl Trait` reference in function return position | Given that this is using an unstable feature, I'm not sure if a bug report is appropriate, but I thought it might be useful information for those working on #99697. I tried this code: ```rust #![feature(return_position_impl_trait_in_trait)] pub trait A<'a, Q: P<'a>>: Sized { fn m | labels: C-bug, F-return_position_impl_trait_in_trait |
| idrust_116646textRust Vec::push is not O(1)? | Let me preface and say this problem is super weird & doesn't make sense to me. I'm hoping I didn't make some stupid mistake in the benchmark code (I tried to account & make sure there's no realloc happening on `push`). I tried this code: ```rust use criterion::{criterion_group, c |
| idrust_116657textICE: `the loans out of scope must be the same as the borrows out of scope` | File: /tmp/F/491D45FF6373EF099BE38CA3B5E5458695A8A45DABFC75AABDAC9D34FE1EC1BC.rs reduced: ````rust trait Callable { type Output; fn call(x: Self) -> Self::Output; } trait PlusOne {} impl<'a> PlusOne for &'a mut i32 {} impl<T: PlusOne> Callable for T { type Output = impl PlusOne; | labels: I-ICE, T-compiler, C-bug, NLL-polonius |
| idrust_116658textICE: `Node. . cannot be placed in TypeckResults with hir_owner` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_116659textwrong exit code after ICE | found while checking https://github.com/rust-lang/rust/issues/116658 with ``` rustc 1.75.0-nightly (c1691db36 2023-10-11) binary: rustc commit-hash: c1691db366c0f2e2341c60377c248ca2d9335076 commit-date: 2023-10-11 host: x86_64-unknown-linux-gnu release: 1.75.0-nightly LLVM versio | labels: P-medium, regression-from-stable-to-nightly, T-compiler, C-bug, A-panic |
| idrust_116662textICE rustc 1.73.0 in compiler/rustc_metadata/src/rmeta/decoder.rs:1174:17 const generic trait | ### Code https://github.com/jordens/rust-ice-trait-mcve * `lib.rs`: ```Rust pub trait TreeKey<const Y: usize = 1> { fn metadata() { unimplemented!() } } impl<T, const N: usize> TreeKey for [T; N] {} ``` * `bin/mcve.rs`: ```Rust use mcve::TreeKey; pub fn main() -> () { <[(); 0] as | labels: I-ICE, T-compiler, C-bug |
| idrust_116664textinternal compiler error: forcing query with already existing `DepNode` | ### Code Can't really provide anything here, happened with `https://github.com/iotaledger/iota-sdk/pull/1421/commits/029437659994d033ea4693a6aaba642f19a88c0c` but also after undoing the changes ### Meta `rustc --version --verbose`: ``` rustc 1.73.0 (cc66ad468 2023-10-03) binary: | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_116668", "text": "rustc crashes with segmentation fault in 1.73.0 | When I compile a project with rust 1.73.0 on linux, I get a segmentation fault error. When I compile it with 1.72.1 all is well. How to reproduce on linux ``` git clone https://github.com/qdrant/qdrant.git cd qdrant/ cargo +1.73.0 build --release --no-default-features --features | labels: I-crash, A-LLVM, P-high, T-compiler, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_116673", "text": "Different behavior for --cfg debug_assertions versus -C debug_assertions | The following two commands have different behavior: 1. `RUSTFLAGS=\"--cfg debug_assertions\" cargo run --release` 2. `RUSTFLAGS=\"-C debug_assertions\" cargo run --release` **1** does not enable integer overflow checks (and alignment checks), while **2** does. The [rustc Codegen docs | labels: C-enhancement, A-diagnostics, T-compiler"} |
| {"id": "rust_116674", "text": "MacOS: Linker does not find library when using `-l static:+verbatim=libcpp.a` | See this Meson CI issue: https://github.com/mesonbuild/meson/actions/runs/6499337052/job/17652499429?pr=12367#step:7:6244 rustc 1.72.1 ``` [2/3] rm -f libcpp.a && llvm-ar csrD libcpp.a libcpp.a.p/lib.cpp.o [3/3] rustc -C linker=cc --color=always -C debug-assertions=yes -C overflo | labels: A-linkage, O-macos, T-compiler"} |
| {"id": "rust_116678", "text": "CI scripts can't be run locally anymore? | I'm trying to run `test-various` locally, because it seems like that's the test suite that often holds me up whenever I try to merge a MIR optimization change. But when I try to run the entrypoint script, something isn't set up right: ``` ╰ ➤ bash src/ci/run.sh test-various ::gro"} |
| {"id": "rust_116682", "text": "compile for openharmony toolchain fail | I tried this code: for openharmony platform: ```rust /// just hello world 1 fn main() { 2 let x = vec![0u8, 1, 2, 3, 4]; 3 for i in x { 4 println!(\"this is {}\", i); 5 } 6 println!(\"Hello, world!\"); 7 } ``` the config.toml is ```toml [target.aarch64-linux-ohos] ar = \"/home/user/oh | labels: C-bug"} |
| {"id": "rust_116684", "text": "ICE: no errors encountered even though `delay_span_bug` issued (regression on 2023-10-12) | <!-- 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-patterns/ --> Can be re | labels: I-ICE, T-compiler, C-bug, F-type_alias_impl_trait, requires-nightly"} |
| {"id": "rust_116686", "text": "called `Result::unwrap()` on an `Err` value: NormalizationFailure | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_116698", "text": "Compiling rustc fails: `output of --print=file-names missing when learning about target-specific information from rustc` | ``` $ git clone https://github.com/rust-lang/rust $ cd rust $ cp config.example.toml config.toml $ ./x.py build [ ... ] Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`) Building stage1 library artifacts (x86_64-unknown-linux-gnu) error"} |
| {"id": "rust_116703", "text": "Suggested fix doesn't work in error [E0034] | ### Code ```Rust trait A { fn foo(&self); } trait B { fn foo(&self); } struct S; impl A for S { fn foo(&self) {} } impl B for S { fn foo(&self) {} } fn main() { let s = S; S::foo(&s); } ``` ### Current output ```Shell help: disambiguate the method for candidate #1 | 21 | <&S as A | labels: A-diagnostics, T-compiler |
| idrust_116710textice: `unknown alias DefKind: AnonConst` | File: /tmp/F/1a095d17cdade179e5022f95e67027ae90704896.rs auto-reduced (treereduce-rust): ````rust #![feature(generic_const_exprs)] struct Uwu<const N: u32 = 1, const M: u32 = u8>; trait Trait {} impl<const N: u32> Trait for Uwu<N> {} impl<const N: u32> Trait for Uwu<N> {} ```` or | labels: I-ICE, T-compiler, C-bug, F-generic_const_exprs |
| idrust_116711textSocketAddrV6 Ord and Eq disagree with each other | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: https://play.rust-lang.org/?version=stable&mode=release&edition=2021&gist=5c3bc19334a7cf61d10517e874f8c | labels: C-bug, T-libs |
| idrust_116718textBug-> rust/library/alloc/src/collections/btree /node.rs | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Summary I am testing a new board [esp32-c6](https://www.espressif.com/en/products/socs/esp32-c6) our target is riscv32imac | labels: C-bug |
| idrust_116721textICE: `slices are not scalars` II | File: /tmp/icemaker/033b7887410cef9d40e915f3b66f44d747d3e0d2.rs https://github.com/rust-lang/rust/issues/116513 season two auto-reduced (treereduce-rust): ````rust fn hey<T>(it: &[T]) where [T]: Clone, { } fn main() {} ```` original: ````rust // compile-flags: -Z mir-opt-level=0 | labels: I-ICE, T-compiler, C-bug, A-mir-opt, S-bug-has-test, fixed-by-next-solver |
| idrust_116729text`\.split('.')` in build.rs with `-Cremark=all` causes compiler segfault on ARM | ```sh cargo new --bin foo cd foo echo \\\\ >build.rs RUSTFLAGS=\ cargo +nightly build --release ``` - on M1 macOS (ARM) results in ```sh note: /rustc/.../library/core/src/str/pattern.rs:546:9 gisel-legalize (missed): unab | labels: I-crash, A-LLVM, E-needs-test, O-Arm, T-compiler, C-bug |
| idrust_116736textbroken mir while bootstrapping ra `hir-ty` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, A-MIR, C-bug, A-mir-opt, A-mir-opt-inlining |
| idrust_116747textMisleading warning about argument not being used | Hi, I've created a repository class that can retrieve the password for a user by passing the `user_id`. ```rust fn get_password_by_user_id(&mut self, user_id: i32) -> Option<Password> { use crate::adapters::schema::credentials::dsl::*; credentials .filter(user_id.eq(user_id)) .fi | labels: C-bug"} |
| {"id": "rust_116749", "text": "Trait bounds of associated types in `where` clauses result in unsatisfied requeriments | Feel free to close if duplicated. ```rust pub trait Foo<TY> { type FooAssociatedTy; } pub trait Bar { type BarAssociatedTy; fn send<T>() where T: Foo<Self::BarAssociatedTy>, T::FooAssociatedTy: Send; } impl Bar for () { type BarAssociatedTy = (); fn send<T>() where T: Foo<()>, T: | labels: A-trait-system, A-associated-items, T-compiler, C-bug, A-lazy-normalization, fixed-by-next-solver"} |
| {"id": "rust_116759", "text": "Spurious tests/ui/panics/default-backtrace-ice.rs failures | ``` ---- [ui] tests/ui/panics/default-backtrace-ice.rs stdout ---- diff of stderr: 7 8 aborting due to `-Z treat-err-as-bug=1` - (end_short_backtrace) 11 (begin_short_backtrace) 12 (end_short_backtrace) 13 (begin_short_backtrace) --- ``` The error has been seen on x86_64-apple-2 | labels: T-compiler, C-bug, A-CI, A-panic, A-backtrace, I-flaky-test"} |
| {"id": "rust_116765", "text": "Static lifetime requirement in boxed trait object (`Box<dyn Trait>`) is not clearly explained | ### Code ```Rust struct Factory<'a> { value: &'a usize, } impl<'a> Factory<'a> { fn generate(&self) -> Box<dyn std::fmt::Debug + 'a> { Box::new(Value { value: self.value }) } } struct Owner { value: Box<dyn std::fmt::Debug> } #[derive(Debug)] struct Value<'a> { value: &'a usize, | labels: A-diagnostics, A-lifetimes, A-borrow-checker, T-compiler, D-terse, A-dyn-trait |
| idrust_116766textAdding non_exhaustive should disable missing_copy_implementations | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I have the following minimal example: ```rust #![deny(missing_copy_implementations)] #[derive(Clone)] pub enum MyEnum { A, | labels: E-easy, A-lints, T-compiler, C-bug |
| idrust_116779textInternal Compiler Error: Compiler Crashes Upon Recursive Call From JSON-RPC Server Code to Client's code. | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_116780", "text": "Endless Compilation when Successive Calling to `map` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> `cat hang.rs` ```rust #![crate_type = \"lib\"] #[no_mangle] pub fn get_len() -> usize { [1, 2, 3].iter(|x| x).map(|x| x).map | labels: I-compiletime, T-compiler, C-bug"} |
| {"id": "rust_116781", "text": "ice: `Mismatched open/close delims` | File: /tmp/im/4E62E62441812AD57206CF6AE50F4E62991CAC86A8E1D805B18CC629F7D6C5AA.rs auto-reduced (treereduce-rust): ````rust macro_rules! make_struct { ($name:ident) => { #[derive(Debug)] struct Foo { #[cfg] field: fn(T::B($id1), T::B($id2)), } }; } make_struct!(param_name); ```` o | labels: I-ICE, A-parser, T-compiler, C-bug"} |
| {"id": "rust_116783", "text": "ICE in rustc during MIR construction | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-internal-features"} |
| {"id": "rust_116784", "text": "ICE: rustc panicked at `compiler/rustc_mir_build/src/build/custom/mod.rs:110:40` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, requires-internal-features"} |
| {"id": "rust_116788", "text": "How to link specific crt files |  Rust linker will link crt files from toolchain. I want to link my own crt files. I tried this option `RUSTFLAGS=\"-C target-feature=+crt-static\"`, but not work. this is my .cargo/confi"} |
| {"id": "rust_116789", "text": "RPITIT with GAT fails to enforce `where Self: 'a` bound | The following compiles after the stabilization of RPITIT/AFIT in #115822: ```rust trait Trait { type Gat<'a>; async fn foo(&self) -> Self::Gat<'_>; } ``` but it should require adding `where Self: 'a` bound to `Gat` similar to the non-async version (see #87479): ```rust trait Trai | labels: regression-from-stable-to-nightly, T-compiler, C-bug, T-types"} |
| {"id": "rust_116794", "text": "uncaptured lifetimes required to live as long as the opaque type | The following valid code stopped compiling since v1.67, most likely due to #103491: ```rust fn opaque<'a: 'a>(_: &'a str) -> *mut impl Sized { &mut () } fn main() { let x = opaque(&String::new()); //~ ERROR temporary value dropped while borrowed drop(x); } ``` | labels: P-medium, regression-from-stable-to-stable, A-impl-trait, C-bug, T-types |
| idrust_116796textice: `'ty::Const::eval' called on a non-valtree-compatible type` | File: /home/matthias/vcs/github/glacier2/fixed/icemaker_omni/1405E6412BA4B2706BCE4F1D8CF3AD39F9BF72F26CEA1DE9618621EFF2DB97B1.rs auto-reduced (treereduce-rust): ````rust struct X<const FN: fn() = { || {} }>; ```` original: ````rust struct X<const FN: fn() = { || {} }>; ```` Versi | labels: I-ICE, E-needs-test, T-compiler, C-bug, A-const-eval, A-valtree |
| idrust_116797textCompilation time regression in 1.73 when building the fundsp crate | `1.73` introduced a regression in compilation time when building the [fundsp](https://github.com/SamiPerttu/fundsp) crate. Previously, I could expect a clean build of the crate to take ~22s. Now, compilation hangs for several minutes, I haven't left it running longer than that. I | labels: I-compiletime, P-high, T-compiler, regression-from-stable-to-stable, C-bug"} |
| {"id": "rust_116799", "text": "`-Z unpretty=expanded` leads to invalid syntax for unicode escapes in format strings | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code ([Godbolt link](https://godbolt.org/z/1TWG65ded)): ```rust pub fn main() { println!(\"\\x1B[1mHello, world | labels: T-compiler, E-medium, C-bug"} |
| {"id": "rust_116809", "text": "ICE: no errors encountered even though `delay_span_bug` issued | i am so sorry @estebank this bit in particular looks wrong, probably it needs to omit the colon on windows? ``` warning: the ICE couldn't be written to `C:\\Users\\jyn\\src\\cursed\\rustc-ice-2023-10-16T17:45:34.3766412Z-2188.txt`: The filename, directory name, or volume label syntax | labels: I-ICE, T-compiler, C-bug |
| idrust_116817textcompiler-builtins doesn't link on AVR with debug assertions | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust let val= (5.0 / 1023.0) * i as f32; let out = uFmt_f32::Zero(val); uwriteln!(&mut serial, \"A0 = | labels: A-LLVM, I-slow, T-compiler, O-AVR, -Zfixed-x18, C-optimization"} |
| {"id": "rust_116825", "text": "The seemingly contradictory `#[repr(Rust, C)]` is allowed | `#[repr(Rust)]` is already on beta and will soon hit stable. I just found out that `#[repr(C, Rust)]` successfully compiles while I expected it to error due to contradictory representations. ~~Further, I wonder if `#[repr(Rust, transparent)]` should be allowed? Currently it error | labels: A-attributes, T-lang, T-compiler, C-bug, A-repr"} |
| {"id": "rust_116831", "text": "Dubious `improper_ctypes` firing on recursive non-local containment? | Bindgen allows you to create a \"rustified non-exhaustive enum\" from a C enum. This is used by pgrx-pg-sys for a specific C enum, `NodeTag`, because - NodeTag has a well-defined, finite list of variants for each major version - Despite this, much like a `repr(Rust)` enum, it regul | labels: A-lints, A-FFI, T-lang, T-compiler, C-bug, L-improper_ctypes"} |
| {"id": "rust_116832", "text": "Unreachable overflow checks not optimized out of compiler-builtins i128 conversions | If I drop this code into a `src/main.rs`: ```rust #[no_mangle] fn i128tof32(i: u128) -> f32 { i as _ } #[no_mangle] fn i128tof64(i: u128) -> f64 { i as _ } #[no_mangle] fn f32toi128(i: f32) -> i128 { i as _ } #[no_mangle] fn f64toi128(i: f64) -> i128 { i as _ } ``` Then try to co | labels: A-LLVM, I-slow, T-compiler, I-heavy, llvm-fixed-upstream, C-optimization"} |
| {"id": "rust_116833", "text": "niche optimization cannot be applied to non-power-of-two-sized int | I'd like to be able to apply niche optimizations to irregular integer sizes, e.g. u24 (or [u8;3]), where the niche is the zero pattern for all bytes. That's led me to this ICE. ### Code ```Rust #![feature(rustc_attrs)] #[rustc_layout_scalar_valid_range_start(1)] #[rustc_nonnull_o | labels: T-compiler, C-feature-request, A-layout"} |
| {"id": "rust_116836", "text": "Duplicate `in this macro invocation` labels | ### Code ```Rust enum Enum<T1, T2> { VariantA { _v1: T1, _v2: T2 }, VariantB } type EnumUnit = Enum<(), ()>; macro_rules! test { () => (if let EnumUnit::VariantB::<i32, u32> {} = 5 { true } else { false }); } fn main() { test!(); } ``` ### Current output ```Shell error[E0109]: ty | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_116842", "text": "cargo check does not detect `arithmetic_overflow` | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust fn main() { _ = 2u32 << 32; } ``` I expected to see this happen: the lint `arithmetic_overflow` | labels: C-bug"} |
| {"id": "rust_116857", "text": "Deduplication of functions containing inline assembly contradicts Reference's documentation about code-patching. | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> (I'm not sure if this should be considered a codegen bug (i.e. the Reference is correct) or a documentation bug (i.e. the | labels: A-codegen, A-inline-assembly, T-compiler, C-bug, T-opsem"} |
| {"id": "rust_116860", "text": "rustfmt: Empty where clause is unindented to line start | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Consider this code: ```rust mod foo { fn foo() -> i32 where { } } ``` ([playground](https://play.rust-lang.org/?version=st | labels: C-bug, T-rustfmt"} |
| {"id": "rust_116861", "text": "`RangeInclusive` and `Range` bits are not optimizes a way but also not used in a function | I tried this code: Also godbolt link https://rust.godbolt.org/z/9qs4cTP4v ```rust pub struct MB { addr: u8, } pub fn new(addr: u8) -> Option<MB> { if !(1..=247).contains(&addr) { return None; } Some(MB { addr }) } ``` I expected to see this happen: I was trying this code to see w | labels: I-heavy, C-optimization"} |
| {"id": "rust_116864", "text": "Asssociated type declared in `where` clause is not enforced in type parameter | For some reason `FnMutFut<&'any BAZ::Param, ()>` is not being inferred as `FnMutFut<&'any i32, ()>`, which results in an unsatisfied trait bound error. ```rust use std::future::Future; pub trait Baz { type Param; } pub trait FnMutFut<P, R>: FnMut(P) -> Self::Future { type Future: | labels: A-lifetimes, A-trait-system, A-associated-items, T-compiler, C-bug"} |
| {"id": "rust_116867", "text": "#116787 broke ui-fulldeps on stage1 | Since https://github.com/rust-lang/rust/pull/116787 I ran `x test` with ```toml profile = \"compiler\" change-id = 115898 [llvm] assertions = true download-ci-llvm = true [rust] debuginfo-level = 1 incremental = false debug = false debug-logging = false ``` ``` Testing stage0 compi"} |
| {"id": "rust_116869", "text": "Higher rank lifetimes fails when trying to set closure lifetimes | > I'm having a hard time minimizing this code sample, so sorry in advance. The real issue I'm facing is #111662, so please see [my comment](https://github.com/rust-lang/rust/issues/111662#issuecomment-1767391191) for some context. However, since that issue isn't fixed, I needed a | labels: A-lifetimes, A-closures, A-borrow-checker, T-compiler, C-bug |
| idrust_116873textAdd dynamic libraries in .cargo/config.toml not work | I try to link some dynamic library in .cargo/config.toml with \ ```text [target.aarch64-linux-ohos] ar = \ linker = \ rustflags = [ #\} |
| {: , : } |
| {: , : } |
| {: , : a\map = {:?}\a\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : Dropping Foo\Thread: {:?}\} |
| {: , : } |
| {: , : } |
| {: , : fat\} |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : global target feature\} |
| {: , : } |
| {: , : Ayu\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : compiler\date\2023-08-22\version\beta\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : Examples\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : &&str\& | labels: C-discussion |
| idrust_117053textregression: no variant found in current scope | https://crater-reports.s3.amazonaws.com/beta-1.74-4/beta-2023-10-21/reg/race-client-0.2.2/log.txt ``` [INFO] [stdout] error[E0599]: no variant or associated item named `new_for_answer` found for enum `race_core::types::SecretShare` in the current scope [INFO] [stdout] --> src/lib | labels: T-compiler, regression-from-stable-to-beta |
| idrust_117054textregression: inference conflicts due to new From imps on Vec<T> | This breaks many libraries that depend on the `tui` crate (see method: https://docs.rs/tui/latest/tui/layout/struct.Layout.html#method.constraints). ``` [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> src/app/app_parts.rs:18:14 [INFO] [stdout] | [INFO] [ | labels: T-libs-api, regression-from-stable-to-beta |
| idrust_117055textregression: parameter type may not live long enough | * https://crater-reports.s3.amazonaws.com/beta-1.74-4/beta-2023-10-21/gh/helium.helium-packet-router-ingest/log.txt ``` [INFO] [stdout] error[E0310]: the parameter type `S` may not live long enough [INFO] [stdout] --> src/uplink/ingest.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | labels: P-high, regression-from-stable-to-beta, finished-final-comment-period, disposition-close, T-types |
| idrust_117056textregression: new resolution failures in 1.74 | I'm grouping these together but we should make sure all of them are fixed / tested before closing this: * https://crater-reports.s3.amazonaws.com/beta-1.74-4/beta-2023-10-21/gh/CaviesLabs.hamsterswap-program/log.txt * Bisected to https://github.com/rust-lang/rust/pull/115269, but | labels: P-high, T-compiler, regression-from-stable-to-stable"} |
| {"id": "rust_117057", "text": "regression: cfg_match resolution ambiguity | In: * https://crater-reports.s3.amazonaws.com/beta-1.74-4/beta-2023-10-21/reg/maybe-dangling-0.1.0/log.txt * https://crater-reports.s3.amazonaws.com/beta-1.74-4/beta-2023-10-21/reg/cfg-match-0.2.1/log.txt ``` [INFO] [stdout] error[E0658]: use of unstable library feature 'cfg_matc | labels: T-libs-api, regression-from-stable-to-beta |
| idrust_117058textregression: parsing change in allow()? | https://crater-reports.s3.amazonaws.com/beta-1.74-4/beta-2023-10-21/gh/ken-matsui.diagonal-loop/log.txt ``` [INFO] [stdout] error: expected one of `(`, `,`, `::`, or `=`, found `-` [INFO] [stdout] --> src/dim2.rs:28:36 [INFO] [stdout] | [INFO] [stdout] 28 | #[allow(clippy::collap | labels: E-needs-test, T-compiler, regression-from-stable-to-beta |
| idrust_117059textregression: change in async capture rules? | https://crater-reports.s3.amazonaws.com/beta-1.74-4/beta-2023-10-21/reg/esl01-dag-0.3.0/log.txt ``` [INFO] [stdout] error: future cannot be sent between threads safely [INFO] [stdout] --> src/nameset/lazy.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | / Box::pin(futures::stream | labels: P-high, T-compiler, regression-from-stable-to-beta, E-needs-mcve, I-types-nominated, T-types |
| idrust_117061text`non_lifetime_binders`: unexpected bound ty in binder | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-non_lifetime_binders |
| idrust_117067textx.ps1 complains Python isn't installed, even though it is installed and working | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```powershell powershell .\\x.ps1 test ``` I expected to see this happen: Rust would build Instead, this | labels: O-windows, T-bootstrap, C-bug"} |
| {"id": "rust_117075", "text": "Clippy does not check all features | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![allow(dead_code)] #![deny(clippy::all)] #![warn(clippy::pedantic)] #![warn(clippy::nursery)] | labels: A-lints, A-macros, C-discussion"} |
| {"id": "rust_117077", "text": "possible miscompilation on aarch64 | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> this code runs to completion when executed with miri or on x86, but segfaults on aarch64 in release builds ```toml [packag | labels: O-macos, T-compiler, I-unsound, O-AArch64, A-linkers, C-external-bug"} |
| {"id": "rust_117080", "text": "Compilation Exhausts Memory Instead of Detecting Potential Syntax Error | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code(): ```rust trait Mul<T> { type Output; } trait Matrix: Mul<<Self as Matrix>::Row, Output = ()> { type Ro | labels: A-parser, T-compiler, I-compilemem, C-bug, I-hang"} |
| {"id": "rust_117097", "text": "test `ui/backtrace-debuginfo.rs` is flaky | The test `ui/backtrace-debuginfo.rs` has been failing randomly in CI. The errors look like: ``` ---- [ui] tests\\ui\\runtime\\backtrace-debuginfo.rs stdout ---- error: test run failed! status: exit code: 101 command: PATH=\"C:\\a\\rust\\rust\\build\\i686-pc-windows-gnu\\stage2\\lib\\rustlib\\ | labels: A-testsuite, A-debuginfo, T-compiler, O-windows-gnu, C-bug, O-x86_32"} |
| {"id": "rust_117099", "text": "multiple parsing options: `const` considered as a potential identifier in macro_rules pattern | I was playing around with `macro_rules` and I stumbled upon a strange behavior. I'm not sure if this is a bug or if I misunderstood something. I tried this code: ```rust macro_rules! a { (struct $x:ident < $($generics:ident),* $(,)? $(const $consts:ident: consts_types:ty),* $(,)? | labels: C-bug |
| idrust_117100textICE: `Unexpected type for 'Single' constructor` | File: /tmp/icemaker/81DF126D24557409A8EFD18AB1CCB3D2E8119C89297C34BA28DE025833020886.rs auto-reduced (treereduce-rust): ````rust fn enum_upvar() { type T = impl Copy; let foo: T = Some((1u32, 2u32)); let x = move || match foo { Foo => (), Some((a, b)) => (), }; } ```` <details><s | labels: I-ICE, T-compiler, C-bug, A-patterns, A-exhaustiveness-checking |
| idrust_117101textErrors compiling `libc` using rust 1.73.0 on `riscv64/ubuntu:focal` docker image - works with 1.72.1 | h/w device: Starfive VisionFive2 SoC board docker image : `riscv64/ubuntu:focal` - (LTS Ubuntu 20) Docker version 20.10.21 The issue also appears using QEMU. The issue also appears using `rust 1.75.0-nightly` The issue also appears compiling `libc 0.2.148` Note - the issue **DOES | labels: A-linkage, T-compiler, C-bug, O-riscv |
| idrust_117104textnested impl Trait in trait with default definition does not compile | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust trait Foo { fn foo() -> impl Stream<Item = impl Stream<Item = impl Future<Output = ()>>> { if t | labels: C-bug, T-types, F-return_position_impl_trait_in_trait |
| idrust_117119textIncorrect \ warning | The following code generates a warning: ```rust fn main() { #[derive(Copy, Clone)] enum Void {} union Uninit<T: Copy> { value: T, uninit: (), } unsafe { let x: Uninit<Void> = Uninit { uninit: () }; match x.value { _ => println!(\), } } } ``` ``` warning: unreach | labels: T-compiler, A-exhaustiveness-checking |
| idrust_117120textInvalid unused export warning on 1.75.0-nightly (cd674d617 2023-10-24) | CI started failing for us, without code changes in this area today with nightly The code is sth like this ```rust mod keys; pub use keys::*; ``` and produces ``` error: unused import: `keys::*` --> iroh-sync/src/lib.rs:44:9 | 44 | pub use keys::*; | ^^^^^^^ | = note: `-D unused-i | labels: C-bug, regression-untriaged |
| idrust_117121textWindows go use cgo call rust staticlib error | rustc 1.69.0 (84c898d65 2023-04-16) go 1.23.0 mingw x86_64-w64-mingw32 8.3.0 target x86_64-pc-windows-gnu demo: https://github.com/diwuwudi123/rust-cgo/tree/master ` use std::fs; #[no_mangle] pub extern \ fn hello_world() { let test = fs::read(\).unwrap(); println!(\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : :D\} |
| {: , : } |
| {: , : {}\{}\} |
| {: , : hello\{:?}\} |
| {: , : } |
| {: , : } |
| {: , : -NUM.method()\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : realloc\} |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : a\a\} |
| {: , : } |
| {: , : {:?}\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : 3501\} |
| {: , : } |
| {: , : } |
| {: , : ptx-kernel\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : /private/tmp/rust-20231026-5378-1tb0p4o/rustc-1.73.0-src/build/aarch64-apple-darwin/stage0/lib/rustlib/aarch64-apple-d | labels: O-macos, T-compiler, C-bug |
| idrust_117304textnon_exhaustive_omitted_patterns should not warn matches! macro | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(non_exhaustive_omitted_patterns_lint)] #![warn(non_exhaustive_omitted_patterns)] use | labels: A-lints, C-bug, T-libs, F-non_exhaustive_omitted_patterns_lint |
| idrust_117305textESP-IDF targets' Atomic*64 is not lock-free | max_atomic_width of these targets is currently set to 64 https://github.com/rust-lang/rust/blob/0237aa3d771f4c6152c7d46a888ea89c538b121e/compiler/rustc_target/src/spec/riscv32imac_esp_espidf.rs#L20 https://github.com/rust-lang/rust/blob/0237aa3d771f4c6152c7d46a888ea89c538b121e/co | labels: P-low, T-compiler, I-unsound, C-bug, A-atomic"} |
| {"id": "rust_117310", "text": "surprising behaviour when relating opaque types in winnowing | The statements of `test` has an arguably inconsistent behvaiour here: ```rust #![feature(type_alias_impl_trait)] use std::ops::Deref; trait Trait {} impl<A, B> Trait for (A, B, u8) where A: Deref, B: Deref<Target = A::Target>, {} impl<A, B> Trait for (A, B, i8) {} type TaitSized | labels: A-impl-trait, C-bug, F-type_alias_impl_trait, T-types"} |
| {"id": "rust_117314", "text": "[stable] `cargo test` causes a compiler error | `cargo build` succeeds, as does `cargo bench`, so the code allegedly builds and runs fine, yet `cargo test` yields the compiler error. Since the issue exists only on the stable channel, not nightly, it might be a known one (?) Steps to reproduce: ``` $ git clone https://github.co | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117315", "text": "bootstrap: cargo output is missing | `x.py install` ``` Documenting error index (x86_64-unknown-linux-gnu) Building tool error_index_generator (stage1 -> stage2, x86_64-unknown-linux-gnu) Rustbook (x86_64-unknown-linux-gnu) - nomicon Rustbook (x86_64-unknown-linux-gnu) - reference Rustbook (x86_64-unknown-linux-gnu) | labels: T-bootstrap, C-bug"} |
| {"id": "rust_117318", "text": "Suggest updating the compiler | ### Code On an older compiler: ```Rust fn main() { 1u32.div_ceil(5); } ``` ### Current output ```Shell error[E0658]: use of unstable library feature 'int_roundings' --> src\\lib.rs:38:14 | 38 | 1u32.div_ceil(5); | ^^^^^^^^ | = note: see issue #88581 <https://github.com/rust-lang/r | labels: E-easy, A-diagnostics, T-compiler"} |
| {"id": "rust_117320", "text": "Panic on adding or removing a supertrait | ~I get this error when I try to add (or then remove) the supertrait `fmt::Debug` to [this trait](https://codeberg.org/mo8it/oxitraffic/src/commit/c0ec32aa69f9785d1df497fee17fac8fcffb2d18/src/handlers/chart_data/contiguous_date_part.rs#L6) and deriving (or removing the deriving) o | labels: I-ICE, T-compiler, A-incr-comp, C-bug"} |
| {"id": "rust_117323", "text": "Bare metal risc-v build errors, unless my assembly startup code section named exactly \".init\" | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> Compare this commit with the one just before: https://github.com/Barabas5532/crush/commit/809c257873f957b995949abfcd04f04b | labels: C-bug, O-riscv"} |
| {"id": "rust_117324", "text": "Bizarre stack usage when working with u128 on T32 targets | I read [a Wikipedia page](https://en.wikipedia.org/wiki/Xorshift#Example_implementation) that mentions a \"contrived 32-bit shift\" of a 128-bit integer and I thought of Rust's native 128-bit integer support, so I decided to see how efficiently it uses registers on the platform I'm | labels: A-LLVM, A-codegen, O-Arm, C-optimization"} |
| {"id": "rust_117326", "text": "Feature: Adding contributors section to the README.md file. | ### Location Readme.md file  ### Summary There is no Contributors section in readme file . As we know Contributions are what make the open-source community such an amazing plac | labels: A-docs"} |
| {"id": "rust_117331", "text": "Instruction does not dominate all uses | The following code (the custom mir syntax is provisional): ```rust #![feature(custom_mir, core_intrinsics)] use core::intrinsics::mir::*; #[custom_mir(dialect = \"runtime\", phase = \"optimized\")] pub fn f() -> u32 { mir!( let a: u32; { Call(a = f(), bb1, Cleanup(bb2)) } bb1 = { RET | labels: A-codegen, T-compiler, C-bug"} |
| {"id": "rust_117334", "text": "Rust app crashes with segmentation fault | Code compiled with Rust 1.70.0, 1.72.1, 1.73.0 yields code that is failing with segmentation fault in runtime. I tried this code: ```rust use std::convert::TryInto; fn main() { let data:[f32; 1000*1000] = vec![1.0; 1000*1000] .try_into() .expect(\"Wrong matrix size!\"); print!(\"Res | labels: O-macos, T-compiler, C-bug, O-AArch64, A-stack-probe"} |
| {"id": "rust_117352", "text": "[Emscripten] fail rustc by `#4 0x000055cd94ae00ce lld::wasm::(anonymous namespace)::Writer::run() Writer.cpp:0:0` | I tried this code: <details> ```rust use image::{DynamicImage, Rgb}; use ndarray::{Array, ArrayBase, Axis, IxDyn, OwnedRepr, s}; use ort::execution_providers::CPUExecutionProviderOptions; use ort::{ExecutionProvider, NdArrayExtensions}; use ort::{Environment, GraphOptimizationLev | labels: A-linkage, O-wasm, C-bug, O-emscripten"} |
| {"id": "rust_117355", "text": "MIR validation error at `mir-opt-level>=3` | ```rust #![feature(custom_mir, core_intrinsics)] #![allow(unused_parens, unused_assignments, overflowing_literals)] extern crate core; use core::intrinsics::mir::*; #[custom_mir(dialect = \"runtime\", phase = \"initial\")] pub fn fn12( mut _6: *mut bool, mut _9: *mut bool, ) -> char | labels: T-compiler, C-bug, A-mir-opt, A-mir-opt-inlining, A-rustlantis"} |
| {"id": "rust_117361", "text": "howto cross-compile to get to work for powerpc e500v2 | This relates to SynoCommunity spksrc project to build and package various open source software to run on Synology NAS. I've been running into an issue where rust code cross-compiled for powerpc arch segfault (more specifically `qoriq`). The exact same code builds perfectly fine f | labels: A-LLVM, T-compiler, T-bootstrap, O-PowerPC |
| idrust_117362textICE: gvn hits `bug!()` | File: /tmp/icemaker/issue-50814-2.rs auto-reduced (treereduce-rust): ````rust trait C { const BOO: usize; } trait Foo<T> { const BAR: usize; } struct A<T>(T); impl<T: C> Foo<T> for A<T> { const BAR: usize = [5, 6, 7][T::BOO]; } fn foo<T: C>() -> &'static usize { &<A<T> as Foo<T>> | labels: I-ICE, T-compiler, C-bug, A-mir-opt"} |
| {"id": "rust_117366", "text": "cranelift component broken? | `rustc 1.75.0-nightly (e5cfc5547 2023-10-28)` According to `rustup component list`, I have `rustc-codegen-cranelift-x86_64-unknown-linux-gnu (installed)` But when I try to build something with it: `RUSTFLAGS=\"-Zcodegen-backend=cranelift\" ~/.cargo/bin/cargo +nightly build` I get: | labels: T-bootstrap, T-infra, C-bug, A-cranelift"} |
| {"id": "rust_117368", "text": "ICE: `normalization works on validated constants: InterpErrorInfo(InterpErrorInfoInner..` | File: /tmp/icemaker/92054-2.rs auto-reduced (treereduce-rust): ````rust #![feature(allocator_api)] use std::alloc::{Allocator, Global, Layout}; fn main() { let layout: Layout = None.unwrap(); let ptr: *mut u8 = Global.allocate(layout).unwrap().as_ptr() as _; } ```` original: ```` | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117374", "text": "Tracking Issue for `Seek::seek_relative` | <!-- 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 process. In that case, y | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period"} |
| {"id": "rust_117375", "text": "Alternate syntax idea for Return Type Notation | Tracking Issue: #109417 Hi, I'm new so let me know if this is not the right forum for this :), the tracking issue noted that it was not for discussion and that people should open up a separate issue. I had an idea for a more consistent syntax for Return Type Notation. My thought | labels: T-lang, C-discussion, WG-async, F-return_type_notation |
| idrust_117378textICE: `None` in `deconstruct_pat.rs` | <!-- ICE: Rustc ./9958995ACC58A171F193E5F6241D14DE638639E0A0E7E61223EA08C2D86C7F4F.rs '' 'thread 'rustc' panicked at compiler/rustc_mir_build/src/thir/pattern/deconstruct_pat.rs:1014:57: 'called `Option::unwrap()` on a `None` value'', 'thread 'rustc' panicked at compiler/rustc_mi | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117379", "text": "ICE: `Foo was a subtype of &Foo but now is not?` | <!-- \u001b[31mICE\u001b[0m: Rustc ./2A3DFD6CE4CDFA79246F560DEADF33C3FE1DD0AEA2273BFED26CF5BF99086A0E.rs '' 'error: internal compiler error: compiler/rustc_hir_typeck/src/method/confirm.rs:518:21: Foo was a subtype of &Foo but now is not?', 'error: internal compiler error: compiler/rustc_h | labels: I-ICE, T-compiler, C-bug |
| idrust_117380textRustc suggests incorrect fixes (`#[warn(unused_parens)]`) | ### Code ```Rust fn main() { let(mut _x): i8 = 0; let( mut _x): i8 = 0; let(_x): i8 = 0; } ``` ### Current output ```Shell warning: unnecessary parentheses around pattern --> src/main.rs:2:8 | 2 | let(mut _x): i8 = 0; | ^ ^ | = note: `#[warn(unused_parens)]` on by default help: r | labels: A-diagnostics, T-compiler, D-invalid-suggestion |
| idrust_117381text\ after panic | I'm getting a panic ``` thread 'rustc' panicked at compiler/rustc_ty_utils/src/abi.rs:360:21: `PassMode::Direct` for aggregates only allowed on wasm and `extern \"ptx-kernel\"` fns Problematic type: TyAndLayout { ty: ReprC1<*const i32>, ... ``` (that's expected, I'm working on that | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117384", "text": "How to set custom linker with `build.rs` | I try to build a cdylib with rust for openharmony. And i followed this doc: https://doc.rust-lang.org/rustc/platform-support/openharmony.html. There are three ways to set custom linker. 1. `set linker with config.toml` it works. 2. set linker with env like `export CARGO_TARGET_AA"} |
| {"id": "rust_117391", "text": "Trait implementations order random | ### Location [`foreign-impls`](https://docs.rs/fimg/0.4.21/fimg/pixels/blending/trait.Blend.html#foreign-impls) ### Summary Displeasing order,  Expect sorted, or source order. @Guillau | labels: T-rustdoc, A-docs, A-rustdoc-js"} |
| {"id": "rust_117393", "text": "RELEASES.md File Size | The releases markdown file has became very large to the point where it should probably be best to prune old release notes and direct users to the compare between versions url or something like that."} |
| {"id": "rust_117406", "text": "`Debug` on packed structs causes error on non-`Copy` fields | The following code causes a compilation error. ```rust #[repr(packed)] #[derive(Debug)] struct B(String); fn main(){} ``` ### Error ``` error[E0507]: cannot move out of `self` which is behind a shared reference --> src/main.rs:4:10 | 3 | #[derive(Debug)] | ----- in this derive ma | labels: A-diagnostics, A-macros, T-compiler"} |
| {"id": "rust_117412", "text": "TAIT: ICE (stack overflow) on recursive TAIT static | This triggers a stack overflow of rustc (even without the TAIT feature gate, i.e. on stable too) ([playgound](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=b581d2443a09d94d4dd5cd392d735357)): ```rust type T = impl Copy; static STATIC: T = None::<&'stati | labels: I-crash, T-compiler, C-bug, F-type_alias_impl_trait |
| idrust_117413textTAIT: empty match on TAIT confuses typeck | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=2ac211ebe1388c481 | labels: C-bug, F-type_alias_impl_trait, T-types |
| idrust_117448textWarn about explicit import of `TryInto`, `TryFrom`, and `FromIterator` when migrating to 2021 edition. | ### Problem One of the changes made in 2021 edition is that `TryInto`, `TryFrom`, and `FromIterator` are now in scope by default ([link](https://doc.rust-lang.org/edition-guide/rust-2021/prelude.html)). So an explicit `use` statement is now redundant. However, it seems like neith | labels: C-enhancement, A-lints, A-suggestion-diagnostics, A-edition-2021 |
| idrust_117429textSub-optimal layout of `Option<(u16, [u8; 15])>` (missed niche optimization) | I tried this code: ```rust use std::mem::size_of; fn main() { println!(\, size_of::<(u16, [u8; 14])>()); println!(\, size_of::<(u16, [u8; 15])>()); println!(\, size_of::<Option<(u16, [u8; 14] | labels: C-enhancement, T-compiler, A-layout |
| idrust_117430textCI: Bootstrap no longer documents compiler crates | Bootstrap no longer documents any `rustc_*` / `compiler/` crates or `rustdoc` in CI. [The index](https://doc.rust-lang.org/nightly/nightly-rustc/index.html) now only contains a meager 20 or so crates. This has to have regressed fairly recently. | labels: regression-from-stable-to-nightly, T-bootstrap, A-docs, C-bug, A-contributor-roadblock |
| idrust_117432text`impl<T: Error> Error for Box<T>` does not delegate its `provide` method implementation | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust #![feature(error_generic_member_access)] #[derive(Debug)] struct Foo; #[derive(Debug)] struct M | labels: T-compiler, C-bug |
| idrust_117437text`Vec.resize()`, `Vec.resize_with()` should be marked as panicking if the new capacity exceeds `isize::MAX` bytes | ### Location In the documentation for the following functions: * [`alloc::vec::Vec.resize()`](https://github.com/rust-lang/rust/blob/ffb7ed9fa420e9bcd98d84b431b2009445b7b967/library/alloc/src/vec/mod.rs#L2387-L2420) * [`alloc::vec::Vec.resize_with()`](https://github.com/rust-lang | labels: E-easy, T-libs-api, E-help-wanted, A-docs |
| idrust_117445textNightly rustc panics when the closure inside unwrap_or_else returns certain incorrect types | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug |
| idrust_117446textindex out of bounds | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, A-trait-system, E-needs-test, T-compiler, C-bug |
| idrust_117447textNightly rustc docs don't document compiler crates anymore | https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ is missing :("} |
| {"id": "rust_117452", "text": "`doc.rust-lang.org/nightly/nightly-rustc` links are broken | Links with the above prefix are not resolving. Is this a temporary problem, or have `nightly` docs been deprecated? I ask because, for all of the urls I have tried, the corresponding `std` and `beta` versions resolve. Example url causing a problem: https://doc.rust-lang.org/night | labels: A-docs, T-infra, C-bug"} |
| {"id": "rust_117455", "text": "ICE: assertion failed: !verify_if_eq_b.has_escaping_bound_vars() | ### Code Check out ICU4X (tested on commit https://github.com/unicode-org/icu4x/commit/582e46cd5bac851d25eea6188e5641ad99ce8a78), and build `components/locid_transform` ### Meta `rustc --version --verbose`: ``` $ rustc +nightly --version --verbose rustc 1.75.0-nightly (31bc7e2c4 | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117456", "text": "ICE: already mutably borrowed: BorrowError - compiler/rustc_hir_typeck/src/fn_ctxt/suggestions.rs:1755 | Hey, really sorry, I don't have the time at all to try to minimize the code, the code base is so large and I’m really in a rush 😢 BUT, I do reproduce the error on my computer after a `cargo clean`, which means you should be able to reproduce it as well. I ran `cargo check` on thi | labels: I-ICE, T-compiler, C-bug |
| idrust_117461textSegmentation fault | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I'm very sorry for how little information this bug report has, hopefully just, initially. I'm really not sure what exactly | labels: T-compiler, C-discussion, O-AArch64, A-stack-probe |
| idrust_117463text`rustdoc` can't handle some links on derive macros | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust /// The default value of the setting normally matches the /// [`Default`] trait. If you want to | labels: T-rustdoc, C-bug, A-intra-doc-links, A-proc-macros"} |
| {"id": "rust_117476", "text": "Add method for computing the difference of two unsigned integers in a signed | ```rust fn overflowing_difference_signed(a: unsigned, b: unsigned) -> (signed, bool); ``` This is useful in the case of ```rust async fn seek(&mut self, seek: SeekFrom) -> Result<u64> { match seek { SeekFrom::Current(pos) => self.seek_relative(pos).await, SeekFrom::End(pos) => .. | labels: C-feature-request"} |
| {"id": "rust_117477", "text": "Creating poor man's compile-time option | I'm trying to create a `CTOption` type, which is meant to be a compile time-option. ```rust #[repr(transparent)] pub struct CTOption<T, const IS_SOME_VAL: bool>(MaybeUninit<T>); ``` Naturally, it has to be able to run the destructor of the inner value at compile time. How can I m | labels: C-discussion"} |
| {"id": "rust_117478", "text": "ICE: const fn in const trait | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-const_trait_impl, F-effects"} |
| {"id": "rust_117479", "text": "could not compile `icu_locid_transform` (lib) | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117480", "text": "nvptx abi adjustment may keep PassMode::Direct for small aggregates in conv `extern \"C\"` | @kjetilkjeka I had to disable this test on nvptx64 since the `extern \"C\"` ABI uses `Direct` pass mode in invalid ways. I think that's caused by this code: https://github.com/rust-lang/rust/blob/b75b3b3afecfb6638c7c75ad665f8f3091aab1ae/compiler/rustc_target/src/abi/call/nvptx64.rs | labels: T-compiler, O-NVPTX, A-ABI |
| idrust_117483textICE when compiling `icu_locid_transform` | ### Meta <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --> `rustc --version --verbose`: ``` rustc 1.75.0-nightly (31bc7e2c4 2023-10-30) binary: rustc commit-hash: 31bc7e2c47e82798a392c7706119 | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117487", "text": "Rustdoc Json Test Suite: Avoid using `#![no_core]` | Many tests in `tests/rustdoc-json` use `#![feature(no_core)]` `#![no_core]`. This significantly reduces the size of the generates JSON, and makes the tests easier to write. However it also means the tests now rely on the unstable (and undocumented) contract between `core` and `ru | labels: C-cleanup, A-testsuite, T-rustdoc, A-contributor-roadblock, A-rustdoc-json"} |
| {"id": "rust_117489", "text": "ICE: Lifetime issue not detected for GAT | <!-- 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-patterns/ --> I encount | labels: I-ICE, T-compiler, C-bug, F-generic_associated_types, A-implied-bounds, A-GATs"} |
| {"id": "rust_117491", "text": "ICE: transmute: `not implemented: Cycle` | <!-- \u001b[31mICE\u001b[0m: Rustc ./cyc.rs '' 'thread 'rustc' panicked at compiler/rustc_transmute/src/layout/tree.rs:202:24: 'not implemented: Cycle'', 'thread 'rustc' panicked at compiler/rustc_transmute/src/layout/tree.rs:202:24: 'not implemented: Cycle'' File: /tmp/icemaker/cyc.rs --> | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117492", "text": "nightly from 2023-10-31 can't compile icu4x - crashes with an ICE | ### Code I caught this doing an upgrade of rustc nightly in our monorepo. I can reproduce the failure using https://github.com/unicode-org/icu4x and `cargo test` in the repo root - I'll see about follow-up work to try and reduce it etc, but wanted to file the bug ASAP. ### Meta ` | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117493", "text": "ICE: assertion failed: !verify_if_eq_b.has_escaping_bound_vars() (rustc 1.75.0-nightly (9d83ac217 2023-10-31)) | ### Code See https://github.com/kriskras99/ferris_dancing Can provide a reduced example tomorrow. It compiled fine on the previous nightly version. ### Meta `rustc --version --verbose`: ``` rustc 1.75.0-nightly (9d83ac217 2023-10-31) binary: rustc commit-hash: 9d83ac217957eece218 | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117496", "text": "[crash] adt_const_params + generic_const_exprs \"const parameter ... out of range when substituting args\" | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-generic_const_exprs, F-adt_const_params, S-bug-has-test"} |
| {"id": "rust_117499", "text": "./x.py fails with certificate issues with conda Python environment on Windows | Hello, I think this is a specific issue to my git or conda setup, but I'm unable to run the bootstrap command because of certificate issues. I'm pretty sure this is because my certs are ancient from an old installation of git-for-windows, and `curl` in the git environment prefers"} |
| {"id": "rust_117501", "text": "Suggestion for E0308 produces invalid syntax for traits with unconstrained associated types, when a type parameter is expected | ### Code ```Rust trait MyTrait { type T; fn bar(self) -> Self::T; } fn foo<A: MyTrait, B>(a: A) -> B { return a.bar(); } ``` ### Current output ```Shell error[E0308]: mismatched types --> src/lib.rs:8:12 | 7 | fn foo<A: MyTrait, B>(a: A) -> B { | - - expected `B` because of retur | labels: A-type-system, A-diagnostics, T-compiler, D-incorrect, S-has-mcve"} |
| {"id": "rust_117518", "text": "Spurious E0072 error in const eval: recursive type has infinite size | Compiling this code: ```rust trait Layout { const ALIGN: usize; } struct Struct; impl Layout for Struct { const ALIGN: usize = { #[repr(C)] struct SizeIsAlign { _byte: u8, _aligned: [Self; 0], // change this to `[Struct; 0]` } core::mem::size_of::<SizeIsAlign>() }; } ``` produces | labels: C-bug"} |
| {"id": "rust_117528", "text": "Large `static`s sector returning an linking error without any useful information | ### Code ```Rust Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d4f88d85105db9dd9222bc21d5da2f8e Direct source: static LARGE_ARRAY: [u8; 1024usize.pow(3)] = [0u8; 1024usize.pow(3)]; fn main() { assert!(LARGE_ARRAY.iter().all(|&b| b == 0)) | labels: A-diagnostics, T-compiler, C-discussion"} |
| {"id": "rust_117541", "text": "unconditional_recursion does not catch indirect infinity recursion | ### Code ```Rust fn a() { b() } fn b() { a() } fn main() { let _ = a(); } ``` ### Current output none: ```Shell ``` ### Desired output ```Shell warning: function cannot return without recursing --> <source>:1:1 | 1 | fn a() { | ^^^^^^ cannot return without recursing 2 | b() | --- | labels: C-enhancement, A-diagnostics, T-compiler"} |
| {"id": "rust_117545", "text": "Exponential Performance Regression in Rust 1.73 Read API from BorrowedCursor::ensure_init | Reported by a lz4_flex user https://github.com/PSeitz/lz4_flex/issues/147 ### Code I created a small repo to demonstrate on a minimal example. https://github.com/PSeitz/copy_regression_1.73 BorrowedCursor::ensure_init from this PR https://github.com/rust-lang/rust/pull/97015 seem | labels: regression-from-stable-to-stable, C-bug, T-libs"} |
| {"id": "rust_117547", "text": "ICE: None in error reporting | <!-- \u001b[31mICE\u001b[0m: Rustc ./B962629F91CA0817230C643460037F2D779492865FBCB07F60506A83E36A9272.rs '' 'thread 'rustc' panicked at compiler/rustc_infer/src/infer/error_reporting/mod.rs:2448:78: 'called `Option::unwrap()` on a `None` value'', 'thread 'rustc' panicked at compiler/rustc_ | labels: I-ICE, T-compiler, C-bug |
| idrust_117551textSuboptimal machine code mapping results or options | https://godbolt.org/z/GjrE4GjhK for all 3 maybe_with_data functions, the move of certain values on the stack is unnecessary. This seems like a fundamental issue and probably won't be fixed soon, but it should make all existing code run slightly faster | labels: A-LLVM, I-slow, T-compiler, C-optimization"} |
| {"id": "rust_117555", "text": "rustdoc does not consistently apply syntax highlighting to the item declaration | There doesn't seem to be keyword or comment highlighting for the first snippet on rustdoc pages. https://doc.rust-lang.org/std/path/struct.PathBuf.html  https: | labels: T-rustdoc, C-enhancement, A-rustdoc-ui |
| idrust_117558textEnum variants shadow associated constants with no warning | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> ### User Story As a rust newbie, I don't know which one is recommended. - or `impl FooEnum` - or `impl FooEnumWrapperStruc | labels: C-enhancement, A-lints"} |
| {"id": "rust_117567", "text": "Unable to build with on Windows 10 with MinGW nor MSVC | Hi, I'm trying to build on Windows and running into problems. ------------ I'm following the readme and starting with a clean Windows 10 machine, installing `git`, `python` and `cmake` with `winget`. From there, with the MinGW build I use pacman to install the listed packages, an | labels: T-bootstrap, A-docs"} |
| {"id": "rust_117569", "text": "`warning: unnecessary trailing semicolon` false positive in macro_rules | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust macro_rules! try_block { ($($stmt:stmt);+) => { (|| { $($stmt);+ })() }; } pub struct Value; pu | labels: C-bug"} |
| {"id": "rust_117573", "text": "Auto traits are not implemented for extern types | I tried this code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=255de2403a8fe06399e5ae5c1beb9340)): ```rust #![feature(auto_traits, extern_types)] auto trait Valid {} extern { type ExternType; } fn must_be_valid(_: &(impl ?Sized + Valid)) | labels: A-trait-system, C-bug, F-extern_types, F-auto_traits"} |
| {"id": "rust_117577", "text": "ICE: `<_ as MyTrait<Ty1>>::Out` where `trait MyTrait<T: OtherTrait<Assoc = Self>>>` on nightly | <!-- 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-patterns/ --> ### Code | labels: I-ICE, P-medium, T-compiler, regression-from-stable-to-beta, C-bug"} |
| {"id": "rust_117587", "text": "Tracking Issue for Lifetime Capture Rules 2024 (RFC 3498) | This is a tracking issue for the RFC 3498, \"Lifetime Capture Rules 2024\" (rust-lang/rfcs#3498). The feature gate for the issue is `#![feature(lifetime_capture_rules_2024)]`. In Rust 2024 and later editions, return position `impl Trait` (RPIT) opaque types will automatically captu | labels: B-RFC-approved, T-lang, C-tracking-issue, A-edition-2024, F-lifetime_capture_rules_2024, S-tracking-ready-for-edition"} |
| {"id": "rust_117591", "text": "Guarantee that it is sound to observe the bytes of `None::<P>` where `P` is a pointer type subject to NPO | In https://github.com/rust-lang/rust/pull/115333, we added a guarantee that transmuting from `[0u8; N]` to `Option<P>` is sound where `P` is a pointer type subject to the null pointer optimization (NPO). It would be useful to be able to guarantee the inverse - that if all of the | labels: T-lang, A-docs, T-opsem"} |
| {"id": "rust_117597", "text": "Non-determinsitic output while targetting wasm32 on different OS | So I create some UserScripts as a hobby for a game and have been looking to write some of them in Rust and compile them down to wasm, but I have noticed that what outputted `.wasm` binary file is different based off the OS that is building it. I created a little [repo](https://gi | labels: O-wasm, A-reproducibility"} |
| {"id": "rust_117598", "text": "Recent nightly causes `[E0308]: mismatched types` | This code is a subset of the sqlx crate code that is no longer compiling on the nightly (nightly change was very recent, it was working fine a few versions ago). Matching bug in sqlx crate - https://github.com/launchbadge/sqlx/issues/2855 ```rust trait Database: for<'r> HasValueR | labels: regression-from-stable-to-nightly, T-compiler, C-bug, P-critical, T-types |
| idrust_117602textNightly 65e297d1e 2023-11-03 fails to infer auto traits | The type `aho_corasick::AhoCorack` is not inferred to be `Send + Sync` by the above mentioned nightly release, c.f. https://github.com/quickwit-oss/tantivy/actions/runs/6759263517/job/18371750242?pr=2239 Using the stable, the code compiles with out issue. EDIT: It seems to be rel | labels: T-compiler, A-inference, C-bug, F-generic_associated_types, A-GATs |
| idrust_117605text`std::file` claims that it returns the name of a file, but it returns a relative path | ### Location https://doc.rust-lang.org/std/macro.file.html ### Summary The docs say: > Expands to the file **name** in which it was invoked. But in fact, a relative path is returned. For example, if we have `src/main.rs`: ```rust fn main() { println!(\, std::file!()) } ``` Thi | labels: A-docs, T-libs |
| idrust_117618textTracking Issue for `duration_abs_diff` | <!-- 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 process. In that case, y | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period |
| idrust_117622textrustdoc fails on `tokio 1.33.0` with `--cfg=docsrs` since nightly-2023-10-31 | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code `Cargo.toml`: | labels: T-rustdoc |
| idrust_117626textNightly regression in Structual Eq check for match | <!-- Thank you for filing a regression report! 🐛 A regression is something that changed between versions of Rust but was not supposed to. Please provide a short summary of the regression, along with any information you feel is relevant to replicate it. --> ### Code I tried this c | labels: P-high, T-compiler, C-bug |
| idrust_117628textice: auto-traits: `Region parameter out of range when substituting in region` | <!-- \u001b[31mICE\u001b[0m: Rustc ./icemaker_omni/6B908CE710EA87DFE69964E73B0924BCA2AB22B906E5270BFDA0E53631C8866F.rs '' 'error: internal compiler error: compiler/rustc_middle/src/ty/generic_args.rs:813:13: Region parameter out of range when substituting in region 'outer (index=1, args = | labels: I-ICE, T-compiler, C-bug, A-auto-traits |
| idrust_117629textice: `const_trait_impl`: `async` functions cannot be `const fn` | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, F-const_trait_impl, S-bug-has-test |
| idrust_117633textIncorrect argc, argv on target mipsel-unknown-linux-gnu | I tried this code: ```rust std::env::args() ``` I expected to see this happen: Get the arguments. Instead, this happened: Segfault ### Meta I'm porting an old C program to Rust on a router with cheap mipsel processors. `.cargo/config.toml`: ``` [build] target = \"mipsel-unknown-li | labels: C-bug"} |
| {"id": "rust_117634", "text": "[ICE]: ICE error when using `async_fn_in_trait` and `const_trait_impl` features simultaneously | ### Code ```Rust #![feature(async_fn_in_trait)] #![feature(const_trait_impl)] #![allow(incomplete_features)] pub trait Foo { async fn foo(&mut self); } impl<T: Foo> Foo for &mut T{ async fn foo(&mut self) { match () { const { (|| {()})() } => {} } } } ``` ### Affected release cha | labels: I-ICE, E-needs-test, T-compiler, C-bug, requires-nightly, F-const_trait_impl"} |
| {"id": "rust_117635", "text": "`-Zthreads` changes compiled binary | ```` rustc 1.75.0-nightly (e1fcecb1b 2023-11-06) binary: rustc commit-hash: e1fcecb1b9930f109a8c1cf2b690e03483a41289 commit-date: 2023-11-06 host: x86_64-unknown-linux-gnu release: 1.75.0-nightly LLVM version: 17.0.4 ```` reproducible with both `cargo` and `oxipng` 1) `cargo buil | labels: C-bug, A-parallel-compiler"} |
| {"id": "rust_117638", "text": "-Zthreads threads seem to try to allocate memory up front regardless of if it will actually be needed or not | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust pub fn main() {} ``` Build with `rustc main.rs -Zthreads=999999` I expected to see this happen: | labels: C-bug, A-parallel-compiler"} |
| {"id": "rust_117640", "text": "Compiling without correct target generates confusing tuple variant error messages | Similar to https://github.com/rust-lang/rust/issues/65386, I hit a bunch of errors when compiling a project on a new machine. It turns out it was due to the target not being added to rustup, however, that information was somewhat hidden. Details below. ## Expected If core cannot | labels: C-bug"} |
| {"id": "rust_117646", "text": "Nightly regression in resolving trait impl with generic associated types | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust trait MyIterator { type Item; } impl<T> MyIterator for Box<T> where T: ?Sized + MyIterator, { t | labels: C-bug"} |
| {"id": "rust_117647", "text": "New 2024-edition `impl Trait` lifetime capture rules means opaques now capture higher-ranked lifetimes | Under the new 2024-edition lifetime capture rules (#117587), any `impl Trait`s that are defined inside the scope of a `for<'a>` binder now implicitly capture the lifetimes of that binder. This is intended behavior, and we'd like for that to work. However, currently the type syste | labels: A-impl-trait, S-bug-has-test, T-types, A-edition-2024"} |
| {"id": "rust_117648", "text": "overlapping_range_endpoints false positive | ### Code ```Rust match (0i8, 0i8) { (0, _) => {} // change either of these to not overlap and it will error (..=-1, ..=0) => {} (1.., 0..) => {} (1.., ..=-1) | (..=-1, 1..) => {} } ``` ### Current output ```Shell warning: multiple patterns overlap on their endpoints --> src/main. | labels: A-diagnostics, T-compiler, C-bug, A-patterns"} |
| {"id": "rust_117652", "text": "Only with `all` or `split-debuginfo` can `-Zremap-path-scope` remap `SO` symbols on macOS | ### Problem It's very clear in RFC that * Remaps for `split-debuginfo` only happen in split debuginfo files. * Remaps for `unsplit-debuginfo` only happen in compiled executables or libraries. * Remaps for `split-debuginfo-path` only remap paths pointing to split debuginfo files. | labels: O-macos, A-debuginfo, C-bug, F-trim-paths |
| idrust_117653textSuggestion: Cache `x --help` so that it doesn't rebuild to show help message | running x --help takes around 60s because it redownloads and rebuilds x every time. If building x created or updated a cached file containing the help message, one could avoid this process and read the most up-to-date help message whenever they like! | labels: T-bootstrap"} |
| {"id": "rust_117657", "text": "Compiler Crash due to `generic_const_exprs` Feature in Rust Code | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117666", "text": "Incorrect doc links in `src/cmp.rs` lead to invalid hyperlinks in `rust-analyzer` | # Incorrect doc links in `src/cmp.rs` lead to invalid hyperlinks in `rust-analyzer` ## Errors in `rust` source code - [`PartialEq#derivable`](https://github.com/rust-lang/rust/blob/4e0fb98a5c41be1227845219b81ab147708fd99a/library/core/src/cmp.rs#L245) should be `trait.PartialEq#d"} |
| {"id": "rust_117660", "text": "regression: error compiling sqlx | ## Code I tried this code: ```toml [package] name = \"a\" version = \"0.1.0\" edition = \"2021\" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] sqlx = \"=0.7.2\" ``` I expected to see this happen: it compiles Instead, this | labels: regression-from-stable-to-nightly, T-compiler, C-bug, T-types"} |
| {"id": "rust_117664", "text": "New \"lifetime bound not satisfied\" error on associated type | ### Code I tried this code: ```rust pub struct Foo<'a> { // We need to override the constraint's lifetime here so that `Tracked` is // covariant over the constraint. _tracked: Tracked<'a, Self, <Foo<'static> as Validate>::Constraint>, } impl<'a> Validate for Foo<'a> { type Constr | labels: regression-from-stable-to-nightly, C-bug"} |
| {"id": "rust_117669", "text": "Compiler should suggest expect/unwrap before the suggestion to remove the last method call | ### Code ```Rust fn main() { let abs: i32 = 3i32.checked_abs(); } ``` ### Current output ```Shell Compiling playground v0.0.1 (/playground) error[E0308]: mismatched types --> src/main.rs:2:20 | 2 | let abs: i32 = 3i32.checked_abs(); | --- ^^^^^^^^^^^^^^^^^^ expected `i32`, found | labels: A-diagnostics, T-compiler"} |
| {"id": "rust_117670", "text": "ice: `unexpected coroutine type Pin<&mut..` | <!-- ICE: Rustc ./crash.rs '' 'error: internal compiler error: compiler/rustc_mir_transform/src/coroutine.rs:1456:14: unexpected coroutine type Pin<&mut {async fn body@/tmp/icemaker/crash.rs:1:20: 3:2}>', 'error: internal compiler error: compiler/rustc_mir_transform/src/coroutine | labels: I-ICE, T-compiler, C-bug |
| idrust_117687textScratch issue for wg-async checkboxes | I'm using this issue to see if rfcbot can add checkboxes for wg-async. It's not a real issue and I'll close it soon. Please ignore! | labels: WG-async"} |
| {"id": "rust_117689", "text": "e | <!-- Thank you for filing a bug report! 🐛 Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --> I tried this code: ```rust <code> ``` I expected to see this happen: *explanation* Instead, this happened: *explanation* # | labels: C-bug"} |
| {"id": "rust_117691", "text": "Tracking Issue for convenience methods on `NonNull` | <!-- 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 process. In that case, y | labels: T-libs-api, C-tracking-issue, disposition-merge, finished-final-comment-period, A-raw-pointers"} |
| {"id": "rust_117696", "text": "ICE error: Assertion failed in `compiler/rustc_ty_utils/src/instance.rs:103:13` | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, S-bug-has-test"} |
| {"id": "rust_117711", "text": "Calling Iterator methods on IntoIterator should suggest .into_iter() | ### Code ```Rust fn process(items: impl IntoIterator<Item = String>) -> Vec<String> { items.collect() } ``` ### Current output ``` error[E0599]: `impl IntoIterator<Item = String>` is not an iterator --> src/lib.rs:2:11 | 1 | fn process(items: impl IntoIterator<Item = String>) -> | labels: A-diagnostics, T-compiler, A-suggestion-diagnostics"} |
| {"id": "rust_117715", "text": "`self: &Box<Self>` produces confusing error due to failure to spot elided lifetime | ### Code ```Rust struct Concrete(u32); impl Concrete { fn m(self: &std::boxed::Box<Self>) -> &u32 { &self.0 } } ``` ### Current output ```Shell error[E0106]: missing lifetime specifier --> src/lib.rs:4:43 | 4 | fn m(self: &std::boxed::Box<Self>) -> &u32 { | ---------------------- | labels: A-diagnostics, A-lifetimes, T-compiler, C-bug, D-confusing"} |
| {"id": "rust_117717", "text": "Lint on pointer comparisons for non-thin pointers. | Per the 2023-11-08 lang triage meeting, lang would like to see a lint like the one in the second bullet from https://github.com/rust-lang/rust/issues/106447#issuecomment-1769077122 : > Deprecate comparisons (Eq/Ord) on dyn trait pointers by adding a lint which encourages people t | labels: A-lints, T-compiler, E-help-wanted"} |
| {"id": "rust_117720", "text": "let-chains parsing is not resilient to stray `;` between `let`s | ### Code ```Rust #![feature(let_chains)] fn main() { if let () = () && let () = (); && let () = () { } } ``` ### Current output ```Shell error: expected `{`, found `;` --> src/main.rs:4:23 | 4 | && let () = (); | ^ expected `{` | note: the `if` expression is missing a block after | labels: E-easy, A-diagnostics, A-parser, T-compiler, D-papercut, F-let_chains"} |
| {"id": "rust_117721", "text": "Some tests are incorrectly skipped for macOS CI | CI specifies these two jobs for x86_64-apple-darwin: https://github.com/rust-lang/rust/blob/341efb10174bdd22912aae487917c9213255b20f/src/ci/github-actions/ci.yml#L528-L544 Note these two lines (with padding I've added): ``` ./x.py --stage 2 test --skip tests/ui --skip tests/rustd | labels: O-macos, T-bootstrap, A-CI |
| idrust_117728textice: OOB in diagnostic | <!-- ICE: Rustc ./075C1A7E69ACE437D72A9D1988F90611233D539324434405B6074A2A51B82EE5.rs '' 'thread 'rustc' panicked at compiler/rustc_hir_typeck/src/method/suggest.rs:3267:28: 'index out of bounds: the len is 0 but the index is 0'', 'thread 'rustc' panicked at compiler/rustc_hir_ty | labels: A-diagnostics, I-ICE, T-compiler, C-bug"} |
| {"id": "rust_117732", "text": "Build error when calling non-const function | There is a build error when calling a non-const function `CMSG_SPACE` where a constant is expected [source](https://github.com/rust-lang/rust/blob/beta/library/std/src/sys/unix/process/process_unix.rs) ``` error[E0015]: cannot call non-const fn `CMSG_SPACE` in constants --> prebu"} |
| {"id": "rust_117733", "text": "StorageLive of live local when building tokio with -Zcross-crate-inline-threshold=always + high MIR inlining threshold | Reproduces with https://github.com/tokio-rs/tokio on commit `19d96c067410e30da29978be3513824645902a84` ``` cd tokio/tokio RUSTFLAGS=\"-Ztreat-err-as-bug -Zcross-crate-inline-threshold=always -Zinline-mir-hint-threshold=10000 -Zinline-mir-threshold=10000\" cargo b --release --featur | labels: I-ICE, C-bug, A-coroutines, A-mir-opt, A-mir-opt-inlining, -Zvalidate-mir"} |
| {"id": "rust_117739", "text": "error: linking with `cc` failed: exit status: 1 with Mac M2 to build linux_amd64 | <!-- 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-patterns/ --> ### Code "} |
| {"id": "rust_117746", "text": "Can get access to private struct field out of `impl` block | I have struct definition: ``` // src/draw.rs: line 37 pub struct App { field: Mutex<Field>, should_exit: AtomicBool, pause: AtomicBool, maxgen: AtomicU64, upd_timeout: AtomicU64, frames: AtomicU16, } ``` But I can directly access for all these private fields out of `impl` block m | labels: C-bug"} |
| {"id": "rust_117747", "text": "Incorrect `#derive(Clone, Copy)` for structs containing references | Shared references are `Copy` no matter what they point to, so deriving copy on a struct containing such a reference works fine: ```rust #[derive(Clone, Copy)] struct Foo<'a, T>(&'a T); ``` Then, because `Foo` now implements `Copy`, I expected this to work ```rust fn toto<'a, T>(o | labels: C-bug |
| idrust_117752textExperiment: run Crater with strict provenance lints | I'd like to do a Crater run with the strict provenance `fuzzy_provenance_casts` lint enabled. This follows from a conversation on Zulip (https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/Pre-RFC.20discussion.3A.20usize.20semantics/near/398681981). Hopefully doin | labels: S-waiting-on-review, A-strict-provenance"} |
| {"id": "rust_117759", "text": "Deadlock detected with \"-Z threads=8\" | <!-- 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-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler"} |
| {"id": "rust_117760", "text": "collect for hashmap | <!-- Hello I dont know why every time i run this my Vec is sorted but the hashmap keys are shuffle every time --> I tried this code: ```rust use std::collections::HashMap; fn main() { println!(\"{:?}\", maping(5)); } fn maping(size: u32) -> HashMap<u32, Vec<u32>> { let j: Vec<u32> | labels: C-bug"} |
| {"id": "rust_117761", "text": "Enabling GVN produces a const allocation with the wrong alignment? | ``` rustc +nightly ice.rs -Copt-level=0 -Zmir-opt-level=2 -Zinline-mir -Zmir-enable-passes=+GVN ``` ```rust struct Affine2 { matrix2: Mat2, translation: Vec2, } impl Affine2 { #[inline] fn inverse(&self) { mat2_ref(&self.matrix2); vec2_move(self.translation); } } #[derive(Clone, | labels: I-ICE, T-compiler, C-bug, requires-nightly, A-mir-opt"} |
| {"id": "rust_117762", "text": "`x clean compiler/rustc_middle` errors with a stability error | On current master 4c8862b26330ae7a60b3ae0023fab86bcc48613a, I ran `x clean compiler/rustc_middle` in the root. This doesn't clean anything but errors with ``` error: failed to load manifest for workspace member `/home/nils/projects/rust/library/std` Caused by: failed to parse man | labels: T-bootstrap, C-bug, regression-untriaged |
| idrust_117766textlet-chains parsing is not resilient to stray `{` between `let`s | ### Code ```Rust #![feature(let_chains)] fn main() { if let () = () && let () = () { && let () = () { } } ``` ### Current output ```Shell error: this file contains an unclosed delimiter --> src/main.rs:8:2 | 2 | fn main() { | - unclosed delimiter 3 | if let () = () 4 | && let () | labels: E-hard, A-diagnostics, A-parser, P-low, T-compiler, A-suggestion-diagnostics |
| idrust_117767textParallel compiler frontend deadlock | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> Found whe | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler |
| idrust_117768texthyper 0.14.27 ICE w/ RUSTFLAGS=\ | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> You shoul | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler |
| idrust_117775textDeadlock after cargo clean / cargo build with \ | <!-- Thank you for finding an Internal Compiler Error! 🧊 If possible, try to provide a minimal verifiable example. You can read \ for how to create smaller examples. http://blog.pnkfx.org/blog/2019/11/18/rust-bug-minimization-patterns/ --> ### Code | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler |
| idrust_117777textno ImplicitCtxt stored in tls | First `cargo build` crashed after upgrade to nightly, second run succeeded. My config.toml is using the latest parallelism feature: ``` [build] rustflags = [\, \, \, \] ``` Terminal output: <details> ``` thread 'rustc' panicked at /rustc/0f44eb32f | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler |
| idrust_117780textCompile ohos target fail | When build ohos-toolchain with ./x.py dist get error: thread 'main' panicked at src/lib.rs:1731:25: could not read dir \: 0s {code:2, kind:NotFound, message:\} config.toml ```toml profile | labels: C-bug |
| idrust_117784textdeadlock detected when using -Zthreads=8 | I just tried out the new parallelization feature of the compiler and it randomly panicked because a deadlock was detected. I tried a couple of times and could not reproduce it unfortunately. ### Meta `rustc --version --verbose`: ``` cargo 1.75.0-nightly (7046d992f 2023-11-08) ``` | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler |
| idrust_117785textno ImplicitCtxt stored in tls when using -Zthreads=8 | Compiler panicked when compiling big project with parallelization feature enabled. ### Meta `rustc --version --verbose`: ``` cargo 1.75.0-nightly (7046d992f 2023-11-08) ``` ### Error output ``` thread 'rustc' panicked at /rustc/0f44eb32f1123ac93ab404d74c295263ce468343/compiler/ru | labels: I-ICE, T-compiler, C-bug, A-parallel-compiler |
| idrust_117786textdeno ICE with RUSTFLAGS=\ | Comping `deno` (large project) with `-Z threads=8` triggers an ICE. Deno takes ~7mins to compile (release) on M1 - It would be great to see speedups brought by `-Z threads`. ### To reproduce ```bash git clone --recurse-submodules https://github.com/denoland/deno RUSTFLAGS=\} |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : } |
| {: , : -Z threads=8\} |
| {: , : csrr t0, usstatus\csrr t0, usstatus\} |
| {: , : } |
| {: , : } |
| {: , : line-tables-only\} |
| {: , : } |
| {: , : } |
| {: , : ser\} |
| {: , : } |
| {: , : } |
| {: , : may define implies must define\} |
| {: , : Unexpected free regions in MIR\/* {0} */\} |
| {: , : } |
| {: , : Rust Bug Minimization Patterns\} |
| {: , : } |
| {: , : } |
| {: , : } |
|
|