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<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim
label +S-bug-has-mcve
I'm having trouble understanding this ICE. Could someone point me in the right direction? Thanks for your help!
release-assignment I'm finding this quite hard. For anyone else: I suspect is responsible.

Discussion:
let msg = "macro-expanded `extern crate` items cannot  shadow names passed with `--extern`"; self.r.tcx.sess.span_err(item.span, msg); <ins> // `return` is intended to discard this binding because it's an // unregistered ambiguity error which would result in a panic // caused by inconsistency `path_res` // more details: https://github.com/rust-lang/rust/pull/111761 return; </ins> } } let entry = self.r.extern_prelude.entry(ident.normalize_to_macros_2_0()).or_insert(

/// A specific scope in which a name can be looked up. /// This enum is currently used only for early resolution (imports and macros), /// but not for late resolution yet. <del> #[derive(Clone, Copy)] </del> <ins> #[derive(Clone, Copy, Debug)] </ins> enum Scope<'a> { DeriveHelpers(LocalExpnId), DeriveHelpersCompat,

<ins> // edition: 2021 // https://github.com/rust-lang/rust/pull/111761#issuecomment-1557777314 macro_rules! m { () => { extern crate core as std; //~^ ERROR macro-expanded `extern crate` items cannot shadow names passed with `--extern` } } m!(); use std::mem; fn main() {} </ins>

<ins> error: macro-expanded `extern crate` items cannot shadow names passed with `--extern` --> $DIR/issue-109148.rs:6:9 | LL |         extern crate core as std; |         ^^^^^^^^^^^^^^^^^^^^^^^^^ ... LL | m!(); | ---- in this macro invocation | = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) error: aborting due to previous error </ins>
Change:
It would be more helpful to suggest the method for the typo rather than a nightly-only symbol which isn't actually available. the suggestion doesn't work. method is actually available on a . method has been stable since 1.0.0. had trouble noticing the difference between and and could have used the compiler's help. No response Reproduced with 1.68.0 stable and 1.70 nightly. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
cc
claim

Discussion:
true } }) <ins> // ensure that we don't suggest unstable methods .filter(|candidate| { // note that `DUMMY_SP` is ok here because it is only used for // suggestions and macro stuff which isn't applicable here. !matches!( self.tcx.eval_stability(candidate.item.def_id, None, DUMMY_SP, None), stability::EvalResult::Deny { .. } ) }) </ins> .map(|candidate| candidate.item.ident(self.tcx)) .filter(|&name| set.insert(name)) .collect();

<ins> #![feature(staged_api)] #![stable(feature = "libfoo", since = "1.0.0")] #[unstable(feature = "foo", reason = "...", issue = "none")] pub fn foo() {} #[stable(feature = "libfoo", since = "1.0.0")] pub struct Foo; impl Foo { #[unstable(feature = "foo", reason = "...", issue = "none")] pub fn foo(&self) {} } </ins>

<ins> // aux-build: similar-unstable-method.rs extern crate similar_unstable_method; fn main() { // FIXME: this function should not suggest the `foo` function. similar_unstable_method::foo1(); //~^ ERROR cannot find function `foo1` in crate `similar_unstable_method` [E0425] let foo = similar_unstable_method::Foo; foo.foo1(); //~^ ERROR no method named `foo1` found for struct `Foo` in the current scope [E0599] } </ins>

<ins> error[E0425]: cannot find function `foo1` in crate `similar_unstable_method` --> $DIR/issue-109177.rs:7:30 | LL |     similar_unstable_method::foo1(); |                              ^^^^ help: a function with a similar name exists: `foo` | ::: $DIR/auxiliary/similar-unstable-method.rs:5:1 | LL | pub fn foo() {} | ------------ similarly named function `foo` defined here error[E0599]: no method named `foo1` found for struct `Foo` in the current scope --> $DIR/issue-109177.rs:11:9 | LL |     foo.foo1(); |         ^^^^ method not found in `Foo` error: aborting due to 2 previous errors Some errors have detailed explanations: E0425, E0599. For more information about an error, try `rustc --explain E0425`. </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 toolchains through Regression in
label +S-bug-has-mcve
Triage: the ICE has been fixed since nightly-2023-05-17. labels: +E-needs-test

Discussion:
<ins> // test for ice #109178  cannot relate region: LUB(ReErased, ReError) #![allow(incomplete_features)] #![crate_type = "lib"] #![feature(adt_const_params, generic_const_exprs)] struct Changes<const CHANGES: &[&'static str]> //~^ ERROR `&` without an explicit lifetime name cannot be used here where [(); CHANGES.len()]:, {} impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {} //~^ ERROR `&` without an explicit lifetime name cannot be used here //~^^ ERROR `&` without an explicit lifetime name cannot be used here </ins>

<ins> error[E0637]: `&` without an explicit lifetime name cannot be used here --> $DIR/ice-cannot-relate-region-109178.rs:7:31 | LL | struct Changes<const CHANGES: &[&'static str]> |                               ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here --> $DIR/ice-cannot-relate-region-109178.rs:12:21 | LL | impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {} |                     ^ explicit lifetime name needed here error[E0637]: `&` without an explicit lifetime name cannot be used here --> $DIR/ice-cannot-relate-region-109178.rs:12:23 | LL | impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {} |                       ^ explicit lifetime name needed here error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0637`. </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 toolchains through Regression in
Alternative: As long as the variants for and are different.
label +S-bug-has-mcve
This ICE caused by different root cause.

Discussion:
} } <del> unreachable!( "we captured two identical projections: capture1 = {:?}, capture2 = {:?}", capture1, capture2 </del> <ins> self.tcx.sess.delay_span_bug( closure_span, &format!( "two identical projections: ({:?}, {:?})", capture1.place.projections, capture2.place.projections ), </ins> ); <ins> std::cmp::Ordering::Equal </ins> }); }

<ins> enum Either { One(X), Two(X), } struct X(Y); struct Y; fn consume_fnmut(f: &dyn FnMut()) { f(); } fn move_into_fnmut() { let x = move_into_fnmut(); consume_fnmut(&|| { let Either::One(_t) = x; //~ ERROR mismatched types let Either::Two(_t) = x; //~ ERROR mismatched types }); } fn main() { } </ins>

<ins> error[E0308]: mismatched types --> $DIR/issue-109188.rs:17:13 | LL |         let Either::One(_t) = x; |             ^^^^^^^^^^^^^^^   - this expression has type `()` |             | |             expected `()`, found `Either` error[E0308]: mismatched types --> $DIR/issue-109188.rs:18:13 | LL |         let Either::Two(_t) = x; |             ^^^^^^^^^^^^^^^   - this expression has type `()` |             | |             expected `()`, found `Either` error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0308`. </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
Minimal:
label +S-bug-has-mcve

Discussion:
tcx, trait_ref.substs.extend_to(tcx, assoc.def_id, |param, _| tcx.mk_param_from_def(param)), ); <ins> let fn_sig = tcx.liberate_late_bound_regions(fn_hir_id.expect_owner().to_def_id(), fn_sig); </ins> <del> let ty = if let Some(arg_idx) = arg_idx { fn_sig.input(arg_idx) } else { fn_sig.output() }; Some(tcx.liberate_late_bound_regions(fn_hir_id.expect_owner().to_def_id(), ty)) </del> <ins> Some(if let Some(arg_idx) = arg_idx { *fn_sig.inputs().get(arg_idx)? } else { fn_sig.output() }) </ins> } #[instrument(level = "trace", skip(self, generate_err))]

<ins> trait Foo { fn bar(); } impl Foo for () { fn bar(s: _) {} //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions } fn main() {} </ins>

<ins> error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions --> $DIR/bad-infer-in-trait-impl.rs:6:15 | LL |     fn bar(s: _) {} |               ^ not allowed in type signatures | help: use type parameters instead | LL |     fn bar<T>(s: T) {} |           +++    ~ error: aborting due to previous error For more information about this error, try `rustc --explain E0121`. </ins>
Change:
With , and a empty folder, and running , I get the following error On , x86-64, linux. <details<summaryFull Log </summaryCC </detailsCC
is this a recent regression? are you able to bisect it?
off the top of my head, looks very fishy, that should never happem
I've locally bisected to , which contains this PR that sounds relevant:

Discussion:
host: TargetSelection, target: TargetSelection, ) -> Compiler { <del> if self.build.force_use_stage2() { </del> <ins> if self.build.force_use_stage2(stage) { </ins> self.compiler(2, self.config.build) <del> } else if self.build.force_use_stage1(Compiler { stage, host }, target) { </del> <ins> } else if self.build.force_use_stage1(stage, target) { </ins> self.compiler(1, self.config.build) } else { self.compiler(stage, host)

/// /// When all of these conditions are met the build will lift artifacts from /// the previous stage forward. <del> fn force_use_stage1(&self, compiler: Compiler, target: TargetSelection) -> bool { </del> <ins> fn force_use_stage1(&self, stage: u32, target: TargetSelection) -> bool { </ins> !self.config.full_bootstrap <del> && compiler.stage >= 2 </del> <ins> && !self.config.download_rustc() && stage >= 2 </ins> && (self.hosts.iter().any(|h| *h == target) || target == self.build) } /// Checks whether the `compiler` compiling for `target` should be forced to /// use a stage2 compiler instead. /// <del> /// When we download the pre-compiled version of rustc it should be forced to /// use a stage2 compiler. fn force_use_stage2(&self) -> bool { self.config.download_rustc() </del> <ins> /// When we download the pre-compiled version of rustc and compiler stage is >= 2, /// it should be forced to use a stage2 compiler. fn force_use_stage2(&self, stage: u32) -> bool { self.config.download_rustc() && stage >= 2 </ins> } /// Given `num` in the form "a.b.c" return a "release string" which
Change:
I tried this code: I expected to see this happen: An error saying that is invalid and should be instead. Instead, this happened: <!-- 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. --HEAD is branched from <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim

Discussion:
needs_codegen_cfg } <del> const CODEGEN_BACKEND_PREFIX: &str = "rustc_codegen_"; </del> <ins> pub(crate) const CODEGEN_BACKEND_PREFIX: &str = "rustc_codegen_"; </ins> fn is_codegen_cfg_needed(path: &TaskPath, run: &RunConfig<'_>) -> bool { if path.path.to_str().unwrap().contains(&CODEGEN_BACKEND_PREFIX) {

use crate::cache::{Interned, INTERNER}; use crate::cc_detect::{ndk_compiler, Language}; use crate::channel::{self, GitInfo}; <ins> use crate::compile::CODEGEN_BACKEND_PREFIX; </ins> pub use crate::flags::Subcommand; use crate::flags::{Color, Flags, Warnings}; use crate::util::{exe, output, t};

.map(|v| v.parse().expect("failed to parse rust.llvm-libunwind")); if let Some(ref backends) = rust.codegen_backends { <del> config.rust_codegen_backends = backends.iter().map(|s| INTERNER.intern_str(s)).collect(); </del> <ins> let available_backends = vec!["llvm", "cranelift", "gcc"]; config.rust_codegen_backends = backends.iter().map(|s| { if let Some(backend) = s.strip_prefix(CODEGEN_BACKEND_PREFIX) { if available_backends.contains(&backend) { panic!("Invalid value '{s}' for 'rust.codegen-backends'. Instead, please use '{backend}'."); } else { println!("help: '{s}' for 'rust.codegen-backends' might fail.  Codegen backends are mostly defined without the '{CODEGEN_BACKEND_PREFIX}' prefix.  In this case, it would be referred to as '{backend}'."); } } INTERNER.intern_str(s) }).collect(); </ins> } config.rust_codegen_units = rust.codegen_units.map(threads_from_config);
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-10 to nightly-2023-03-18 regressed nightly: nightly-2023-02-12 searched commit range: regressed commit: cc
Could you assign it to me, I am willing to try to solve the problem

Discussion:
t } <del> // Define a dummy resolution containing a `Res::Err` as a placeholder for a failed resolution, // also mark such failed imports as used to avoid duplicate diagnostics. fn import_dummy_binding(&mut self, import: &'a Import<'a>) { </del> <ins> // Define a dummy resolution containing a `Res::Err` as a placeholder for a failed // or indeterminate resolution, also mark such failed imports as used to avoid duplicate diagnostics. fn import_dummy_binding(&mut self, import: &'a Import<'a>, is_indeterminate: bool) { </ins> if let ImportKind::Single { target, ref target_bindings, .. } = import.kind { <del> if target_bindings.iter().any(|binding| binding.get().is_some()) { </del> <ins> if !(is_indeterminate || target_bindings.iter().all(|binding| binding.get().is_none())) { </ins> return; // Has resolution, do not create the dummy binding } let dummy_binding = self.dummy_binding;

// If this import is unresolved then create a dummy import // resolution for it so that later resolve stages won't complain. <del> self.import_dummy_binding(import); </del> <ins> self.import_dummy_binding(import, is_indeterminate); </ins> if let Some(err) = unresolved_import_error { if let ImportKind::Single { source, ref source_bindings, .. } = import.kind {

fluent_messages! { "../messages.ftl" } <ins> #[derive(Debug)] </ins> enum Weak { Yes, No,

GoodPath, } <del> #[derive(Clone, Hash)] </del> <ins> #[derive(Clone, Hash, Debug)] </ins> pub enum ResolveDocLinks { /// Do not resolve doc links. None,

<ins> #![crate_type = "lib"] pub mod f {} pub use unresolved::f; //~^ ERROR unresolved import `unresolved` /// [g] pub use f as g; fn main() {} </ins>

<ins> error[E0432]: unresolved import `unresolved` --> $DIR/issue-109343.rs:4:9 | LL | pub use unresolved::f; |         ^^^^^^^^^^ maybe a missing crate `unresolved`? | = help: consider adding `extern crate unresolved` to use the `unresolved` crate error: aborting due to previous error For more information about this error, try `rustc --explain E0432`. </ins>
Change:
passes fails On recent master (commit ), with to avoid building LLVM: Extra spin/Side note: Contrary to the above, with , both and pass well: and . All the same when invoking with instead of . Also discussed at https://rust- <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
I think is not actually passing through to libtest, it's just acting as a filter on the tests (like would). looks like today the only way to configure this is through an env variable: changing that to accept seems useful
claim
Wow. Thank you.

Discussion:
pub only_modified: bool, pub target_cfg: LazyCell<TargetCfg>, <ins> pub nocapture: bool, </ins> } impl Config {

) .optflag("", "force-rerun", "rerun tests even if the inputs are unchanged") .optflag("", "only-modified", "only run tests that result been modified") <ins> .optflag("", "nocapture", "") </ins> .optflag("h", "help", "show this message") .reqopt("", "channel", "current Rust channel", "CHANNEL") .optopt("", "edition", "default Rust edition", "EDITION");

force_rerun: matches.opt_present("force-rerun"), target_cfg: LazyCell::new(), <ins> nocapture: matches.opt_present("nocapture"), </ins> } }

} pub fn test_opts(config: &Config) -> test::TestOpts { <ins> if env::var("RUST_TEST_NOCAPTURE").is_ok() { eprintln!( "WARNING: RUST_TEST_NOCAPTURE is no longer used.  Use the `--nocapture` flag instead." ); } </ins> test::TestOpts { exclude_should_panic: false, filters: config.filters.clone(),

logfile: config.logfile.clone(), run_tests: true, bench_benchmarks: true, <del> nocapture: match env::var("RUST_TEST_NOCAPTURE") { Ok(val) => &val != "0", Err(_) => false, }, </del> <ins> nocapture: config.nocapture, </ins> color: config.color, shuffle: false, shuffle_seed: None,
Change:
I would like to enable linker relaxation for the RISC-V target. To do so I passed to tell LLVM to use linker relaxation. It seems like is not aware of this option, so it emits a warning (but the feature is still properly enabled). I can't find any way to disable this warning, so I am submitting this issue in the hopes that either the feature will become recognized, or a way to disable the warning will be . Related: . The program is compiled by running Hopefully I've posted this to the correct place. Thanks! No response No response
Does work in this context?
I tried it out and it does not seem to enable linker relaxation unfortunately.
I wonder where could I add ? Now I am using cargo build:
Why is a target feature being used for linker relaxation...?
This optimization/feature is specific to RISC-V. For the RISC-V target by default LLVM does not emit relocations (in the generated object file) for global variable lookups that tell the linker to make use of linker relaxation (generating addresses for globals using the register). I’m not sure of the rationale behind this (gcc enables it by default and uses to disable it). One reason might be that using linker relaxation does require the runtime or something to set up the register beforehand. In any case it should be possible to enable with Rust without getting a warning, and perhaps should even be enabled by default for RISC-V targets.
As mentioned in the other issue, the warning is in large part because LLVM and Rust don't always agree on the definition of a target feature, in part because LLVM has proven surprisingly willing to change the definitions. Proooobably we should just enable this by default, then, if gcc does? Hmm.

Discussion:
("e", Some(sym::riscv_target_feature)), ("f", Some(sym::riscv_target_feature)), ("m", Some(sym::riscv_target_feature)), <ins> ("relax", Some(sym::riscv_target_feature)), </ins> ("v", Some(sym::riscv_target_feature)), ("zba", Some(sym::riscv_target_feature)), ("zbb", Some(sym::riscv_target_feature)),
Change:
it seems like the source directory in the printout for ui tests uses "fake-test-src-base" rn, e.g. this prevents ctrl+leftclick in vscode to take me directly to the relevant point in the source of the failing test. it would be nice to somehowo keep the actual path in the output for ui tests and only normalize it when writing into the stderr file? see https://rust- for more details
Note that we already print the real path in the "--- [ui] ... stdout ---" line at the top, but it would be nice to have this in addition so that line/column jumping works too.
One possible workaround is to only pass remap-path-prefix in CI. I think it may also be possible to solve the problem on with a different mechanism entirely by stripping out the the directory with test normalization for UI tests involving closures? https://rustc-dev-
I think there are two reasons why this may be a suboptimal solution: 1) You'd still have to deal with the showing up depending on the path length. 2) The difference between and is that the version indicates that has printed a full path, whereas for the non- version only a filename was printed. It may be useful / desirable to be able to distinguish the two cases in the output files.
makes sense - in that case the simplest fix is to gate remap-path-prefix on

Discussion:
use std::path::{Path, PathBuf}; use std::process::Command; <ins> use build_helper::ci::CiEnv; </ins> use tracing::*; use crate::common::{Config, Debugger, FailMode, Mode, PassMode};

/// `//[foo]`), then the property is ignored unless `cfg` is /// `Some("foo")`. fn load_from(&mut self, testfile: &Path, cfg: Option<&str>, config: &Config) { <del> // Mode-dependent defaults. self.remap_src_base = config.mode == Mode::Ui && !config.suite.contains("rustdoc"); </del> <ins> // In CI, we've sometimes encountered non-determinism related to truncating very long paths. // Set a consistent (short) prefix to avoid issues, but only in CI to avoid regressing the // contributor experience. if CiEnv::is_ci() { self.remap_src_base = config.mode == Mode::Ui && !config.suite.contains("rustdoc"); } </ins> let mut has_edition = false; if !testfile.is_dir() {