jiebi/CodeConvo huggingface dataset:
Change:
To ICE, both tests must be present. Also, if the code compiles successfully, the cache is poisoned. Until is run, all future runs will compile successfully, even once the offending code is reintroduced. Also, this only ICEs as a lib, not as a binary. Steps to reproduce: # ICE remove test1 or test2 # compiles add the test back, such that there are now two tests as before. # still compiles - # ICE I have been unable to reduce the code further. My apologies for its length. much worse. : :
This code compiles on 1.43 (on stable with and removed) and ICEs on every later version, but the ICE on 1.46 and before is different. modify labels: regression-from-stable-to-stable
This still produces an ICE (removed the use of the crate):
This also ICEs with replaced with a , containing the body of , e.g. Looks like putting it in a in a lib crate repros it but putting it in in an executable crate doesn't unless rustc is passed both and crate types, which is what I effectively did on godbolt.
Too long ago to get CI builds for individual commits, but the range where the bug was introduced is ....
It's a weird ICE all around. The compiler panics on a failed , then while unwinding panics again because of a , so the panic handler calls due to panicking while panicking. It looks like the SIGILL is how is implemented. On 1.46 and before only the second error happened (apparently directly thrown instead of delayed).
Might have been caused by ?
Ah wait no this is in , before it gets to codegen.
Could be , though.
Hard to know because of ;)
It's not before codegen (or at least, rustccodegenssa is in the backtrace so I don't think can be ruled out); the full backtrace of where the delayspan_bug happens is: <details<summaryBacktrace</summary</details
that's just because of the query system; rust doesn't have stages of compilation: https://rustc-dev- But the panic is coming from .
cc
Assigning and removing as .2C.20requires.20two.20tests.20.E2.80.A6) in the prioritization working group.
glacier ""
glacier ""
Appears to be fixed by

Discussion:
<ins> // check-pass // // Regression test for issue #78632 #![crate_type = "lib"] pub trait Corge<T> { type Fred; } impl Corge<u8> for () { type Fred = u32; } pub trait Waldo { type Quax; } impl Waldo for u32 { type Quax = u8; } pub trait Grault where (): Corge<Self::Thud>, { type Thud; fn bar(_: <() as Corge<Self::Thud>>::Fred) {} } impl<T> Grault for T where T: Waldo, (): Corge<T::Quax>, <() as Corge<T::Quax>>::Fred: Waldo, { type Thud = u8; } pub trait Plugh<I> { fn baz(); } #[derive(Copy, Clone, Debug)] pub struct Qiz<T> { foo: T, } impl<T> Plugh<<() as Corge<T::Thud>>::Fred> for Qiz<T> where T: Grault, (): Corge<T::Thud>, { fn baz() {} } pub fn test() { <Qiz<u32> as Plugh<u32>>::baz(); } </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</detailsNOTE: The bug is found by our work-in-progress compiler testing tool Kira, and the test program is reduced/minimized by <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Related to .
My hunch is that this code: needs to be generalized to also accept a . The function could just return (or maybe ) in that case and I expect the ICE would go away.
I'm tagging this as E-mentor because of the above instructions (feel free to also ping me on Zulip)
claim

Discussion:
let ret_ty = self.inh.infcx.shallow_resolve(ret_ty); let ret_vid = match *ret_ty.kind() { ty::Infer(ty::TyVar(ret_vid)) => ret_vid, <ins> ty::Error(_) => return None, </ins> _ => span_bug!( self.tcx.def_span(expr_def_id), "async fn generator return type not an inference variable"

<ins> error[E0573]: expected type, found built-in attribute `feature` --> $DIR/issue-78654.rs:10:15 | LL | impl<const H: feature> Foo { |               ^^^^^^^ not a type error[E0207]: the const parameter `H` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-78654.rs:10:12 | LL | impl<const H: feature> Foo { |            ^ unconstrained const parameter | = note: expressions using a const parameter must map each value to a distinct output value = note: proving the result of expressions other than the parameter are unique is not supported error: aborting due to 2 previous errors Some errors have detailed explanations: E0207, E0573. For more information about an error, try `rustc --explain E0207`. </ins>

<ins> // edition:2018 // revisions: full min #![cfg_attr(full, feature(const_generics))] #![cfg_attr(full, allow(incomplete_features))] #![cfg_attr(min, feature(min_const_generics))] struct Foo; impl<const H: feature> Foo { //~^ ERROR: expected type, found built-in attribute `feature` //~^^ ERROR: the const parameter `H` is not constrained by the impl trait, self type, or predicates async fn biz() {} } fn main() {} </ins>
Change:
Whenever I try to compile some specific code for with enabled and the compiler inserts a function import into the resulting wasm module that looks like this: These are the complete contents of the : What seems to trigger the bug are the following conditions: The must be Recompile core libs with cargo xbuild or the std aware cargo The call of the panic function originates in some compiler extrinsic The contains the exact command line that reproduces the bug. I expected to see this happen: The resulting wasm module does not import any function from the environment. Instead, this happened: The resulting wasm module imports the previously mentioned panic function from the environment. :
AFAIK wasm doesn't support unwinding, I think you need in
I have. That said, it appears that it is disabled automatically if the target spec disables unwinding.
Does anybody have a solution for this?
I just tried your reproducer from with the latest and there is no more in the Wasm. Can you confirm that the bug is no longer existent?
I can confirm that the reproducer no longer reproduces the bug with the new rust nightly. This does not necessarily mean that the root cause is fixed, though.
would you be interested in adding a test for this? I doubt we'll be able to track down the exact cause, but preventing it from regressing seems just as good :)
Yes. I would be interested. Can you toss me in the general direction where this test would go (as in which test sub directory)?
it depends what you need to test - it looks like the code here did compile successfully, it just didn't run, so you'd probably need a new run-make test (since there's no way to run wasm natively).
Running isn't required I think. It would be OK to compile it and then look at the binaries imports and fail if there is anything.
I guess that would still be a run-make test just that I don't run but inspect the binary?
yes, that's what I was imagining :)
Here's another example reproducing the same problem differently: With installed, under this flow, run:
I got it too with with , fix build with adding following options in
Posting on a closed issue is not a good way to get visibility for this problem. I suggest opening a new issue and linking back to this one.

Discussion:
<ins> -include ../../run-make-fulldeps/tools.mk # only-wasm32-bare all: $(RUSTC) main.rs -C overflow-checks=yes -C panic=abort -C lto -C opt-level=z --target wasm32-unknown-unknown $(NODE) verify.js $(TMPDIR)/main.wasm </ins>

<ins> #![crate_type = "cdylib"] #![no_std] #[panic_handler] fn my_panic(_info: &core::panic::PanicInfo) -> ! { loop {} } #[no_mangle] pub fn multer(a: i128, b: i128) -> i128 { // Trigger usage of the __multi3 compiler intrinsic which then leads to an imported // panic function in case of a bug. We verify that no imports exist in our verifier. a * b } </ins>

<ins> const fs = require('fs'); const process = require('process'); const assert = require('assert'); const buffer = fs.readFileSync(process.argv[2]); let m = new WebAssembly.Module(buffer); let imports = WebAssembly.Module.imports(m); console.log('imports', imports); assert.strictEqual(imports.length, 0); </ins>
Change:
On macOS rustc runs dsymutil to generate debug info files. This invocation incorrectly ignores dsymutil's output and exit status. rustc thus succeeds even if dsymutil fails or crashes. Example: in , dsymutil crashed and left behind a corrupt .dSYM file. rustc nevertheless succeeded, thereby confusing the user after the debugger ignored that bad debug info. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
rustc ignoring :
claim

Discussion:
} } <ins> fn escape_string(s: &[u8]) -> String { str::from_utf8(s).map(|s| s.to_owned()).unwrap_or_else(|_| { let mut x = "Non-UTF-8 output: ".to_string(); x.extend(s.iter().flat_map(|&b| ascii::escape_default(b)).map(char::from)); x }) } </ins> match prog { Ok(prog) => { <del> fn escape_string(s: &[u8]) -> String { str::from_utf8(s).map(|s| s.to_owned()).unwrap_or_else(|_| { let mut x = "Non-UTF-8 output: ".to_string(); x.extend(s.iter().flat_map(|&b| ascii::escape_default(b)).map(char::from)); x }) } </del> if !prog.status.success() { let mut output = prog.stderr.clone(); output.extend_from_slice(&prog.stdout);

&& sess.opts.debuginfo != DebugInfo::None && !preserve_objects_for_their_debuginfo(sess) { <del> if let Err(e) = Command::new("dsymutil").arg(out_filename).output() { sess.fatal(&format!("failed to run dsymutil: {}", e)) </del> <ins> let prog = Command::new("dsymutil").arg(out_filename).output(); match prog { Ok(prog) => { if !prog.status.success() { let mut output = prog.stderr.clone(); output.extend_from_slice(&prog.stdout); sess.struct_warn(&format!( "processing debug info with `dsymutil` failed: {}", prog.status )) .note(&escape_string(&output)) .emit(); } } Err(e) => sess.fatal(&format!("unable to run `dsymutil`: {}", e)), </ins> } } }

impl_stable_hash_via_hash!(SymbolManglingVersion); <del> #[derive(Clone, Copy, PartialEq, Hash)] </del> <ins> #[derive(Clone, Copy, Debug, PartialEq, Hash)] </ins> pub enum DebugInfo { None, Limited,
Change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --I tried this code: I expected to see this happen: Both and resolve. Instead, this happened: Only resolves. <!-- 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. --:
Mentoring instructions: in instead of checking specific . You can check with .
I'll have a crack at this if no one is working on it -- I'm a first-time contributor but the mentoring instructions look like enough to be getting on with :+1:
awesome! There's instructions for getting started on https://rustc-dev-, and you can ask in the channel if you need help.

Discussion:
} fn get_type(&self, id: DefIndex, tcx: TyCtxt<'tcx>) -> Ty<'tcx> { <del> self.root.tables.ty.get(self, id).unwrap().decode((self, tcx)) </del> <ins> self.root .tables .ty .get(self, id) .unwrap_or_else(|| panic!("Not a type: {:?}", id)) .decode((self, tcx)) </ins> } fn get_stability(&self, id: DefIndex) -> Option<attr::Stability> {

Res::PrimTy(prim) => Some( self.resolve_primitive_associated_item(prim, ns, module_id, item_name, item_str), ), <del> Res::Def(DefKind::Struct | DefKind::Union | DefKind::Enum | DefKind::TyAlias, did) => { </del> <ins> Res::Def( DefKind::Struct | DefKind::Union | DefKind::Enum | DefKind::TyAlias | DefKind::ForeignTy, did, ) => { </ins> debug!("looking for associated item named {} for item {:?}", item_name, did); // Checks if item_name belongs to `impl SomeItem` let assoc_item = cx

<ins> #![feature(extern_types)] extern { pub type ExternType; } impl ExternType { pub fn f(&self) { } } // @has 'intra_link_extern_type/foreigntype.ExternType.html' // @has 'intra_link_extern_type/fn.links_to_extern_type.html'  // 'href="../intra_link_extern_type/foreigntype.ExternType.html#method.f"' /// See also [ExternType::f] pub fn links_to_extern_type() { } </ins>
Change:
Taken from We should suggest to use an identifier. When possible take that identifier from the pattern, otherwise should work just as well. CC
I'll try it!

Discussion:
use rustc_errors::{error_code, pluralize, struct_span_err, Applicability}; use rustc_parse::validate_attr; use rustc_session::lint::builtin::PATTERNS_IN_FNS_WITHOUT_BODY; <del> use rustc_session::lint::LintBuffer; </del> <ins> use rustc_session::lint::{BuiltinLintDiagnostics, LintBuffer}; </ins> use rustc_session::Session; use rustc_span::symbol::{kw, sym, Ident}; use rustc_span::Span;

err.emit(); } <del> fn check_decl_no_pat(decl: &FnDecl, mut report_err: impl FnMut(Span, bool)) { </del> <ins> fn check_decl_no_pat(decl: &FnDecl, mut report_err: impl FnMut(Span, Option<Ident>, bool)) { </ins> for Param { pat, .. } in &decl.inputs { match pat.kind { PatKind::Ident(BindingMode::ByValue(Mutability::Not), _, None) | PatKind::Wild => {} <del> PatKind::Ident(BindingMode::ByValue(Mutability::Mut), _, None) => { report_err(pat.span, true) </del> <ins> PatKind::Ident(BindingMode::ByValue(Mutability::Mut), ident, None) => { report_err(pat.span, Some(ident), true) </ins> } <del> _ => report_err(pat.span, false), </del> <ins> _ => report_err(pat.span, None, false), </ins> } } }

match ty.kind { TyKind::BareFn(ref bfty) => { self.check_fn_decl(&bfty.decl, SelfSemantic::No); <del> Self::check_decl_no_pat(&bfty.decl, |span, _| { </del> <ins> Self::check_decl_no_pat(&bfty.decl, |span, _, _| { </ins> struct_span_err!( self.session, span,

// Functions without bodies cannot have patterns. if let FnKind::Fn(ctxt, _, sig, _, None) = fk { <del> Self::check_decl_no_pat(&sig.decl, |span, mut_ident| { </del> <ins> Self::check_decl_no_pat(&sig.decl, |span, ident, mut_ident| { </ins> let (code, msg, label) = match ctxt { FnCtxt::Foreign => ( error_code!(E0130),

), }; if mut_ident && matches!(ctxt, FnCtxt::Assoc(_)) { <del> self.lint_buffer.buffer_lint(PATTERNS_IN_FNS_WITHOUT_BODY, id, span, msg); </del> <ins> if let Some(ident) = ident { let diag = BuiltinLintDiagnostics::PatternsInFnsWithoutBody(span, ident); self.lint_buffer.buffer_lint_with_diagnostic( PATTERNS_IN_FNS_WITHOUT_BODY, id, span, msg, diag, ) } </ins> } else { self.err_handler() .struct_span_err(span, msg)

db.help("to document an item produced by a macro,  the macro must produce the documentation as part of its expansion"); } <ins> BuiltinLintDiagnostics::PatternsInFnsWithoutBody(span, ident) => { db.span_suggestion(span, "remove `mut` from the parameter", ident.to_string(), Applicability::MachineApplicable); } </ins> } // Rewrap `db`, and pass control to the user. decorate(LintDiagnosticBuilder::new(db));

RedundantImport(Vec<(Span, bool)>, Ident), DeprecatedMacro(Option<Symbol>, Span), UnusedDocComment(Span), <ins> PatternsInFnsWithoutBody(Span, Ident), </ins> } /// Lints that are buffered up early on in the `Session` before the

--> $DIR/no-patterns-in-args-2.rs:4:11 | LL |     fn f1(mut arg: u8); <del> |           ^^^^^^^ </del> <ins> |           ^^^^^^^ help: remove `mut` from the parameter: `arg` </ins> | note: the lint level is defined here --> $DIR/no-patterns-in-args-2.rs:1:9
Change:
Hello everyone, this is my first Issue on the Rust project, let me know if I'm doing anthing wrong ! I am in the process of building a library/runtime for the Wii fully written in Rust. To acheive this goal, I need to cross-compile my library to a custom target I named . The json file contains and along other lines to define the architecture. Normally, the build completes without an issue. On the latest nighlty, the compiler fails and return: Of course, is set to in the file, so this shouldn't happen. It most recently worked on: : It fails on this nightly, currently latest at the time of writing: : I can provide any file or other precision if necessary ! Thanks for reading my report !
I was also having the some issue and tracked it to this: That commit broke the equivalence between "target_endian" and "target-endian" by adding a case to the macro without the replace line for it.
cc
I'll fix this today.
Fixed in
I hope this gets merged asap :-)
(Reopening because isn't merged yet.)

Discussion:
} key!(is_builtin, bool); <del> key!(endian = "target_endian"); key!(c_int_width = "target_c_int_width"); </del> <ins> key!(endian = "target-endian"); key!(c_int_width = "target-c-int-width"); </ins> key!(os); key!(env); key!(vendor);

key!(exe_suffix); key!(staticlib_prefix); key!(staticlib_suffix); <del> key!(os_family = "target_family", optional); </del> <ins> key!(os_family = "target-family", optional); </ins> key!(abi_return_struct_as_int, bool); key!(is_like_osx, bool); key!(is_like_solaris, bool);

key!(limit_rdylib_exports, bool); key!(override_export_symbols, opt_list); key!(merge_functions, MergeFunctions)?; <del> key!(mcount = "target_mcount"); </del> <ins> key!(mcount = "target-mcount"); </ins> key!(llvm_abiname); key!(relax_elf_relocations, bool); key!(llvm_args, list);

target_val!(data_layout); target_option_val!(is_builtin); <del> target_option_val!(endian, "target_endian"); target_option_val!(c_int_width, "target_c_int_width"); </del> <ins> target_option_val!(endian, "target-endian"); target_option_val!(c_int_width, "target-c-int-width"); </ins> target_option_val!(os); target_option_val!(env); target_option_val!(vendor);

target_option_val!(exe_suffix); target_option_val!(staticlib_prefix); target_option_val!(staticlib_suffix); <del> target_option_val!(os_family, "target_family"); </del> <ins> target_option_val!(os_family, "target-family"); </ins> target_option_val!(abi_return_struct_as_int); target_option_val!(is_like_osx); target_option_val!(is_like_solaris);

target_option_val!(limit_rdylib_exports); target_option_val!(override_export_symbols); target_option_val!(merge_functions); <del> target_option_val!(mcount, "target_mcount"); </del> <ins> target_option_val!(mcount, "target-mcount"); </ins> target_option_val!(llvm_abiname); target_option_val!(relax_elf_relocations); target_option_val!(llvm_args);
Change:
This is a tracking issue for and (part of rust-lang/rfcs). The feature gate for the issue is . [x] Implement the RFC [x] FCP [ ] Adjust documentation [ ] Stabilization PR Is the performance of the current implementation (based on ) good enough to be useful? Concern raised in . Initial implementation:
We discussed this in today's meeting. We'd like to see a comment documenting the performance characteristics of this (as well as a corresponding update to ), and suggesting that this might not be what you want if you're removing a substantial number of elements. Beyond that documentation, though, we'd be happy to see this stable. merge
Team member has proposed to merge this. The next step is review by the rest of the tagged team members: [x] [x] [x] [x] [x] [ ] No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See for info about what commands tagged team members can give me.
:bell: This is now entering its final comment period, as per the . :bell:
The final comment period, with a disposition to merge, as per the , is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. The RFC will be merged soon.

Discussion:
/// # Examples /// /// ``` <del> /// #![feature(btree_retain)] </del> /// use std::collections::BTreeMap; /// /// let mut map: BTreeMap<i32, i32> = (0..8).map(|x| (x, x*10)).collect();

/// assert!(map.into_iter().eq(vec![(0, 0), (2, 20), (4, 40), (6, 60)])); /// ``` #[inline] <del> #[unstable(feature = "btree_retain", issue = "79025")] </del> <ins> #[stable(feature = "btree_retain", since = "1.53.0")] </ins> pub fn retain<F>(&mut self, mut f: F) where K: Ord,

/// # Examples /// /// ``` <del> /// #![feature(btree_retain)] </del> /// use std::collections::BTreeSet; /// /// let xs = [1, 2, 3, 4, 5, 6];

/// set.retain(|&k| k % 2 == 0); /// assert!(set.iter().eq([2, 4, 6].iter())); /// ``` <del> #[unstable(feature = "btree_retain", issue = "79025")] </del> <ins> #[stable(feature = "btree_retain", since = "1.53.0")] </ins> pub fn retain<F>(&mut self, mut f: F) where T: Ord,
Change:
Let's say I want my struct to be comparable with anything that can be converted into the struct itself, but the actual comparison requires : () Errors:
For reference,

Discussion:
<ins> // run-rustfix // https://github.com/rust-lang/rust/issues/79076 use std::cmp::PartialEq; #[derive(Clone, Eq)] //~ ERROR [E0277] pub struct Struct<T: std::clone::Clone>(T); impl<T: Clone, U> PartialEq<U> for Struct<T> where U: Into<Struct<T>> + Clone { fn eq(&self, _other: &U) -> bool { todo!() } } fn main() {} </ins>

<ins> // run-rustfix // https://github.com/rust-lang/rust/issues/79076 use std::cmp::PartialEq; #[derive(Clone, Eq)] //~ ERROR [E0277] pub struct Struct<T>(T); impl<T: Clone, U> PartialEq<U> for Struct<T> where U: Into<Struct<T>> + Clone { fn eq(&self, _other: &U) -> bool { todo!() } } fn main() {} </ins>

<ins> error[E0277]: the trait bound `T: Clone` is not satisfied --> $DIR/derive-clone-for-eq.rs:6:17 | LL | #[derive(Clone, Eq)] |                 ^^ the trait `Clone` is not implemented for `T` | note: required because of the requirements on the impl of `PartialEq` for `Struct<T>` --> $DIR/derive-clone-for-eq.rs:9:19 | LL | impl<T: Clone, U> PartialEq<U> for Struct<T> |                   ^^^^^^^^^^^^     ^^^^^^^^^ note: required by a bound in `Eq` --> $SRC_DIR/core/src/cmp.rs:LL:COL | LL | pub trait Eq: PartialEq<Self> { |               ^^^^^^^^^^^^^^^ required by this bound in `Eq` = note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider restricting type parameter `T` | LL | pub struct Struct<T: std::clone::Clone>(T); |                    +++++++++++++++++++ error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. </ins>