jiebi/CodeConvo huggingface dataset:
Change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: expected type of closure to be a closure', 'error: internal compiler error: expected type of closure to be a closure' File: --auto-reduced (treereduce-rust): original: Version information Command: &lt;!-- Include a backtrace in the code block by setting in your environment. E.g. . --&lt;details&lt;summary&lt;strongProgram output&lt;/strong&lt;/summary&lt;p&lt;/p&lt;/details&lt;!-- query stack: [mirbuilt] building MIR for [unsafetycheckresult] unsafety-checking [mirconst] preparing for borrow checking [mirpromoted] promoting constants in MIR for [mirborrowck] borrow-checking [typeofopaque] computing type of opaque [typeof] computing type of [checkmoditemtypes] checking item types in top-level module [analysis] running analysis passes on this crate --
regression in ping
nice, that's one of the ICE messages I just too

Discussion:
let mir_opaque_ty = tcx.mir_borrowck(owner_def_id).concrete_opaque_types.get(&def_id).copied(); if let Some(mir_opaque_ty) = mir_opaque_ty { <ins> if mir_opaque_ty.references_error() { return mir_opaque_ty.ty; } </ins> let scope = tcx.local_def_id_to_hir_id(owner_def_id); debug!(?scope); let mut locator = RpitConstraintChecker { def_id, tcx, found: mir_opaque_ty };

<ins> trait Foo {} trait T { fn a(&self) -> impl Foo { self.b(|| 0) //~^ ERROR no method named `b` found for reference `&Self` in the current scope } } fn main() {} </ins>

<ins> error[E0599]: no method named `b` found for reference `&Self` in the current scope --> $DIR/issue-117794.rs:5:14 | LL |         self.b(|| 0) |              ^ help: there is a method with a similar name: `a` error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0599`. </ins>
Change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at 'assertion failed'', 'thread 'rustc' panicked at 'assertion failed'' File: --auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- query stack: [visibility] computing visibility of [effectivevisibilities] checking effective visibilities [checkmoditem_types] checking item types in top-level module [analysis] running analysis passes on this crate --
Regression in ping
Fixed in

Discussion:
binding = self.r.resolution(module, key).try_borrow().ok().and_then(|r| r.binding); debug!(?binding); } <ins> let feed_visibility = |this: &mut Self, def_id| { let vis = this.r.tcx.visibility(def_id).expect_local(); this.r.feed_visibility(this.r.local_def_id(id), vis); }; </ins> let Some(binding) = binding else { // We could not find the method: report an error. let candidate = self.find_similarly_named_assoc_item(ident.name, kind); let path = &self.current_trait_ref.as_ref().unwrap().1.path; let path_names = path_names_to_string(path); self.report_error(span, err(ident, path_names, candidate)); <ins> feed_visibility(self, module.def_id()); </ins> return; }; let res = binding.res(); let Res::Def(def_kind, id_in_trait) = res else { bug!() }; <ins> feed_visibility(self, id_in_trait); </ins> match seen_trait_items.entry(id_in_trait) { Entry::Occupied(entry) => {

| (DefKind::AssocFn, AssocItemKind::Fn(..)) | (DefKind::AssocConst, AssocItemKind::Const(..)) => { self.r.record_partial_res(id, PartialRes::new(res)); <del> let vis = self.r.tcx.visibility(id_in_trait).expect_local(); self.r.feed_visibility(self.r.local_def_id(id), vis); </del> return; } _ => {}

<ins> // edition:2018 trait MyTrait { async fn resolved(&self); const RESOLVED_WRONG: u8 = 0; } impl MyTrait for i32 { async fn resolved(&self) {} async fn unresolved(&self) {} //~ ERROR method `unresolved` is not a member of trait `MyTrait` async fn RESOLVED_WRONG() {} //~ ERROR doesn't match its trait `MyTrait` } fn main() {} </ins>

<ins> error[E0407]: method `unresolved` is not a member of trait `MyTrait` --> $DIR/unresolved-trait-impl-item.rs:11:5 | LL |     async fn unresolved(&self) {} |     ^^^^^^^^^----------^^^^^^^^^^ |     |        | |     |        help: there is an associated function with a similar name: `resolved` |     not a member of trait `MyTrait` error[E0324]: item `RESOLVED_WRONG` is an associated method, which doesn't match its trait `MyTrait` --> $DIR/unresolved-trait-impl-item.rs:12:5 | LL |     const RESOLVED_WRONG: u8 = 0; |     ----------------------------- item in trait ... LL |     async fn RESOLVED_WRONG() {} |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ does not match trait error: aborting due to 2 previous errors Some errors have detailed explanations: E0324, E0407. For more information about an error, try `rustc --explain E0324`. </ins>
Change:
<!-- 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. --<!-- 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. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
Looks like it's taking a while to update that measureme there a temporary fix I can do on my end? Happy to compile a version of the compiler if that's what it takes

Discussion:
[[package]] name = "measureme" <del> version = "10.1.2" </del> <ins> version = "11.0.1" </ins> source = "registry+https://github.com/rust-lang/crates.io-index" <del> checksum = "45e381dcdad44c3c435f8052b08c5c4a1449c48ab56f312345eae12d7a693dbe" </del> <ins> checksum = "dfa4a40f09af7aa6faef38285402a78847d0d72bf8827006cd2a332e1e6e4a8d" </ins> dependencies = [ "log", "memmap2",

bitflags = "2.4.1" itertools = "0.11" libc = "0.2" <del> measureme = "10.0.0" </del> <ins> measureme = "11" </ins> object = { version = "0.32.0", default-features = false, features = ["std", "read"] } rustc-demangle = "0.1.21" rustc_ast = { path = "../rustc_ast" }

itertools = "0.11" jobserver_crate = { version = "0.1.27", package = "jobserver" } libc = "0.2" <del> measureme = "10.0.0" </del> <ins> measureme = "11" </ins> rustc-hash = "1.1.0" rustc-rayon = { version = "0.5.0", optional = true } rustc-rayon-core = { version = "0.5.0", optional = true }

either = "1.5.0" field-offset = "0.3.5" gsgdt = "0.1.2" <del> measureme = "10.0.0" </del> <ins> measureme = "11" </ins> polonius-engine = "0.13.0" rustc-rayon = { version = "0.5.0", optional = true } rustc-rayon-core = { version = "0.5.0", optional = true }

[dependencies] # tidy-alphabetical-start field-offset = "0.3.5" <del> measureme = "10.0.0" </del> <ins> measureme = "11" </ins> rustc-rayon-core = { version = "0.5.0", optional = true } rustc_data_structures = { path = "../rustc_data_structures" } rustc_errors = { path = "../rustc_errors" }

rand = "0.8" smallvec = "1.7" aes = { version = "0.8.3", features = ["hazmat"] } <del> measureme = "10.0.0" </del> <ins> measureme = "11" </ins> ctrlc = "3.2.5" # Copied from `compiler/rustc/Cargo.toml`.
Change:
will introduce this submodule. Any changes here need all codegen backends to implement them. And portable-simd likely wants to know about it. As such I propose adding a ping for any change to this file mentioning me, and

Discussion:
message = "Some changes might have occurred in exhaustiveness checking" cc = ["@Nadrieril"] <ins> [mentions."library/core/src/intrinsics/simd.rs"] message = """ Some changes occurred to the platform-builtins intrinsics. Make sure the LLVM backend as well as portable-simd gets adapted for the changes. """ cc = ["@antoyo", "@GuillaumeGomez", "@bjorn3", "@calebzulawski", "@programmerjake"] </ins> [mentions."library/portable-simd"] message = """ Portable SIMD is developed in its own repository. If possible, consider
Change:
:
Minimized:
Reminds me of
Upstream fix:
WG-prioritization assigning priority (). label -I-prioritize +P-high

Discussion:
<del> Subproject commit 606bc11367b475542bd6228163424ca43b4dbdbc </del> <ins> Subproject commit 700fbf978e6c5bb297d12963206f7487722de480 </ins>
Change:
I tried compiling this code with : (Thanks to for helping me find this shorter reproducer) I expected to see this happen: (nothing, since there's no main method) a clean compile Instead, this happened: (Or, when compiling through :) : Note: this crashes on the playground on nightly (2023-12-20 ), beta (1.75.0-beta.7), and stable (1.74.1). Also crashes on aarch64-apple-darwin nightly (2023-12-19 ), beta (1.75.0-beta.7) and stable (1.74.1) <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summaryBacktrace</summary<p(From since I don't have a debug build on macOS yet) </p</details
It's probably on our side since it's tripping an LLVM assert? (or is it tripped by an incorrect optimization maybe?)
Reduced:
Upstream fix:
could you please try adding and see if it still reproduces? I had thought this was cortex-m/thumb specific, but might be relevant to all ARM targets. CC: edit: Ah nikic might have already found a more specific issue, probably nevermind :)
I verified successfully that this also fixes the build for my codebase where I originally found this (by cherry-picking only your commit on top of the currently used nightly llvm branch in rust-lang/rust, ) edit Sorry, just saw your comment as I was leaving. I can try that later, but since it also reproduces on the (linux/ guessing amd64?) rust playground, I doubt this is ARM-related.
The argument doesn't seem to make a difference, neither on stable/beta, nor on nightly. Current versions (as in my initial post) all crash (with and without the flag), and the stage1 I built with fix works fine with and without the flag.
I'm confused, this code still crashes with yesterday's nightly? Could it be that the alternative fix you selected doesn't fully fix the issue I'm seeing?
I had also tested my code using your cherry-picked fix () based on llvm again, and saw the crash still happen. Apologies, I seemingly had written the comment but forgot to send.
Hm yeah, I tested my original fix against the original test case, but not the final version. Let me take another look.
New reduction: Took me a while to spot how this differs from the previous one: The branch destinations are swapped...
New upstream fix:
When cherry-picking this onto latest rust master (, llvm ), I get: Is this expected?
Are you sure the commit was picked up? The patch removes that assertion.
Reopening, the auto closing on a merge in fork seems unintentional.
yes, unintentional. If someone has a way to prevent that I'd appreciate it.
duh, forgot to commit the llvm submodule, thanks. Confirmed no crash, also builds my original project without issue.
Fixed in beta & nightly.

Discussion:
<del> Subproject commit 606bc11367b475542bd6228163424ca43b4dbdbc </del> <ins> Subproject commit 700fbf978e6c5bb297d12963206f7487722de480 </ins>
Change:
<!-- ICE: Rustc '' 'thread 'rustc' panicked at 'Normalizing Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ 24C571BC08516AAF219327E12F0FEDBF5591EB2DFE1FD843CF7E2D7C1441FB55[8fdb]::main::'a), 'a) }), ReError], defid: DefId(0:9 ~ 24C571BC08516AAF219327E12F0FEDBF5591EB2DFE1FD843CF7E2D7C1441FB55[8fdb]::Foo) }) without wrapping in a '', 'thread 'rustc' panicked at 'Normalizing Alias(Weak, AliasTy { args: [ReBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed(DefId(0:13 ~ 24C571BC08516AAF219327E12F0FEDBF5591EB2DFE1FD843CF7E2D7C1441FB55[8fdb]::main::'a), 'a) }), ReError], defid: DefId(0:9 ~ 24C571BC08516AAF219327E12F0FEDBF5591EB2DFE1FD843CF7E2D7C1441FB55[8fdb]::Foo) }) without wrapping in a '' File: --auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- query stack: [checkmoditem_types] checking item types in top-level module [analysis] running analysis passes on this crate --
Regression in ping

Discussion:
if let Some(term_did) = tcx.lang_items().termination() { let return_ty = main_fnsig.output(); let return_ty_span = main_fn_return_type_span(tcx, main_def_id).unwrap_or(main_span); <del> let return_ty = return_ty.skip_binder(); </del> <ins> let Some(return_ty) = return_ty.no_bound_vars() else { tcx.sess.emit_err(errors::MainFunctionReturnTypeGeneric { span: return_ty_span }); return; }; </ins> let infcx = tcx.infer_ctxt().build(); let cause = traits::ObligationCause::new( return_ty_span,

<ins> // issue-119209 fn main<'a>(_: &'a i32) -> &'a () { &() } //~ERROR `main` function return type is not allowed to have generic parameters </ins>

<ins> error[E0131]: `main` function return type is not allowed to have generic parameters --> $DIR/return-ty-has-bound-vars.rs:3:28 | LL | fn main<'a>(_: &'a i32) -> &'a () { &() } |                            ^^^^^^ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0131`. </ins>
Change:
Here it's obvious, but when the error says that it is mismatched with and that "types differ in mutability" then I have zero chance of figuring what's going on. No response No response <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOT_END --
claim Sounds like a feature I would like to use as well.

Discussion:
} } #[rustc_lint_diagnostics] <del> fn highlighted_note(&mut self, msg: Vec<StringPart>) -> &mut Self { </del> <ins> pub fn highlighted_note(&mut self, msg: Vec<StringPart>) -> &mut Self { </ins> self.sub_with_highlights(Level::Note, msg, MultiSpan::new()); self }

use rustc_data_structures::fx::{FxIndexMap, FxIndexSet}; use rustc_errors::{ codes::*, pluralize, struct_span_code_err, Applicability, Diag, DiagCtxt, DiagStyledString, <del> ErrorGuaranteed, IntoDiagArg, </del> <ins> ErrorGuaranteed, IntoDiagArg, StringPart, </ins> }; use rustc_hir as hir; use rustc_hir::def::DefKind;

); if !is_simple_error || terr.must_include_note() { diag.note_expected_found(&expected_label, expected, &found_label, found); <ins> if let Some(ty::Closure(_, args)) = exp_found.map(|expected_type_found| expected_type_found.found.kind()) { diag.highlighted_note(vec![ StringPart::normal("closure has signature: `"), StringPart::highlighted( self.tcx .signature_unclosure( args.as_closure().sig(), rustc_hir::Unsafety::Normal, ) .to_string(), ), StringPart::normal("`"), ]); } </ins> } } }

<ins> fn main() { let x = |a: u8, b: (usize, u32), c: fn() -> char| -> String { "I love beans.".to_string() }; //~^ NOTE: the found closure let x: fn(i32) = x; //~^ ERROR: 5:22: 5:23: mismatched types [E0308] //~| NOTE: incorrect number of function parameters //~| NOTE: expected due to this //~| NOTE: expected fn pointer `fn(i32)` //~| NOTE: closure has signature: `fn(u8, (usize, u32), fn() -> char) -> String` } </ins>

<ins> error[E0308]: mismatched types --> $DIR/hint-closure-signature-119266.rs:5:22 | LL |     let x = |a: u8, b: (usize, u32), c: fn() -> char| -> String { "I love beans.".to_string() }; |             --------------------------------------------------- the found closure ... LL |     let x: fn(i32) = x; |            -------   ^ incorrect number of function parameters |            | |            expected due to this | = note: expected fn pointer `fn(i32)` found closure `{closure@$DIR/hint-closure-signature-119266.rs:2:13: 2:64}` = note: closure has signature: `fn(u8, (usize, u32), fn() -> char) -> String` error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0308`. </ins>
Change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: shouldn't have created a ValTree for const NoDerive', 'error: internal compiler error: shouldn't have created a ValTree for const NoDerive' File: --auto-reduced (treereduce-rust): original: Version information ` Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- query stack: [valtreetoconstval] converting type-level constant value to mir constant value [mirdropselaboratedandconstchecked] elaborating drops for [analysis] running analysis passes on this crate --
Regression in cc
Should be fixed by
label -needs-triage

Discussion:
ty::FnDef(_, _) => { // Zero-sized type, nothing to do. } <del> ty::Bool | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Char => { </del> <ins> ty::Bool | ty::Int(_) | ty::Uint(_) | ty::Float(_) | ty::Char | ty::RawPtr(..) => { </ins> let scalar_int = valtree.unwrap_leaf(); debug!("writing trivial valtree {:?} to place {:?}", scalar_int, place); ecx.write_immediate(Immediate::Scalar(scalar_int.into()), place).unwrap();

<ins> // run-pass // Eventually this will be rejected (when the future-compat lints are turned into hard errors), and // then this test can be removed. But meanwhile we should ensure that this works and does not ICE. struct NoDerive(i32); #[derive(PartialEq)] struct WrapEmbedded(*const NoDerive); const WRAP_UNSAFE_EMBEDDED: &&WrapEmbedded = &&WrapEmbedded(std::ptr::null()); fn main() { let b = match WRAP_UNSAFE_EMBEDDED { WRAP_UNSAFE_EMBEDDED => true, //~^ WARN: must be annotated with `#[derive(PartialEq, Eq)]` //~| previously accepted _ => false, }; assert!(b); } </ins>

<ins> warning: to use a constant of type `WrapEmbedded` in a pattern, `WrapEmbedded` must be annotated with `#[derive(PartialEq, Eq)]` --> $DIR/null-raw-ptr-issue-119270.rs:13:9 | LL |         WRAP_UNSAFE_EMBEDDED => true, |         ^^^^^^^^^^^^^^^^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #62411 <https://github.com/rust-lang/rust/issues/62411> = note: the traits must be derived, manual `impl`s are not sufficient = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details = note: `#[warn(indirect_structural_match)]` on by default warning: 1 warning emitted </ins>
Change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: No parent for node HirId(DefId(0:3 ~ code[c982]::noarmsorguards).13) (unknown node)', 'error: internal compiler error: No parent for node HirId(DefId(0:3 ~ code[c982]::noarmsorguards).13) (unknown node)' File: --snippet: Version information Command: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongProgram output</strong</summary<p</p</details<!-- query stack: [shallowlintlevelson] looking up lint levels for [typeck] type-checking [analysis] running analysis passes on this crate --
Regression in cc

Discussion:
fn lower_arm(&mut self, arm: &Arm) -> hir::Arm<'hir> { let pat = self.lower_pat(&arm.pat); <del> let mut guard = arm.guard.as_ref().map(|cond| { </del> <ins> let guard = arm.guard.as_ref().map(|cond| { </ins> if let ExprKind::Let(pat, scrutinee, span, is_recovered) = &cond.kind { hir::Guard::IfLet(self.arena.alloc(hir::Let { hir_id: self.next_id(),

} } else if let Some(body) = &arm.body { self.dcx().emit_err(NeverPatternWithBody { span: body.span }); <del> guard = None; </del> } else if let Some(g) = &arm.guard { self.dcx().emit_err(NeverPatternWithGuard { span: g.span }); <del> guard = None; </del> } // We add a fake `loop {}` arm body so that it typecks to `!`.

<ins> fn main() {} fn attr_in_guard() { match None::<u32> { Some(!) //~ ERROR `!` patterns are experimental if #[deny(unused_mut)] //~ ERROR attributes on expressions are experimental false //~ ERROR a guard on a never pattern will never be run } match false {} } </ins>

<ins> error[E0658]: attributes on expressions are experimental --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:6:16 | LL |             if #[deny(unused_mut)] |                ^^^^^^^^^^^^^^^^^^^ | = note: see issue #15701 <https://github.com/rust-lang/rust/issues/15701> for more information = help: add `#![feature(stmt_expr_attributes)]` to the crate attributes to enable error[E0658]: `!` patterns are experimental --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:5:14 | LL |         Some(!) |              ^ | = note: see issue #118155 <https://github.com/rust-lang/rust/issues/118155> for more information = help: add `#![feature(never_patterns)]` to the crate attributes to enable error: a guard on a never pattern will never be run --> $DIR/ICE-119271-never-arm-attr-in-guard.rs:7:13 | LL |             false |             ^^^^^ help: remove this guard error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0658`. </ins>
Change:
This code: crashes rustc with the following error message: If I remove the first match arm, the program compiles correctly. I was able to reproduce this only with &'static str constants. Other types of constants I have used seem to work fine. This happens on Rust 0.9. I cannot check it on master version because I can't compile it for some reason.
Compiling with a build of rust from yesterday () I get a different error:
I was just editing the issue to add a note that I'm using Rust 0.9 because for some reason I can't build the compiler from master.
I got bit by this today with a master build (): If you replace the static variable with its string literal things work again

Discussion:
use middle::trans::common::*; use middle::trans::debuginfo; use middle::trans::expr; <del> use middle::trans::type_of; </del> use middle::ty; use util::ppaux::Repr;

fn str_slice_arg<'a>(bcx: &'a Block<'a>, s: InternedString) -> ValueRef { let ccx = bcx.ccx(); <del> let t = ty::mk_str_slice(bcx.tcx(), ty::ReStatic, ast::MutImmutable); </del> let s = C_str_slice(ccx, s); let slot = alloca(bcx, val_ty(s), "__temp"); Store(bcx, s, slot); <del> // The type of C_str_slice is { i8*, i64 }, but the type of the &str is // %str_slice, so we do a bitcast here to the right type. BitCast(bcx, slot, type_of::type_of(ccx, t).ptr_to()) </del> <ins> slot </ins> } pub fn trans_fail<'a>(