jiebi/CodeConvo huggingface dataset:
Code change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: Failed to normalize Matrix<f64, DimU2, DimU1, Alias(Projection, AliasTy { args: [DefaultAllocator, f64, DimU2, DimU1], defid: DefId(0:65 ~ 4[99cc]::Allocator::Buffer) }), maybe try to call instead', 'error: internal compiler error: Failed to normalize Matrix<f64, DimU2, DimU1, Alias(Projection, AliasTy { args: [DefaultAllocator, f64, DimU2, DimU1], defid: DefId(0:65 ~ 4[99cc]::Allocator::Buffer) }), maybe try to call instead' 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: [mirbuilt] building MIR for [checkunsafety] unsafety-checking [analysis] running analysis passes on this crate --
cc

Related discussion:
text: <ins> fn problematic_function<Space>(material_surface_element: ()) where DefaultAllocator: FiniteElementAllocator<(), Space>, { let _: Point2<f64> = material_surface_element.map_reference_coords().into(); } impl<N, R> Allocator<N, R> for DefaultAllocator where R::Value: DimName, //~ ERROR: `Value` not found for `R` { type Buffer = (); } impl<N> Allocator<N, ()> for DefaultAllocator {} //~^ ERROR: conflicting implementations impl DimName for () {} impl DimName for u32 {} impl<N, D: DimName> From<VectorN<N, D>> for Point<N, D> { fn from(_: VectorN<N, D>) -> Self { todo!() } } impl FiniteElement<u32> for () {} type VectorN<N, D> = Matrix<<DefaultAllocator as Allocator<N, D>>::Buffer>; type Point2<N> = Point<N, u32>; struct DefaultAllocator; struct Matrix<S>(S); struct Point<N, D>(N, D); trait Allocator<Scalar, R> { type Buffer; } trait DimName {} trait FiniteElementAllocator<GeometryDim, NodalDim>: Allocator<f64, ()> + Allocator<f64, NodalDim> { } trait FiniteElement<GeometryDim> { fn map_reference_coords(&self) -> VectorN<f64, GeometryDim> { todo!() } } fn main() {} </ins>
Code change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: Failed to normalize Matrix<f64, DimU2, DimU1, Alias(Projection, AliasTy { args: [DefaultAllocator, f64, DimU2, DimU1], defid: DefId(0:65 ~ 4[99cc]::Allocator::Buffer) }), maybe try to call instead', 'error: internal compiler error: Failed to normalize Matrix<f64, DimU2, DimU1, Alias(Projection, AliasTy { args: [DefaultAllocator, f64, DimU2, DimU1], defid: DefId(0:65 ~ 4[99cc]::Allocator::Buffer) }), maybe try to call instead' 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: [mirbuilt] building MIR for [checkunsafety] unsafety-checking [analysis] running analysis passes on this crate --
cc

Related discussion:
text: <ins> error[E0220]: associated type `Value` not found for `R` --> $DIR/normalize-conflicting-impls.rs:10:8 | LL |     R::Value: DimName, |        ^^^^^ associated type `Value` not found error[E0119]: conflicting implementations of trait `Allocator<_, ()>` for type `DefaultAllocator` --> $DIR/normalize-conflicting-impls.rs:14:1 | LL | / impl<N, R> Allocator<N, R> for DefaultAllocator LL | | where LL | |     R::Value: DimName, | |______________________- first implementation here ... LL |   impl<N> Allocator<N, ()> for DefaultAllocator {} |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `DefaultAllocator` error: aborting due to 2 previous errors Some errors have detailed explanations: E0119, E0220. For more information about an error, try `rustc --explain E0119`. </ins>
Code change:
I expect that the invocation to be for the value that is moved, but for some reason it is doing it for the entire closure. No response No response
label +E-needs-mcve
MCVE or

Related discussion:
text: #![allow(rustc::untranslatable_diagnostic)] use either::Either; <ins> use hir::ClosureKind; </ins> use rustc_data_structures::captures::Captures; use rustc_data_structures::fx::FxIndexSet; use rustc_errors::{codes::*, struct_span_code_err, Applicability, Diag, MultiSpan};
Code change:
I expect that the invocation to be for the value that is moved, but for some reason it is doing it for the entire closure. No response No response
label +E-needs-mcve
MCVE or

Related discussion:
text: } else if let UseSpans::FnSelfUse { kind: CallKind::Normal { .. }, .. } = move_spans { // We already suggest cloning for these cases in `explain_captures`. <ins> } else if let UseSpans::ClosureUse { closure_kind: ClosureKind::Coroutine(CoroutineKind::Desugared(_, CoroutineSource::Block)), args_span: _, capture_kind_span: _, path_span, } = move_spans { self.suggest_cloning(err, ty, expr, path_span); </ins> } else if self.suggest_hoisting_call_outside_loop(err, expr) { // The place where the the type moves would be misleading to suggest clone. // #121466
Code change:
I expect that the invocation to be for the value that is moved, but for some reason it is doing it for the entire closure. No response No response
label +E-needs-mcve
MCVE or

Related discussion:
text: } // FIXME: We make sure that this is a normal top-level binding, <del> // but we could suggest `todo!()` for all uninitalized bindings in the pattern pattern </del> <ins> // but we could suggest `todo!()` for all uninitialized bindings in the pattern pattern </ins> if let hir::StmtKind::Let(hir::LetStmt { span, ty, init: None, pat, .. }) = &ex.kind && let hir::PatKind::Binding(..) = pat.kind
Code change:
I expect that the invocation to be for the value that is moved, but for some reason it is doing it for the entire closure. No response No response
label +E-needs-mcve
MCVE or

Related discussion:
text: true } <del> /// In a move error that occurs on a call wihtin a loop, we try to identify cases where cloning </del> <ins> /// In a move error that occurs on a call within a loop, we try to identify cases where cloning </ins> /// the value would lead to a logic error. We infer these cases by seeing if the moved value is /// part of the logic to break the loop, either through an explicit `break` or if the expression /// is part of a `while let`.
Code change:
I expect that the invocation to be for the value that is moved, but for some reason it is doing it for the entire closure. No response No response
label +E-needs-mcve
MCVE or

Related discussion:
text: { // FIXME: We could check that the call's *parent* takes `&mut val` to make the // suggestion more targeted to the `mk_iter(val).next()` case. Maybe do that only to <del> // check for wheter to suggest `let value` or `let mut value`. </del> <ins> // check for whether to suggest `let value` or `let mut value`. </ins> let span = in_loop.span; if !finder.found_breaks.is_empty()
Code change:
I expect that the invocation to be for the value that is moved, but for some reason it is doing it for the entire closure. No response No response
label +E-needs-mcve
MCVE or

Related discussion:
text: <ins> //@ edition:2021 async fn clone_async_block(value: String) { for _ in 0..10 { async { //~ ERROR: use of moved value: `value` [E0382] drop(value); //~^ HELP: consider cloning the value if the performance cost is acceptable }.await } } fn main() {} </ins>
Code change:
I expect that the invocation to be for the value that is moved, but for some reason it is doing it for the entire closure. No response No response
label +E-needs-mcve
MCVE or

Related discussion:
text: <ins> error[E0382]: use of moved value: `value` --> $DIR/cloning-in-async-block-121547.rs:5:9 | LL |   async fn clone_async_block(value: String) { |                              ----- move occurs because `value` has type `String`, which does not implement the `Copy` trait LL |       for _ in 0..10 { |       -------------- inside of this loop LL | /         async { LL | |             drop(value); | |                  ----- use occurs due to use in coroutine LL | | LL | |         }.await | |_________^ value moved here, in previous iteration of loop | help: consider cloning the value if the performance cost is acceptable | LL |             drop(value.clone()); |                       ++++++++ error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0382`. </ins>
Code change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: cannot convert to a region vid', 'error: internal compiler error: cannot convert to a region vid' 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: [mirborrowck] borrow-checking [analysis] running analysis passes on this crate --
cc

Related discussion:
text: <del> //@ known-bug: #118403 #![feature(generic_const_exprs)] pub struct X<const N: usize> {} impl<const Z: usize> X<Z> { pub fn y<'a, U: 'a>(&'a self) -> impl Iterator<Item = impl Iterator<Item = [u8; Z]> + '_> { (0..1).map(move |_| (0..1).map(move |_| loop {})) } } </del>
Code change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: cannot convert to a region vid', 'error: internal compiler error: cannot convert to a region vid' 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: [mirborrowck] borrow-checking [analysis] running analysis passes on this crate --
cc

Related discussion:
text: <del> //@ known-bug: #121574 #![feature(generic_const_exprs)] pub struct DimName<const N: usize> {} impl<const Z: usize> X<Z> { pub fn y<'a, U: 'a>(&'a self) -> impl Iterator<Item = impl Iterator<Item = [u8; Z]> + '_> { "0".as_bytes(move |_| (0..1).map(move |_| loop {})) } } </del>
Code change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: cannot convert to a region vid', 'error: internal compiler error: cannot convert to a region vid' 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: [mirborrowck] borrow-checking [analysis] running analysis passes on this crate --
cc

Related discussion:
text: <del> //@ known-bug: #121574 #![feature(generic_const_exprs)] impl<const Z: usize> X<Z> { pub fn y<'a, U: 'a>(&'a self) -> impl Iterator<Item = impl Iterator<Item = [u8; Z]> + '_> {} } </del>
Code change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: cannot convert to a region vid', 'error: internal compiler error: cannot convert to a region vid' 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: [mirborrowck] borrow-checking [analysis] running analysis passes on this crate --
cc

Related discussion:
text: <ins> //@ check-pass #![feature(generic_const_exprs)] //~^ WARN the feature `generic_const_exprs` is incomplete and may not be safe to use pub fn y<'a, U: 'a>() -> impl IntoIterator<Item = impl IntoIterator<Item = [u8; { 1 + 2 }]> + 'a> { [[[1, 2, 3]]] } // Make sure that the `predicates_of` for `{ 1 + 2 }` don't mention the duplicated lifetimes of // the *outer* iterator. Whether they should mention the duplicated lifetimes of the *inner* // iterator are another question, but not really something we need to answer immediately. fn main() {} </ins>
Code change:
<!-- [31mICE[0m: Rustc '' 'error: internal compiler error: cannot convert to a region vid', 'error: internal compiler error: cannot convert to a region vid' 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: [mirborrowck] borrow-checking [analysis] running analysis passes on this crate --
cc

Related discussion:
text: <ins> warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/double-opaque-parent-predicates.rs:3:12 | LL | #![feature(generic_const_exprs)] |            ^^^^^^^^^^^^^^^^^^^ | = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information = note: `#[warn(incomplete_features)]` on by default warning: 1 warning emitted </ins>
Code change:
I'm referring to this particular line Even though in environments Global as a structure exists and is defined, and it only shows up in PhantomData, the use of the structure is most likely undefined if attribute is never used. Yes, there will be no calls to Global as it's only a phantom, and execution will not be affected, but just seems ill-defined at least. For completeness: compilation of code that uses with custom allocator under is not affected, and there is no sign of runtime bugs.
Does this matter? It holds it directly:
My issue is the opposite - it should be in the PhantomData too, but not implicit
I understand, but it already includes for dropck, so why should it include it in the too?
To avoid inclusion of Global that has no logical relation to the BTreeMap instance with custom allocator
If it's accepted as a bug I can quickly fix it, at least it passes tests

Related discussion:
text: /// `ManuallyDrop` to control drop order (needs to be dropped after all the nodes). pub(super) alloc: ManuallyDrop<A>, // For dropck; the `Box` avoids making the `Unpin` impl more strict than before <del> _marker: PhantomData<crate::boxed::Box<(K, V)>>, </del> <ins> _marker: PhantomData<crate::boxed::Box<(K, V), A>>, </ins> } #[stable(feature = "btree_drop", since = "1.7.0")]
Code change:
Fuzzer generated custom MIR This code has UB under Stacked Borrows, but UB-free under Tree Borrows. Right: Wrong: While it looks like an LLVM issue, I couldn't get an IR-only reproduction. It's possible that rustc is producing IR with UBs On latest nightly cc <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I am only refraining from adding I-unsound so far because there's no surface Rust repro yet.
We should get , but we get .
claim
Upstream issue:
I do not have such qualms, especially because a fix is already on the way.
WG-prioritization assigning priority (). Keeping an eye on this issue to evaluate what to do when the LLVM fix lands label -I-prioritize +P-high

Related discussion:
text: <del> Subproject commit 7973f3560287d750500718314a0fd4025bd8ac0e </del> <ins> Subproject commit 84f190a4abf58bbd5301c0fc831f7a96acea246f </ins>
Code change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at ', 'thread 'rustc' panicked at ' 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: --
cc

Related discussion:
text: let suggest_eq = if self.token.kind == token::Dot && let _ = self.bump() && let mut snapshot = self.create_snapshot_for_diagnostic() <del> && let Ok(_) = snapshot.parse_dot_suffix_expr( colon_sp, self.mk_expr_err( </del> <ins> && let Ok(_) = snapshot .parse_dot_suffix_expr( </ins> colon_sp, <del> self.dcx().delayed_bug("error during `:` -> `=` recovery"), ), ) { </del> <ins> self.mk_expr_err( colon_sp, self.dcx() .delayed_bug("error during `:` -> `=` recovery"), ), ) .map_err(Diag::cancel) { </ins> true } else if let Some(op) = self.check_assoc_op() && op.node.can_continue_expr_unambiguously()
Code change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at ', 'thread 'rustc' panicked at ' 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: --
cc

Related discussion:
text: <ins> #![allow(unused)] fn test_122112() { // Make sure we don't ICE if parsing in recovery fails let _: std::env::temp_dir().join(&self, push: Box<usize>);  //~ ERROR expected one of } </ins> fn main() { let _: std::env::temp_dir().join("foo"); //~ ERROR expected one of }
Code change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at ', 'thread 'rustc' panicked at ' 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: --
cc

Related discussion:
text: error: expected one of `!`, `+`, `->`, `::`, `;`, or `=`, found `.` <del> --> $DIR/recover-colon-instead-of-eq-in-local.rs:2:32 </del> <ins> --> $DIR/recover-colon-instead-of-eq-in-local.rs:5:32 | LL |     let _: std::env::temp_dir().join(&self, push: Box<usize>); |          -                     ^ expected one of `!`, `+`, `->`, `::`, `;`, or `=` |          | |          while parsing the type for `_` error: expected one of `!`, `+`, `->`, `::`, `;`, or `=`, found `.` --> $DIR/recover-colon-instead-of-eq-in-local.rs:9:32 </ins> | LL |     let _: std::env::temp_dir().join("foo"); |          -                     ^ expected one of `!`, `+`, `->`, `::`, `;`, or `=`
Code change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at ', 'thread 'rustc' panicked at ' 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: --
cc

Related discussion:
text: |          while parsing the type for `_` |          help: use `=` if you meant to assign <del> error: aborting due to 1 previous error </del> <ins> error: aborting due to 2 previous errors </ins>
Code change:
<!-- [31mICE[0m: Rustc '-Zincremental-verify-ich=yes -Cincremental=<dir-Cdebuginfo=2' 'error: internal compiler error: Unexpected node AnonConst(AnonConst { hirid: HirId(DefId(0:3 ~ [9608]::Trait).5), defid: DefId(0:5 ~ [9608]::Trait::{constant}), body: BodyId { hirid: HirId(DefId(0:3 ~ [9608]::Trait).6) } })', 'error: internal compiler error: Unexpected node AnonConst(AnonConst { hirid: HirId(DefId(0:3 ~ [9608]::Trait).5), defid: DefId(0:5 ~ [9608]::Trait::{constant}), body: BodyId { hirid: HirId(DefId(0:3 ~ [9608]::Trait).6) } })' 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: note: compiler flags: -Z incremental-verify-ich=yes -C incremental=[REDACTED] -C debuginfo=2 [diagnostichirwfcheck] performing HIR wf-checking for predicate at item [typeck] type-checking [checkmatch] match-checking [mirbuilt] building MIR for [mirconst] preparing for borrow checking [mirconstqualif] const checking [mirpromoted] promoting constants in MIR for [mirborrowck] borrow-checking [mirdropselaboratedandconstchecked] elaborating drops for [mirforctfe] caching mir of for CTFE [evaltoallocationraw] const-evaluating + checking [evaltovaltree] evaluating type-level constant [checkwellformed] checking that is well-formed [checkmodtypewf] checking that types are well-formed in top-level module [analysis] running analysis passes on this crate --<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
This seeeems to bisect to :thinking: cc
Thanks Will take a look. claim
Reduced further:
the original (none reduced) one still ices :sweat_smile:
From what I can tell, it seems to have been fixed : Looks like I'm missing something
I have now opened PR to test the below original reproducer:
Sorry for causing the issue to be closed via the PR merge without asking you first. If you still believe the ICE is not fixed please reopen it.

Related discussion:
text: kind: hir::GenericParamKind::Type { default: Some(ty), .. }, .. }) => vec![*ty], <ins> hir::Node::AnonConst(_) if let Some(const_param_id) = tcx.hir().opt_const_param_default_param_def_id(hir_id) && let hir::Node::GenericParam(hir::GenericParam { kind: hir::GenericParamKind::Const { ty, .. }, .. }) = tcx.hir_node_by_def_id(const_param_id) => { vec![*ty] } </ins> ref node => bug!("Unexpected node {:?}", node), }, WellFormedLoc::Param { function: _, param_idx } => {
Code change:
<!-- [31mICE[0m: Rustc '-Zincremental-verify-ich=yes -Cincremental=<dir-Cdebuginfo=2' 'error: internal compiler error: Unexpected node AnonConst(AnonConst { hirid: HirId(DefId(0:3 ~ [9608]::Trait).5), defid: DefId(0:5 ~ [9608]::Trait::{constant}), body: BodyId { hirid: HirId(DefId(0:3 ~ [9608]::Trait).6) } })', 'error: internal compiler error: Unexpected node AnonConst(AnonConst { hirid: HirId(DefId(0:3 ~ [9608]::Trait).5), defid: DefId(0:5 ~ [9608]::Trait::{constant}), body: BodyId { hirid: HirId(DefId(0:3 ~ [9608]::Trait).6) } })' 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: note: compiler flags: -Z incremental-verify-ich=yes -C incremental=[REDACTED] -C debuginfo=2 [diagnostichirwfcheck] performing HIR wf-checking for predicate at item [typeck] type-checking [checkmatch] match-checking [mirbuilt] building MIR for [mirconst] preparing for borrow checking [mirconstqualif] const checking [mirpromoted] promoting constants in MIR for [mirborrowck] borrow-checking [mirdropselaboratedandconstchecked] elaborating drops for [mirforctfe] caching mir of for CTFE [evaltoallocationraw] const-evaluating + checking [evaltovaltree] evaluating type-level constant [checkwellformed] checking that is well-formed [checkmodtypewf] checking that types are well-formed in top-level module [analysis] running analysis passes on this crate --<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
This seeeems to bisect to :thinking: cc
Thanks Will take a look. claim
Reduced further:
the original (none reduced) one still ices :sweat_smile:
From what I can tell, it seems to have been fixed : Looks like I'm missing something
I have now opened PR to test the below original reproducer:
Sorry for causing the issue to be closed via the PR merge without asking you first. If you still believe the ICE is not fixed please reopen it.

Related discussion:
text: <ins> trait Trait<const N: Trait = bar> { //~^ ERROR cannot find value `bar` in this scope //~| ERROR cycle detected when computing type of `Trait::N` //~| ERROR cycle detected when computing type of `Trait::N` //~| ERROR `(dyn Trait<{const error}> + 'static)` is forbidden as the type of a const generic parameter //~| WARN trait objects without an explicit `dyn` are deprecated //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! fn fnc(&self) { } } fn main() {} </ins>