jiebi/CodeConvo huggingface dataset:
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
Now fixed by errors, see rust-lang/glacier. However, the new error looks unrelated to and it might just be the case that it masks a still existing bug, not sure.
Fixed on the latest nightly, marking as E-needs-test (or, feel free to close if we have a sufficient regression test) labels: +E-needs-test

Discussion:
<ins> // check-pass // effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds #![allow(incomplete_features, unused)] #![feature(effects, adt_const_params)] struct Bar<T>(T); impl<T> Bar<T> { const fn value() -> usize { 42 } } struct Foo<const N: [u8; Bar::<u32>::value()]>; pub fn main() {} </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
Fixed on the latest nightly, marking as E-needs-test (or, feel free to close if we have a sufficient regression test) labels: +E-needs-test

Discussion:
<ins> #![feature(const_closures, const_trait_impl, effects)] #![allow(incomplete_features)] trait Foo { fn foo(&self); } impl Foo for () { fn foo(&self) {} } fn main() { (const || { (()).foo() })(); //~^ ERROR: cannot call non-const fn } </ins>

<ins> error[E0015]: cannot call non-const fn `<() as Foo>::foo` in constant functions --> $DIR/const_closure-const_trait_impl-ice-113381.rs:13:22 | LL |     (const || { (()).foo() })(); |                      ^^^^^ | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants error: aborting due to previous error For more information about this error, try `rustc --explain E0015`. </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
cc
Probably just need to suppress this assertion if the signature of the trait references . This could use a good explanation for why we ICE, though.
Ohh I've just pushed a fix and now read your comment. Your idea is better.

Discussion:
) .fold_with(&mut collector); <del> debug_assert_ne!( collector.types.len(), 0, "expect >1 RPITITs in call to `collect_return_position_impl_trait_in_trait_tys`" ); </del> <ins> if !unnormalized_trait_sig.output().references_error() { debug_assert_ne!( collector.types.len(), 0, "expect >1 RPITITs in call to `collect_return_position_impl_trait_in_trait_tys`" ); } </ins> let trait_sig = ocx.normalize(&norm_cause, param_env, unnormalized_trait_sig); trait_sig.error_reported()?;

<ins> error[E0412]: cannot find type `Missing` in this scope --> $DIR/return-not-existing-type-wrapping-rpitit.rs:10:25 | LL |     fn bar() -> Wrapper<Missing<impl Sized>>; |                         ^^^^^^^ not found in this scope error: aborting due to previous error For more information about this error, try `rustc --explain E0412`. </ins>

<ins> // edition:2021 // [next] compile-flags: -Zlower-impl-trait-in-trait-to-assoc-ty // revisions: current next #![feature(return_position_impl_trait_in_trait)] struct Wrapper<T>(T); trait Foo { fn bar() -> Wrapper<Missing<impl Sized>>; //~^ ERROR: cannot find type `Missing` in this scope [E0412] } impl Foo for () { fn bar() -> Wrapper<i32> { Wrapper(0) } } fn main() {} </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
cc you this assertion
Regression in nightly-2023-07-06 Regression in
so this was clearly buggy before and I expect it to be an issue limited to specialization. Going to not look into this further myself for now.

Discussion:
stalled_on: &mut Vec<TyOrConstInferVar<'tcx>>, ) -> ProcessResult<PendingPredicateObligation<'tcx>, FulfillmentErrorCode<'tcx>> { let infcx = self.selcx.infcx; <del> if obligation.predicate.is_global() { </del> <ins> if obligation.predicate.is_global() && !self.selcx.is_intercrate() { </ins> // no type variables present, can use evaluation for better caching. // FIXME: consider caching errors too. if infcx.predicate_must_hold_considering_regions(obligation) {

) -> ProcessResult<PendingPredicateObligation<'tcx>, FulfillmentErrorCode<'tcx>> { let tcx = self.selcx.tcx(); <del> if obligation.predicate.is_global() { </del> <ins> if obligation.predicate.is_global() && !self.selcx.is_intercrate() { </ins> // no type variables present, can use evaluation for better caching. // FIXME: consider caching errors too. if self.selcx.infcx.predicate_must_hold_considering_regions(obligation) {

<ins> // check-pass // issue: 113415 // Makes sure that coherence doesn't call any of the `predicate_may_hold`-esque fns, // since they are using a different infcx which doesn't preserve the intercrate flag. #![feature(specialization)] //~^ WARN the feature `specialization` is incomplete trait Assoc { type Output; } default impl<T> Assoc for T { type Output = bool; } impl Assoc for u8 {} trait Foo {} impl Foo for u32 {} impl Foo for <u8 as Assoc>::Output {} fn main() {} </ins>

<ins> warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/coherence-doesnt-use-infcx-evaluate.rs:7:12 | LL | #![feature(specialization)] |            ^^^^^^^^^^^^^^ | = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information = help: consider using `min_specialization` instead, which is more stable and complete = note: `#[warn(incomplete_features)]` on by default warning: 1 warning emitted </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
searched nightlies: from nightly-2023-02-17 to nightly-2023-02-19 regressed nightly: nightly-2023-02-18 searched commit range: regressed commit: - -cc <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.6</summaryHost triple: x86_64-unknown-linux-gnu Reproduce with: </details

Discussion:
should_continue = suggest(err, false, span, message, sugg); } } <del> LifetimeRibKind::Item => break, </del> <ins> LifetimeRibKind::Item | LifetimeRibKind::ConstParamTy => break, </ins> _ => {} } if !should_continue {

.lifetime_ribs .iter() .rev() <del> .take_while(|rib| !matches!(rib.kind, LifetimeRibKind::Item)) </del> <ins> .take_while(|rib| { !matches!(rib.kind, LifetimeRibKind::Item | LifetimeRibKind::ConstParamTy) }) </ins> .flat_map(|rib| rib.bindings.iter()) .map(|(&ident, &res)| (ident, res)) .filter(|(ident, _)| ident.name != kw::UnderscoreLifetime)

<ins> // https://github.com/rust-lang/rust/issues/113462 struct S2<'b>(&'b ()); struct S<'a, const N: S2>(&'a ()); //~^ ERROR missing lifetime specifier [E0106] //~| ERROR `S2<'_>` is forbidden as the type of a const generic parameter fn main() {} </ins>

<ins> error[E0106]: missing lifetime specifier --> $DIR/lifetime-in-const-param.rs:5:23 | LL | struct S<'a, const N: S2>(&'a ()); |                       ^^ expected named lifetime parameter error: `S2<'_>` is forbidden as the type of a const generic parameter --> $DIR/lifetime-in-const-param.rs:5:23 | LL | struct S<'a, const N: S2>(&'a ()); |                       ^^ | = note: the only supported types are integers, `bool` and `char` = help: more complex types are supported with `#![feature(adt_const_params)]` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0106`. </ins>

| LL | fn d<const C: S>() {} |               ^ expected named lifetime parameter <del> | help: consider introducing a named lifetime parameter | LL | fn d<'a, const C: S<'a>>() {} |      +++           ++++ </del> error[E0770]: the type of const parameters must not depend on other generic parameters --> $DIR/unusual-rib-combinations.rs:29:22
Change:
: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
This might be related to cc
Reverting from to (before was merged) fixes the issue for me.

Discussion:
&self, constant: &mir::Constant<'tcx>, ) -> Result<Option<ty::ValTree<'tcx>>, ErrorHandled> { <del> let uv = match constant.literal { </del> <ins> let uv = match self.monomorphize(constant.literal) { </ins> mir::ConstantKind::Unevaluated(uv, _) => uv.shrink(), <ins> mir::ConstantKind::Ty(c) => match c.kind() { // A constant that came from a const generic but was then used as an argument to old-style // simd_shuffle (passing as argument instead of as a generic param). rustc_type_ir::ConstKind::Value(valtree) => return Ok(Some(valtree)), other => span_bug!(constant.span, "{other:#?}"), }, // We should never encounter `ConstantKind::Val` unless MIR opts (like const prop) evaluate // a constant and write that value back into `Operand`s. This could happen, but is unlikely. // Also: all users of `simd_shuffle` are on unstable and already need to take a lot of care // around intrinsics. For an issue to happen here, it would require a macro expanding to a // `simd_shuffle` call without wrapping the constant argument in a `const {}` block, but // the user pass through arbitrary expressions. // FIXME(oli-obk): replace the magic const generic argument of `simd_shuffle` with a real // const generic. </ins> other => span_bug!(constant.span, "{other:#?}"), }; let uv = self.monomorphize(uv);

<del> //run-pass </del> <ins> // run-pass // revisions: opt noopt //[noopt] compile-flags: -Copt-level=0 //[opt] compile-flags: -O </ins> #![feature(repr_simd, platform_intrinsics)] <ins> #![allow(incomplete_features)] #![feature(adt_const_params)] </ins> extern "platform-intrinsic" { fn simd_shuffle<T, I, U>(a: T, b: T, i: I) -> U; <ins> fn simd_shuffle16<T, U>(x: T, y: T, idx: [u32; 16]) -> U; </ins> } #[derive(Copy, Clone)] #[repr(simd)] struct Simd<T, const N: usize>([T; N]); <ins> pub unsafe fn __shuffle_vector16<const IDX: [u32; 16], T, U>(x: T, y: T) -> U { simd_shuffle16(x, y, IDX) } </ins> fn main() { const I1: [u32; 4] = [0, 2, 4, 6]; const I2: [u32; 2] = [1, 5];

let y: Simd<u8, 2> = simd_shuffle(a, b, I2); assert_eq!(y.0, [1, 5]); } <ins> // Test that an indirection (via an unnamed constant) // through a const generic parameter also works. // See https://github.com/rust-lang/rust/issues/113500 for details. let a = Simd::<u8, 16>([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]); let b = Simd::<u8, 16>([16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]); unsafe { __shuffle_vector16::< { [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] }, Simd<u8, 16>, Simd<u8, 16>, >(a, b); } </ins> }
Change:
In the followup discussion on , we discovered that their original problem was because they had chosen a path under their home directory for , but they had not changed the default . So most things installed fine, but they didn't have permission to write . Bootstrap could sanity check this when starting an install, seeing that is writable by the current user but the absolute is not. (A relative goes under , which should be fine.) This should also take into account as a further prefix on all installation paths.
I have just updated to version 1.71.0, and now I'm receiving the terminal warning: In my previous setup, I the line to my file.
yeah, made that effectively . That was reverted in , and now proposed for stable and beta backports. So you could add for now, but it will be going back to the way it was.

Discussion:
} } <ins> fn is_dir_writable_for_user(dir: &PathBuf) -> bool { let tmp_file = dir.join(".tmp"); match fs::File::create(&tmp_file) { Ok(_) => { fs::remove_file(tmp_file).unwrap(); true } Err(e) => { if e.kind() == std::io::ErrorKind::PermissionDenied { false } else { panic!("Failed the write access check for the current user. {}", e); } } } } </ins> fn install_sh( builder: &Builder<'_>, package: &str,

let prefix = default_path(&builder.config.prefix, "/usr/local"); let sysconfdir = prefix.join(default_path(&builder.config.sysconfdir, "/etc")); <ins> // Sanity check for the user write access on prefix and sysconfdir assert!( is_dir_writable_for_user(&prefix), "User doesn't have write access on `install.prefix` path in the `config.toml`.", ); assert!( is_dir_writable_for_user(&sysconfdir), "User doesn't have write access on `install.sysconfdir` path in `config.toml`." ); </ins> let datadir = prefix.join(default_path(&builder.config.datadir, "share")); let docdir = prefix.join(default_path(&builder.config.docdir, "share/doc/rust")); let mandir = prefix.join(default_path(&builder.config.mandir, "share/man"));

// More information on the environment variable is available here: // https://www.gnu.org/prep/standards/html_node/DESTDIR.html if let Some(destdir) = env::var_os("DESTDIR").map(PathBuf::from) { <ins> // Sanity check for the user write access on DESTDIR assert!(is_dir_writable_for_user(&destdir), "User doesn't have write access on DESTDIR."); </ins> let without_destdir = path.clone(); path = destdir; // Custom .join() which ignores disk roots.
Change:
In , clippy CI , and I don't think that can be caused by my PR: <details</detailsCc
Seems same with my PR Did you try to rebase master for you branch? I resolved it in this way.
your problem was different. the problem Ralf is running into is
The error message and failed test case are both same with my failed CI in my new PR
gotcha - in that case the rebase probably didn't do anything except rerun ci - this only fails some of the time. https://rust- has a plausible explanation
See the discussion at https://rust- I believe this is an issue with ui_test.
This is causing lots of problems in CI, so I'm marking it as critical.
I'll leave it up to you on tracking what needs to be done to revert . It looks like you've been working on it in ui_test, but I'm not involved in clippy development, so I probably shouldn't be the one tracking/fixing things. However, if you have questions on the cargo side, let me know.
Thanks! After the next clippy sync (tomorrow) this should be fixed. On the ui_test side, the failure is now protected against being spurious and 100% reproducible. I'll ship that to miri soon to prevent the same thing from happening there.

Discussion:
//@aux-build:proc_macro_attr.rs:proc-macro <ins> // Flaky test, see https://github.com/rust-lang/rust/issues/113585. //@ignore-32bit //@ignore-64bit </ins> #![warn(clippy::empty_line_after_doc_comments)] #![allow(clippy::assertions_on_constants)] #![feature(custom_inner_attributes)]

//@aux-build:proc_macro_attr.rs:proc-macro <ins> // Flaky test, see https://github.com/rust-lang/rust/issues/113585. //@ignore-32bit //@ignore-64bit </ins> #![warn(clippy::empty_line_after_outer_attr)] #![allow(clippy::assertions_on_constants)] #![feature(custom_inner_attributes)]

//@aux-build:proc_macro_attr.rs:proc-macro <ins> // Flaky test, see https://github.com/rust-lang/rust/issues/113585. //@ignore-32bit //@ignore-64bit </ins> #![warn(clippy::needless_arbitrary_self_type)]
Change:
This used to compile and now ICEs: Compiles on Stable version: 1.70.0 Regressed in 1.71.0-beta.6 (2023-07-08 ) I guess it is , but this shouldn't be in beta? <details<summary<strongBacktrace</strong</summary<p</p</details
Bisection results: searched nightlies: from nightly-2023-05-20 to nightly-2023-07-14 regressed nightly: nightly-2023-06-25 searched commit range: regressed commit: ( -), cc <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.6</summaryHost triple: x86_64-unknown-linux-gnu Reproduce with: </details

Discussion:
use crate::traits::query::evaluate_obligation::InferCtxtExt as _; <del> use crate::traits::{self, ObligationCtxt}; </del> <ins> use crate::traits::{self, DefiningAnchor, ObligationCtxt}; </ins> use rustc_hir::def_id::DefId; use rustc_hir::lang_items::LangItem;

pub trait InferCtxtBuilderExt<'tcx> { fn enter_canonical_trait_query<K, R>( <del> &mut self, </del> <ins> self, </ins> canonical_key: &Canonical<'tcx, K>, operation: impl FnOnce(&ObligationCtxt<'_, 'tcx>, K) -> Result<R, NoSolution>, ) -> Result<CanonicalQueryResponse<'tcx, R>, NoSolution>

/// have `'tcx` be free on this function so that we can talk about /// `K: TypeFoldable<TyCtxt<'tcx>>`.) fn enter_canonical_trait_query<K, R>( <del> &mut self, </del> <ins> self, </ins> canonical_key: &Canonical<'tcx, K>, operation: impl FnOnce(&ObligationCtxt<'_, 'tcx>, K) -> Result<R, NoSolution>, ) -> Result<CanonicalQueryResponse<'tcx, R>, NoSolution>

R: Debug + TypeFoldable<TyCtxt<'tcx>>, Canonical<'tcx, QueryResponse<'tcx, R>>: ArenaAllocatable<'tcx>, { <del> let (infcx, key, canonical_inference_vars) = self.build_with_canonical(DUMMY_SP, canonical_key); </del> <ins> let (infcx, key, canonical_inference_vars) = self .with_opaque_type_inference(DefiningAnchor::Bubble) .build_with_canonical(DUMMY_SP, canonical_key); </ins> let ocx = ObligationCtxt::new(&infcx); let value = operation(&ocx, key)?; ocx.make_canonicalized_query_response(canonical_inference_vars, value)

<ins> //! The trait query `foo: Fn() -> u8` is a valid defining use of RPIT. // build-pass fn returns_u8(_: impl Fn() -> u8) {} pub fn foo() -> impl Sized { returns_u8(foo); 0u8 } fn main() {} </ins>

<ins> // User type annotation in fn bodies is a a valid defining site for opaque types. // check-pass #![feature(type_alias_impl_trait)] trait Equate { type Proj; } impl<T> Equate for T { type Proj = T; } trait Indirect { type Ty; } impl<A, B: Equate<Proj = A>> Indirect for (A, B) { type Ty = (); } type Opq = impl Sized; fn define_1(_: Opq) { let _ = None::<<(Opq, u8) as Indirect>::Ty>; } fn define_2() -> Opq { 0u8 } fn main() {} </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<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
can you please avoid using in the future and directly put the attributes in the source? It makes it easier to copy it to the playground or local invocation.
I've got a fix already, gonna open a PR later. claim
Minimized:

Discussion:
match ty.kind() { ty::Adt(adt_def, _) => Some(*adt_def), // FIXME(#104767): Should we handle bound regions here? <del> ty::Alias(ty::Projection | ty::Inherent, _) if !ty.has_escaping_bound_vars() => { </del> <ins> ty::Alias(ty::Projection | ty::Inherent | ty::Weak, _) if !ty.has_escaping_bound_vars() => { </ins> self.normalize(span, ty).ty_adt_def() } _ => None,

<ins> // Regression test for issue #113736. // check-pass #![feature(lazy_type_alias)] enum Enum { Unit, Tuple(), Struct {}, } fn main() { type Alias = Enum; let _ = Alias::Unit; let _ = Alias::Tuple(); let _ = Alias::Struct {}; } </ins>
Change:
No response No response Happens on , as well as several earlier versions. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Just needs someone to this error if the type , I think.
assign
Error: Parsing assign command in failed: ...' assign' ''... Please file an issue on GitHub at if there's a problem with this bot, or reach out on on Zulip.
claim
claim
Hi! I have given a brief introduction of myself in the . With that said, I have potentially setup the necessary pre-requisites and compiler infrastructure in my local machine, also re confirmed by using the and other build commands which seem to work. As per the , I have the all the toolchains command executed (for [0-2]). Like any other contribution, I figured that in repo, are tagged as for new-comers, and to start, I have chosen this issue. Until now, I have found the following which I presume is targeting the output: Would be great if one could point out any points I may have missed out! A head start would be great!
claim

Discussion:
let asm_ty = match *ty.kind() { // `!` is allowed for input but not for output (issue #87802) ty::Never if is_input => return None, <del> ty::Error(_) => return None, </del> <ins> _ if ty.references_error() => return None, </ins> ty::Int(IntTy::I8) | ty::Uint(UintTy::U8) => Some(InlineAsmType::I8), ty::Int(IntTy::I16) | ty::Uint(UintTy::U16) => Some(InlineAsmType::I16), ty::Int(IntTy::I32) | ty::Uint(UintTy::U32) => Some(InlineAsmType::I32),

<ins> // test that "error: arguments for inline assembly must be copyable" doesn't show up in this code // needs-asm-support // only-x86_64 fn main() { let peb: *const PEB; //~ ERROR cannot find type `PEB` in this scope [E0412] unsafe { std::arch::asm!("mov {0}, fs:[0x30]", out(reg) peb); } } </ins>

<ins> error[E0412]: cannot find type `PEB` in this scope --> $DIR/issue-113788.rs:5:21 | LL |     let peb: *const PEB; |                     ^^^ not found in this scope error: aborting due to previous error For more information about this error, try `rustc --explain E0412`. </ins>