jiebi/CodeConvo huggingface dataset:
Code 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
regression in cc
Hmm, I guess that before this function just received broken MIR and carried on, but exited due to the HIR errors without trying to dump it. Now that we return an error body for broken code we're getting a panic

Related discussion:
text: <ins> // compile-flags: -Zdrop-tracking-mir --edition=2021 #![feature(generators)] pub async fn async_bad_body() { match true {} //~ ERROR non-exhaustive patterns: type `bool` is non-empty } pub fn generator_bad_body() { || { // 'non-exhaustive pattern' only seems to be reported once, so this annotation doesn't work // keep the function around so we can make sure it doesn't ICE match true {}; // ERROR non-exhaustive patterns: type `bool` is non-empty yield (); }; } fn main() {} </ins>
Code 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
regression in cc
Hmm, I guess that before this function just received broken MIR and carried on, but exited due to the HIR errors without trying to dump it. Now that we return an error body for broken code we're getting a panic

Related discussion:
text: <ins> error[E0004]: non-exhaustive patterns: type `bool` is non-empty --> $DIR/drop-tracking-error-body.rs:6:11 | LL |     match true {} |           ^^^^ | = note: the matched value is of type `bool` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown | LL ~     match true { LL +         _ => todo!(), LL ~     } | error: aborting due to previous error For more information about this error, try `rustc --explain E0004`. </ins>
Code 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<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim

Related discussion:
text: let scope = Scope::TraitRefBoundary { s: self.scope }; self.with(scope, |this| { walk_list!(this, visit_generic_param, generics.params); <del> for param in generics.params { match param.kind { GenericParamKind::Lifetime { .. } => {} GenericParamKind::Type { default, .. } => { if let Some(ty) = default { this.visit_ty(ty); } } GenericParamKind::Const { ty, default } => { this.visit_ty(ty); if let Some(default) = default { this.visit_body(this.tcx.hir().body(default.body)); } } } } </del> walk_list!(this, visit_where_predicate, generics.predicates); }) }
Code 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<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim

Related discussion:
text: // like implicit `?Sized` or const-param-has-ty predicates. } } <ins> match p.kind { GenericParamKind::Lifetime { .. } => {} GenericParamKind::Type { default, .. } => { if let Some(ty) = default { self.visit_ty(ty); } } GenericParamKind::Const { ty, default } => { self.visit_ty(ty); if let Some(default) = default { self.visit_body(self.tcx.hir().body(default.body)); } } } </ins> } }
Code 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<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim

Related discussion:
text: <ins> #![feature(non_lifetime_binders)] //~^ WARNING the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes pub fn bar() where for<const N: usize = { (||1usize)() }> V: IntoIterator //~^ ERROR cannot find type `V` in this scope [E0412] { } fn main() { bar(); } </ins>
Code 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<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim

Related discussion:
text: <ins> error[E0412]: cannot find type `V` in this scope --> $DIR/issue-112547.rs:8:4 | LL | }> V: IntoIterator |    ^ not found in this scope | help: you might be missing a type parameter | LL | pub fn bar<V>() |           +++ warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/issue-112547.rs:1:12 | LL | #![feature(non_lifetime_binders)] |            ^^^^^^^^^^^^^^^^^^^^ | = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information = note: `#[warn(incomplete_features)]` on by default error: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0412`. </ins>
Code 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
Regression in nightly-2023-02-05 Regression in cc
Fixed on the latest nightly, marking as E-needs-test labels: +E-needs-test
I don't think this is actually fixed, just that the ICE cannot be triggered currently, but might resurface when the effects feature is fully implemented.

Related discussion:
text: <ins> #![feature(const_trait_impl, effects)] const fn test() -> impl ~const Fn() { //~ ERROR ~const can only be applied to `#[const_trait]` traits const move || { //~ ERROR const closures are experimental let sl: &[u8] = b"foo"; match sl { [first, remainder @ ..] => { assert_eq!(first, &b'f'); } [] => panic!(), } } } fn main() {} </ins>
Code 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
Regression in nightly-2023-02-05 Regression in cc
Fixed on the latest nightly, marking as E-needs-test labels: +E-needs-test
I don't think this is actually fixed, just that the ICE cannot be triggered currently, but might resurface when the effects feature is fully implemented.

Related discussion:
text: <ins> error[E0658]: const closures are experimental --> $DIR/ice-112822-expected-type-for-param.rs:4:5 | LL |     const move || { |     ^^^^^ | = note: see issue #106003 <https://github.com/rust-lang/rust/issues/106003> for more information = help: add `#![feature(const_closures)]` to the crate attributes to enable error: ~const can only be applied to `#[const_trait]` traits --> $DIR/ice-112822-expected-type-for-param.rs:3:32 | LL | const fn test() -> impl ~const Fn() { |                                ^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0658`. </ins>
Code change:
is left set to a dangling pointer if unwinds. This is unsound because a later call to will use that dangling pointer. There is a similar issue with and unwinding. since you're on the Stable MIR cc list: cc
if you can add it as a dependency, using would probably be better than rolling your own version.
Yea, that makes sense. I think we should look into using it for the module, too, which is how we get a within the compiler itself

Related discussion:
text: "rustc_hir", "rustc_middle", "rustc_span", <ins> "scoped-tls", </ins> "tracing", ]
Code change:
is left set to a dangling pointer if unwinds. This is unsound because a later call to will use that dangling pointer. There is a similar issue with and unwinding. since you're on the Stable MIR cc list: cc
if you can add it as a dependency, using would probably be better than rolling your own version.
Yea, that makes sense. I think we should look into using it for the module, too, which is how we get a within the compiler itself

Related discussion:
text: rustc_middle = { path = "../rustc_middle", optional = true } rustc_span = { path = "../rustc_span", optional = true } tracing = "0.1" <ins> scoped-tls = "1.0" </ins> [features] default = [
Code change:
is left set to a dangling pointer if unwinds. This is unsound because a later call to will use that dangling pointer. There is a similar issue with and unwinding. since you're on the Stable MIR cc list: cc
if you can add it as a dependency, using would probably be better than rolling your own version.
Yea, that makes sense. I think we should look into using it for the module, too, which is how we get a within the compiler itself

Related discussion:
text: // Make this module private for now since external users should not call these directly. mod rustc_smir; <ins> #[macro_use] extern crate scoped_tls; </ins>
Code change:
is left set to a dangling pointer if unwinds. This is unsound because a later call to will use that dangling pointer. There is a similar issue with and unwinding. since you're on the Stable MIR cc list: cc
if you can add it as a dependency, using would probably be better than rolling your own version.
Yea, that makes sense. I think we should look into using it for the module, too, which is how we get a within the compiler itself

Related discussion:
text: fn rustc_tables(&mut self, f: &mut dyn FnMut(&mut Tables<'_>)); } <del> thread_local! { /// A thread local variable that stores a pointer to the tables mapping between TyCtxt /// datastructures and stable MIR datastructures. static TLV: Cell<*mut ()> = const { Cell::new(std::ptr::null_mut()) }; } </del> <ins> // A thread local variable that stores a pointer to the tables mapping between TyCtxt // datastructures and stable MIR datastructures scoped_thread_local! (static TLV: Cell<*mut ()>); </ins> pub fn run(mut context: impl Context, f: impl FnOnce()) { <del> assert!(TLV.get().is_null()); </del> <ins> assert!(!TLV.is_set()); </ins> fn g<'a>(mut context: &mut (dyn Context + 'a), f: impl FnOnce()) { <del> TLV.set(&mut context as *mut &mut _ as _); f(); TLV.replace(std::ptr::null_mut()); </del> <ins> let ptr: *mut () = &mut context as *mut &mut _ as _; TLV.set(&Cell::new(ptr), || { f(); }); </ins> } g(&mut context, f); }
Code change:
is left set to a dangling pointer if unwinds. This is unsound because a later call to will use that dangling pointer. There is a similar issue with and unwinding. since you're on the Stable MIR cc list: cc
if you can add it as a dependency, using would probably be better than rolling your own version.
Yea, that makes sense. I think we should look into using it for the module, too, which is how we get a within the compiler itself

Related discussion:
text: /// Loads the current context and calls a function with it. /// Do not nest these, as that will ICE. pub(crate) fn with<R>(f: impl FnOnce(&mut dyn Context) -> R) -> R { <del> let ptr = TLV.replace(std::ptr::null_mut()) as *mut &mut dyn Context; assert!(!ptr.is_null()); let ret = f(unsafe { *ptr }); TLV.set(ptr as _); ret </del> <ins> assert!(TLV.is_set()); TLV.with(|tlv| { let ptr = tlv.get(); assert!(!ptr.is_null()); f(unsafe { *(ptr as *mut &mut dyn Context) }) }) </ins> }
Code 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
cc
This also ICEs on stable with the same error, so I don't think this is related to any of my recent changes at a glance. Having a look at it though
Regression in nightly-2021-09-01 commit[0] 2021-08-30: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[1] 2021-08-30: Auto merge of - lcnr:cec-rename, r=oli-obk commit[2] 2021-08-31: Auto merge of - HTG-YT:edition2021-compopt-stabilization, r=m-ou-se commit[3] 2021-08-31: Auto merge of - Aaron1011:guess-foreign-head-span, r=estebank commit[4] 2021-08-31: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[5] 2021-08-31: Auto merge of - RalfJung:miri, r=RalfJung commit[6] 2021-08-31: Auto merge of - m-ou-se:rollup-az6xtc5, r=m-ou-se commit[7] 2021-08-31: Auto merge of - m-ou-se:rollup-jeusxbo, r=m-ou-se commit[8] 2021-08-31: Auto merge of - Mark-Simulacrum:fix-rlibs, r=ehuss
I suspect that might be a false positive bisect?
ah meh, probably, if the feature gate was renamed or something, the code with the "new" feature gate might no longer trigger the ice once needed the old feature gate -_-
Bisected to nightly-2022-11-27, probably caused by . <details<summary<codecargo-bisect-rustc</codeoutput </summary</details

Related discussion:
text: use rustc_hir::{HirId, Pat, PatKind}; use rustc_infer::infer; use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind}; <ins> use rustc_middle::mir::interpret::ErrorHandled; </ins> use rustc_middle::ty::{self, Adt, BindingMode, Ty, TypeVisitableExt}; use rustc_session::lint::builtin::NON_EXHAUSTIVE_OMITTED_PATTERNS; use rustc_span::edit_distance::find_best_match_for_name;
Code 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
cc
This also ICEs on stable with the same error, so I don't think this is related to any of my recent changes at a glance. Having a look at it though
Regression in nightly-2021-09-01 commit[0] 2021-08-30: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[1] 2021-08-30: Auto merge of - lcnr:cec-rename, r=oli-obk commit[2] 2021-08-31: Auto merge of - HTG-YT:edition2021-compopt-stabilization, r=m-ou-se commit[3] 2021-08-31: Auto merge of - Aaron1011:guess-foreign-head-span, r=estebank commit[4] 2021-08-31: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[5] 2021-08-31: Auto merge of - RalfJung:miri, r=RalfJung commit[6] 2021-08-31: Auto merge of - m-ou-se:rollup-az6xtc5, r=m-ou-se commit[7] 2021-08-31: Auto merge of - m-ou-se:rollup-jeusxbo, r=m-ou-se commit[8] 2021-08-31: Auto merge of - Mark-Simulacrum:fix-rlibs, r=ehuss
I suspect that might be a false positive bisect?
ah meh, probably, if the feature gate was renamed or something, the code with the "new" feature gate might no longer trigger the ice once needed the old feature gate -_-
Bisected to nightly-2022-11-27, probably caused by . <details<summary<codecargo-bisect-rustc</codeoutput </summary</details

Related discussion:
text: len: ty::Const<'tcx>, min_len: u64, ) -> (Option<Ty<'tcx>>, Ty<'tcx>) { <del> let guar = if let Some(len) = len.try_eval_target_usize(self.tcx, self.param_env) { </del> <ins> let len = match len.eval(self.tcx, self.param_env, None) { Ok(val) => val .try_to_scalar() .and_then(|scalar| scalar.try_to_int().ok()) .and_then(|int| int.try_to_target_usize(self.tcx).ok()), Err(ErrorHandled::Reported(..)) => { let guar = self.error_scrutinee_unfixed_length(span); return (Some(Ty::new_error(self.tcx, guar)), arr_ty); } Err(ErrorHandled::TooGeneric(..)) => None, }; let guar = if let Some(len) = len { </ins> // Now we know the length... if slice.is_none() { // ...and since there is no variable-length pattern,
Code 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
cc
This also ICEs on stable with the same error, so I don't think this is related to any of my recent changes at a glance. Having a look at it though
Regression in nightly-2021-09-01 commit[0] 2021-08-30: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[1] 2021-08-30: Auto merge of - lcnr:cec-rename, r=oli-obk commit[2] 2021-08-31: Auto merge of - HTG-YT:edition2021-compopt-stabilization, r=m-ou-se commit[3] 2021-08-31: Auto merge of - Aaron1011:guess-foreign-head-span, r=estebank commit[4] 2021-08-31: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[5] 2021-08-31: Auto merge of - RalfJung:miri, r=RalfJung commit[6] 2021-08-31: Auto merge of - m-ou-se:rollup-az6xtc5, r=m-ou-se commit[7] 2021-08-31: Auto merge of - m-ou-se:rollup-jeusxbo, r=m-ou-se commit[8] 2021-08-31: Auto merge of - Mark-Simulacrum:fix-rlibs, r=ehuss
I suspect that might be a false positive bisect?
ah meh, probably, if the feature gate was renamed or something, the code with the "new" feature gate might no longer trigger the ice once needed the old feature gate -_-
Bisected to nightly-2022-11-27, probably caused by . <details<summary<codecargo-bisect-rustc</codeoutput </summary</details

Related discussion:
text: <ins> #![allow(incomplete_features)] #![feature(generic_const_exprs)] fn something(path: [usize; N]) -> impl Clone { //~^ ERROR cannot find value `N` in this scope match path { [] => 0, //~ ERROR cannot pattern-match on an array without a fixed length _ => 1, }; } fn main() {} </ins>
Code 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
cc
This also ICEs on stable with the same error, so I don't think this is related to any of my recent changes at a glance. Having a look at it though
Regression in nightly-2021-09-01 commit[0] 2021-08-30: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[1] 2021-08-30: Auto merge of - lcnr:cec-rename, r=oli-obk commit[2] 2021-08-31: Auto merge of - HTG-YT:edition2021-compopt-stabilization, r=m-ou-se commit[3] 2021-08-31: Auto merge of - Aaron1011:guess-foreign-head-span, r=estebank commit[4] 2021-08-31: Auto merge of - sexxi-goose:issue-, r=nikomatsakis commit[5] 2021-08-31: Auto merge of - RalfJung:miri, r=RalfJung commit[6] 2021-08-31: Auto merge of - m-ou-se:rollup-az6xtc5, r=m-ou-se commit[7] 2021-08-31: Auto merge of - m-ou-se:rollup-jeusxbo, r=m-ou-se commit[8] 2021-08-31: Auto merge of - Mark-Simulacrum:fix-rlibs, r=ehuss
I suspect that might be a false positive bisect?
ah meh, probably, if the feature gate was renamed or something, the code with the "new" feature gate might no longer trigger the ice once needed the old feature gate -_-
Bisected to nightly-2022-11-27, probably caused by . <details<summary<codecargo-bisect-rustc</codeoutput </summary</details

Related discussion:
text: <ins> error[E0425]: cannot find value `N` in this scope --> $DIR/issue-116186.rs:4:28 | LL | fn something(path: [usize; N]) -> impl Clone { |                            ^ not found in this scope | help: you might be missing a const parameter | LL | fn something<const N: /* Type */>(path: [usize; N]) -> impl Clone { |             +++++++++++++++++++++ error[E0730]: cannot pattern-match on an array without a fixed length --> $DIR/issue-116186.rs:7:9 | LL |         [] => 0, |         ^^ error: aborting due to 2 previous errors Some errors have detailed explanations: E0425, E0730. For more information about an error, try `rustc --explain E0425`. </ins>
Code 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
Can be reduced to
Also causes the out of bounds panic (), but not the earlier type mismatch ICE
Triage: Fixed on the latest nightly, marked as E-needs-test labels: +E-needs-test

Related discussion:
text: <ins> // test for #113326 #![feature(type_alias_impl_trait)] pub type Diff = impl Fn(usize) -> usize; pub fn lift() -> Diff { |_: usize |loop {} } pub fn add( n: Diff, m: Diff, ) -> Diff { move |x: usize| m(n(x)) //~ ERROR: concrete type differs } fn main() {} </ins>