jiebi/CodeConvo huggingface dataset:
Change:
Especially for people new to async, this message is extremely opaque. There is not actually enough information to understand it unless you already know (a) that async blocks produce an anonymous future type and (b) that regardless of the type, those futures are always unique and incompatible types. The message sort of implies this (“found a different block”), but it is not actionable in any way. It is pretty easy to get here by reaching for (to pick just one easy example) . I ended up stumbling across it in the process of building up some sample code for the new async chapter in , and I had a moment at first! I have the time to help fix this, so if someone can point me in the right direction and help get it landed, I would be delighted to do the work. No response No response_
This seems like a good suggestion. I'd suggest tweaking the wording a bit, since I don't know that the implications of async blocks having unique types are immediately obvious. Maybe something like this?
labels +AsyncAwait-Triaged We discussed this in our async call and agreed that some improvement along these lines would be good. We could wordsmith it in the PR of course. (It'd be interesting too to add such diagnostics for closures and other similar cases.)
For reference, here's the error message for mismatched s (). Perhaps borrowing from this phrasing could be helpful here?

Discussion:
diag.note("no two closures, even if identical, have the same type"); diag.help("consider boxing your closure and/or using it as a trait object"); } <ins> (ty::Coroutine(def_id1, ..), ty::Coroutine(def_id2, ..)) if self.tcx.coroutine_is_async(def_id1) && self.tcx.coroutine_is_async(def_id2) => { diag.note("no two async blocks, even if identical, have the same type"); diag.help( "consider pinning your async block and casting it to a trait object", ); } </ins> (ty::Alias(ty::Opaque, ..), ty::Alias(ty::Opaque, ..)) => { // Issue #63167 diag.note("distinct uses of `impl Trait` result in different opaque types");

| = note: expected `async` block `{async block@$DIR/coroutine-desc.rs:10:9: 10:17}` found `async` block `{async block@$DIR/coroutine-desc.rs:10:19: 10:27}` <ins> = note: no two async blocks, even if identical, have the same type = help: consider pinning your async block and casting it to a trait object </ins> note: function defined here --> $DIR/coroutine-desc.rs:8:4 |

| = note: expected `async` closure body `{async closure body@$DIR/coroutine-desc.rs:14:19: 14:21}` found `async` closure body `{async closure body@$DIR/coroutine-desc.rs:14:36: 14:38}` <ins> = note: no two async blocks, even if identical, have the same type = help: consider pinning your async block and casting it to a trait object </ins> note: function defined here --> $DIR/coroutine-desc.rs:8:4 |
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. --(hand-reduced) <details<summary<strong(original)</strong</summary<p</p</details<!-- 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. --: Command: option is to avoid error message (there exists another error at the end of the backtrace) <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details- ICE location: Might be related to unsolved ICE Issue- (issue fixed by adding test-case), where the issue points to

Discussion:
self.handle_term(ct, ty::Const::outer_exclusive_binder, |tcx, guar| { ty::Const::new_error(tcx, guar, ct.ty()) }) <ins> .super_fold_with(self) </ins> } fn fold_predicate(&mut self, predicate: ty::Predicate<'tcx>) -> ty::Predicate<'tcx> {

<ins> error: `Bar` is forbidden as the type of a const generic parameter --> $DIR/const_generic_type.rs:7:24 | LL | async fn test<const N: crate::Bar>() { |                        ^^^^^^^^^^ | = note: the only supported types are integers, `bool` and `char` error: aborting due to 1 previous error </ins>

<ins> error[E0283]: type annotations needed --> $DIR/const_generic_type.rs:7:1 | LL | async fn test<const N: crate::Bar>() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type | = note: cannot satisfy `_: std::fmt::Display` error: `Bar` is forbidden as the type of a const generic parameter --> $DIR/const_generic_type.rs:7:24 | LL | async fn test<const N: crate::Bar>() { |                        ^^^^^^^^^^ | = note: the only supported types are integers, `bool` and `char` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0283`. </ins>

<ins> //@edition: 2021 //@revisions: infer no_infer #![feature(type_alias_impl_trait)] type Bar = impl std::fmt::Display; async fn test<const N: crate::Bar>() { //[no_infer]~^ ERROR: type annotations needed //~^^ ERROR: `Bar` is forbidden as the type of a const generic parameter #[cfg(infer)] let x: u32 = N; } fn main() {} </ins>
Change:
<!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at 'assertion failed: !self.intercrate'', 'thread 'rustc' panicked at 'assertion failed: !self.intercrate'' 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: [specializationgraphof] building specialization graph of trait [coherent_trait] coherence checking all impls of trait -- label +F-Unsize +F-unsize
The bisection looks incorrect? is from 1.77, and this looks to be from 1.72 to me.
Too lazy to look at its PRs :
Due to . This assertion is correct, and we probably shouldn't drop candidates in intercrate mode, since this is incomplete. I would say this fix is low-pri because of the fact that is not expected to be referenced.

Discussion:
param_env: ty::ParamEnv<'tcx>, cause: &ObligationCause<'tcx>, ) -> Option<ty::PolyExistentialTraitRef<'tcx>> { <ins> // Don't drop any candidates in intercrate mode, as it's incomplete. // (Not that it matters, since `Unsize` is not a stable trait.) if self.infcx.intercrate { return None; } </ins> let tcx = self.tcx(); if tcx.features().trait_upcasting { return None;

<ins> #![feature(unsize)] use std::marker::Unsize; use std::ops::Deref; trait Foo: Bar {} trait Bar {} impl<T> Bar for T where dyn Foo: Unsize<dyn Bar> {} impl Bar for () {} //~^ ERROR conflicting implementations of trait `Bar` for type `()` fn main() {} </ins>

<ins> error[E0119]: conflicting implementations of trait `Bar` for type `()` --> $DIR/dont-drop-upcast-candidate.rs:10:1 | LL | impl<T> Bar for T where dyn Foo: Unsize<dyn Bar> {} | ------------------------------------------------ first implementation here LL | impl Bar for () {} | ^^^^^^^^^^^^^^^ conflicting implementation for `()` error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0119`. </ins>
Change:
Similar to but different query stack <!-- [31mICE[0m: Rustc '' 'thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0'', 'thread 'rustc' panicked at 'index out of bounds: the len is 0 but the index is 0'' 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: [mirbuilt] building MIR for [mirconstqualif] const checking --
ICE introduced in . No longer ICEs after , which was a partial revert of

Discussion:
<ins> // Test for ICE: mir_const_qualif: index out of bounds: the len is 0 but the index is 0 // https://github.com/rust-lang/rust/issues/125837 use std::fmt::Debug; trait Foo<Item> {} impl<Item, D: Debug + Clone> Foo for D { //~^ ERROR missing generics for trait `Foo` fn foo<'a>(&'a self) -> impl Debug { //~^ ERROR method `foo` is not a member of trait `Foo` const { return } //~^ ERROR return statement outside of function body } } pub fn main() {} </ins>

<ins> error[E0407]: method `foo` is not a member of trait `Foo` --> $DIR/ice-mir-const-qualif-125837.rs:10:5 | LL | /     fn foo<'a>(&'a self) -> impl Debug { LL | | LL | |         const { return } LL | | LL | |     } | |_____^ not a member of trait `Foo` error[E0107]: missing generics for trait `Foo` --> $DIR/ice-mir-const-qualif-125837.rs:8:30 | LL | impl<Item, D: Debug + Clone> Foo for D { |                              ^^^ expected 1 generic argument | note: trait defined here, with 1 generic parameter: `Item` --> $DIR/ice-mir-const-qualif-125837.rs:6:7 | LL | trait Foo<Item> {} |       ^^^ ---- help: add missing generic argument | LL | impl<Item, D: Debug + Clone> Foo<Item> for D { |                                 ++++++ error[E0572]: return statement outside of function body --> $DIR/ice-mir-const-qualif-125837.rs:12:17 | LL | /     fn foo<'a>(&'a self) -> impl Debug { LL | | LL | |         const { return } | |               --^^^^^^-- the return is part of this body... LL | | LL | |     } | |_____- ...not the enclosing function body error: aborting due to 3 previous errors Some errors have detailed explanations: E0107, E0407, E0572. For more information about an error, try `rustc --explain E0107`. </ins>
Change:
<!-- [31mICE[0m: Rustc '-Zincremental-verify-ich=yes -Cincremental=<dir-Cdebuginfo=2' '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: note: compiler flags: -Z incremental-verify-ich=yes -C incremental=[REDACTED] -C debuginfo=2 [mirborrowck] borrow-checking [mirborrowck] borrow-checking -- label +F-closurelifetimebinder +F-inline_const
another one from
Technically fixed by revert
Do we have a technical regression test?
Technically, I don't think so

Discussion:
<ins> // Test for ICE: cannot convert ReLateParam to a region vid // https://github.com/rust-lang/rust/issues/125873 #![feature(closure_lifetime_binder)] fn foo() { let a = for<'a> |b: &'a ()| -> &'a () { const { let awd = (); let _: &'a () = &awd; //~^ `awd` does not live long enough }; b }; } fn main() {} </ins>

<ins> error[E0597]: `awd` does not live long enough --> $DIR/using-late-bound-from-closure.rs:9:29 | LL |     let a = for<'a> |b: &'a ()| -> &'a () { |                 -- lifetime `'a` defined here LL |         const { LL |             let awd = (); |                 --- binding `awd` declared here LL |             let _: &'a () = &awd; |                    ------   ^^^^ borrowed value does not live long enough |                    | |                    type annotation requires that `awd` is borrowed for `'a` LL | LL |         }; |         - `awd` dropped here while still borrowed error: aborting due to 1 previous error For more information about this error, try `rustc --explain E0597`. </ins>
Change:
When emitting an error like the following Allow the flag () to print the whole list by modifying There are other places where we limit output where we don't currently listen to this flag to expand the output. For type name shortening I believe we already do, but we should look for all of them and make the appropriate change for them too. Originally reported at
Hi, I am interested in this easy issue. Can I submit a PR to fix it?
of course!
Can you help me review this PR?

Discussion:
}) .collect(); <del> let end = if candidates.len() <= 9 { candidates.len() } else { 8 }; </del> <ins> let end = if candidates.len() <= 9 || self.tcx.sess.opts.verbose { candidates.len() } else { 8 }; </ins> err.help(format!( "the following {other}types implement trait `{}`:{}{}", trait_ref.print_trait_sugared(), candidates[..end].join(""), <del> if candidates.len() > 9 { </del> <ins> if candidates.len() > 9 && !self.tcx.sess.opts.verbose { </ins> format!("nand {} others", candidates.len() - 8) } else { String::new()
Change:
The "In Names" search tab is fine, but the "In Parameters" and "In Return Types" have the confusing note that ! label: +T-rustdoc +A-rustdoc-ui

Discussion:
* @param {boolean} isAssocType */ function convertNameToId(elem, isAssocType) { <del> if (typeNameIdMap.has(elem.normalizedPathLast) && (isAssocType || !typeNameIdMap.get(elem.normalizedPathLast).assocOnly)) { elem.id = typeNameIdMap.get(elem.normalizedPathLast).id; </del> <ins> const loweredName = elem.pathLast.toLowerCase(); if (typeNameIdMap.has(loweredName) && (isAssocType || !typeNameIdMap.get(loweredName).assocOnly)) { elem.id = typeNameIdMap.get(loweredName).id; </ins> } else if (!parsedQuery.literalSearch) { let match = null; let matchDist = maxEditDistance + 1; let matchName = ""; for (const [name, {id, assocOnly}] of typeNameIdMap) { <del> const dist = editDistance(name, elem.normalizedPathLast, maxEditDistance); </del> <ins> const dist = Math.min( editDistance(name, loweredName, maxEditDistance), editDistance(name, elem.normalizedPathLast, maxEditDistance), ); </ins> if (dist <= matchDist && dist <= maxEditDistance && (isAssocType || !assocOnly)) { if (dist === matchDist && matchName > name) {

<ins> const EXPECTED = [ { 'query': 'pid_t', 'correction': null, 'proposeCorrectionFrom': null, 'proposeCorrectionTo': null, 'others': [ { 'path': 'underscoredtype::unix', 'name': 'pid_t' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'set_pid' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'get_pid' }, ], }, { 'query': 'pidt', 'correction': 'pid_t', 'proposeCorrectionFrom': null, 'proposeCorrectionTo': null, 'others': [ { 'path': 'underscoredtype::unix', 'name': 'pid_t' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'set_pid' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'get_pid' }, ], }, { 'query': 'unix::pid_t', 'correction': null, 'proposeCorrectionFrom': null, 'proposeCorrectionTo': null, 'others': [ { 'path': 'underscoredtype::unix', 'name': 'pid_t' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'set_pid' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'get_pid' }, ], }, { 'query': 'unix::pidt', 'correction': 'pid_t', 'proposeCorrectionFrom': null, 'proposeCorrectionTo': null, 'others': [ { 'path': 'underscoredtype::unix', 'name': 'pid_t' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'set_pid' }, ], 'returned': [ { 'path': 'underscoredtype::unix', 'name': 'get_pid' }, ], }, ]; </ins>

<ins> pub mod unix { #[allow(non_camel_case_types)] pub type pid_t = i32; pub fn get_pid() -> pid_t { 0 } pub fn set_pid(_: pid_t) {} } </ins>
Change:
Regression in ( cc modify labels: +regression-from-stable-to-stable -regression-untriaged
WG-prioritization assigning priority (). label -I-prioritize +P-medium
Beta backport accepted as per compiler team . A backport PR will be authored by the release team at the end of the current development cycle. label +beta-accepted

Discussion:
} hir::ImplItemKind::Type(_) => false, }, <ins> Node::Expr(&hir::Expr { kind: hir::ExprKind::Closure(..), .. }) => true, </ins> _ => false, } }

pub static G: fn() = G0; pub static H: &(dyn Fn() + Sync) = &h; pub static I: fn() = Helper(j).mk(); <ins> pub static K: fn() -> fn() = { #[inline(never)] fn k() {} #[inline(always)] || -> fn() { k } }; </ins> static X: u32 = 42; static G0: fn() = g;

static G: fn() = aux::G; static H: &(dyn Fn() + Sync) = aux::H; static I: fn() = aux::I; <ins> static K: fn() -> fn() = aux::K; </ins> fn v() -> *const u32 { V

G(); H(); I(); <ins> K()(); </ins> }
Change:
The relevant commit seem to be located at <details<summaryError</summary<p</p</details
Ah. cc
Ah, this was fixed in
Okay, it seems like this is just a misunderstanding. keywords cannot be searched ...
This won't be actually fixed in std until lands.

Discussion:
source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" dependencies = [ <del> "compiler_builtins", </del> "crc32fast", "flate2", "hashbrown", "indexmap", "memchr", <del> "rustc-std-workspace-alloc", "rustc-std-workspace-core", </del> "ruzstd 0.5.0", "wasmparser", ]

] [[package]] <ins> name = "object" version = "0.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" dependencies = [ "compiler_builtins", "memchr", "rustc-std-workspace-alloc", "rustc-std-workspace-core", ] [[package]] </ins> name = "odht" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index"

"hermit-abi", "libc", "miniz_oxide", <del> "object 0.32.2", </del> <ins> "object 0.36.0", </ins> "panic_abort", "panic_unwind", "profiler_builtins",

<del> Subproject commit 5e05efa87905fb5b351a2bc5644d60c57d6d9327 </del> <ins> Subproject commit 72265bea210891ae47bbe6d4f17b493ef0606619 </ins>

libc = { version = "0.2.153", default-features = false, features = ['rustc-dep-of-std'], public = true } [target.'cfg(all(not(target_os = "aix"), not(all(windows, target_env = "msvc", not(target_vendor = "uwp")))))'.dependencies] <del> object = { version = "0.32.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] } </del> <ins> object = { version = "0.36.0", default-features = false, optional = true, features = ['read_core', 'elf', 'macho', 'pe', 'unaligned', 'archive'] } </ins> [target.'cfg(target_os = "aix")'.dependencies] <del> object = { version = "0.32.0", default-features = false, optional = true, features = ['read_core', 'xcoff', 'unaligned', 'archive'] } </del> <ins> object = { version = "0.36.0", default-features = false, optional = true, features = ['read_core', 'xcoff', 'unaligned', 'archive'] } </ins> [dev-dependencies] rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
Change:
It mentions using download-ci-llvm, but that doesn't help, it requires cmake. The message should probably mention that if possible.

Discussion:
} // We need cmake, but only if we're actually building LLVM or sanitizers. <del> let building_llvm = build .hosts .iter() .map(|host| { build.config.llvm_enabled(*host) && build .config .target_config .get(host) .map(|config| config.llvm_config.is_none()) .unwrap_or(true) }) .any(|build_llvm_ourselves| build_llvm_ourselves); </del> <ins> let building_llvm = !build.config.llvm_from_ci && build .hosts .iter() .map(|host| { build.config.llvm_enabled(*host) && build .config .target_config .get(host) .map(|config| config.llvm_config.is_none()) .unwrap_or(true) }) .any(|build_llvm_ourselves| build_llvm_ourselves); </ins> let need_cmake = building_llvm || build.config.any_sanitizers_to_build(); if need_cmake && cmd_finder.maybe_have("cmake").is_none() {
Change:
I tried this code: With . I expected to see this happen: code to compile Instead, this happened: failed to compile with Looking at the relevant code: It seems is imply missed from the . Inside of the module there is already code for hermit: I think this is just an oversight, but I since I don't develop for Hermit I'm not sure. (I hit this while updating Mio) /cc :
label -needs-triage +O-hermit +A-cross +T-libs
I agree, the module is missing. I will create a PR.

Discussion:
<del> #![stable(feature = "os_fd", since = "1.66.0")] </del> <ins> #![stable(feature = "rust1", since = "1.0.0")] </ins> <del> mod net; #[path = "../../fd/owned.rs"] mod owned; #[path = "../../fd/raw.rs"] mod raw; // Export the types and traits for the public API. #[stable(feature = "os_fd", since = "1.66.0")] pub use owned::*; #[stable(feature = "os_fd", since = "1.66.0")] pub use raw::*; </del> <ins> #[stable(feature = "rust1", since = "1.0.0")] pub use crate::os::fd::*; </ins>

#[cfg(target_os = "xous")] pub mod xous; <del> #[cfg(any(unix, target_os = "wasi", doc))] </del> <ins> #[cfg(any(unix, target_os = "hermit", target_os = "wasi", doc))] </ins> pub mod fd; #[cfg(any(target_os = "linux", target_os = "android", doc))]
Change:
This used to work fine at some point, but now leads to some strange errors:
somehow Miri searches for its sysroot in instead of its own built sysroot?
When executing Miri: I thought the sysroot was passed to the process with , but I cannot find such an argument... how exactly does it find from this... I don't really understand how that works. But this may help.
I see, it gets the sysroot because is in . Slightly strange, that sysroot is not really one it can use. Why is it linked from there? But either way, the sysroot we want to use for Miri here is an entirely different one that needs to be override manually. How did that work previously?
oh lol, this was almost certainly broken by , in which you even specifically mentioned , looks like you forgot about it :D
oops thanks for fixing!

Discussion:
&[], ); miri.add_rustc_lib_path(builder); <del> // Forward arguments. </del> miri.arg("--").arg("--target").arg(target.rustc_target_arg()); <del> miri.args(builder.config.args()); </del> // miri tests need to know about the stage sysroot <del> miri.env("MIRI_SYSROOT", &miri_sysroot); </del> <ins> miri.arg("--sysroot").arg(miri_sysroot); // Forward arguments. This may contain further arguments to the program // after another --, so this must be at the end. miri.args(builder.config.args()); </ins> let mut miri = Command::from(miri); builder.run(&mut miri);
Change:
A number of mir-opt tests fail on s390x, which is a big endian architecture. Failures for 1.79: Some previous fixes for such failures were and
Something peculiar about many of these tests is that transforms seem to create ALLOCs that are not actually referenced by MIR. Is that expected? In terms of fixing this, the existing approach of picking constants that are endianness-independent doesn't seem very scalable. Maybe it would make sense to have a flag that disables dumping the contents of allocations? I think that for most of these tests they are not relevant (especially as the allocations are unused in the first place).
This appears to be an intermediate result of the optimization process, such as: (tests/mir-). There is an option to skip these tests, but I like another option to change the output to be uniformly little-endian.
If these tests don't actually care about the raw bytes in their UI comparisons, then they can use to hide the bytes. There are quite a few tests that already normalize to the string "HEX_DUMP".
Rather than trying to normalize output, I'm proposing an option in to skip the raw bytes altogether.
Huh, looks like a new instance has crept in just as the PR was merged. I'm now seeing a new test fail:

Discussion:
StorageDead(_1); return; } <del> + } + + ALLOC0 (size: 8, align: 4) { +     05 00 00 00 03 00 00 00                         │ ........ </del> } <ins> + + ALLOC0 (size: 8, align: 4) { .. } </ins>

//! Verify that we manage to propagate the value of aggregate `a` even without directly mentioning //! the contained scalars. //@ test-mir-pass: DataflowConstProp <ins> //@ compile-flags: -Zdump-mir-exclude-alloc-bytes </ins> const Foo: (u32, u32) = (5, 3);