jiebi/CodeConvo huggingface dataset:
Change:
Example: Found by crater run (https://crater-) when visibility resolution switched to a different algorithm (early resolution), which doesn't have this problem.
This is a regression from Rust 1.33.
Diagnostic improvements strike again:
Fixed in

Discussion:
Applicability::MaybeIncorrect, )), ) <del> } else if !ident.is_reserved() { (format!("maybe a missing crate `{}`?", ident), None) </del> } else { <del> // the parser will already have complained about the keyword being used return PathResult::NonModule(PartialRes::new(Res::Err)); </del> <ins> (format!("maybe a missing crate `{}`?", ident), None) </ins> } } else if i == 0 { (format!("use of undeclared type or module `{}`", ident), None)

// This previously triggered an ICE. pub(in crate::r#mod) fn main() {} <del> //~^ ERROR expected module, found unresolved item </del> <ins> //~^ ERROR failed to resolve: maybe a missing crate `r#mod` </ins>

<del> error[E0577]: expected module, found unresolved item `crate::r#mod` --> $DIR/issue-61732.rs:3:8 </del> <ins> error[E0433]: failed to resolve: maybe a missing crate `r#mod`? --> $DIR/issue-61732.rs:3:15 </ins> | LL | pub(in crate::r#mod) fn main() {} <del> |        ^^^^^^^^^^^^ not a module </del> <ins> |               ^^^^^ maybe a missing crate `r#mod`? </ins> error: Compilation failed, aborting rustdoc error: aborting due to 2 previous errors <del> For more information about this error, try `rustc --explain E0577`. </del> <ins> For more information about this error, try `rustc --explain E0433`. </ins>

use extern::foo; //~ ERROR expected identifier, found keyword `extern` <ins> //~| ERROR unresolved import `r#extern` </ins> fn main() {}

LL | use r#extern::foo; |     ^^^^^^^^ <del> error: aborting due to previous error </del> <ins> error[E0432]: unresolved import `r#extern` --> $DIR/keyword-extern-as-identifier-use.rs:1:5 | LL | use extern::foo; |     ^^^^^^ maybe a missing crate `r#extern`? error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0432`. </ins>

<ins> // Regression test for issue #63882. type A = crate::r#break; //~ ERROR cannot find type `r#break` in module `crate` fn main() {} </ins>

<ins> error[E0412]: cannot find type `r#break` in module `crate` --> $DIR/raw-ident-in-path.rs:3:17 | LL | type A = crate::r#break; |                 ^^^^^^^ not found in `crate` error: aborting due to previous error For more information about this error, try `rustc --explain E0412`. </ins>
Change:
This somehow doesn't occur when putting the function in a non crate, yet I can't find any difference between the version of and this one. () Errors:
Seems like it panic when the trait is not found: Maybe it can use  instead.

Discussion:
use super::{check_fn, Expectation, FnCtxt, GeneratorTypes}; use crate::astconv::AstConv; <del> use crate::middle::region; </del> <ins> use crate::middle::{lang_items, region}; </ins> use rustc::hir::def_id::DefId; use rustc::infer::{InferOk, InferResult}; use rustc::infer::LateBoundRegionConversionTime;

let trait_ref = projection.to_poly_trait_ref(tcx); let is_fn = tcx.lang_items().fn_trait_kind(trait_ref.def_id()).is_some(); <del> let gen_trait = tcx.lang_items().gen_trait().unwrap(); </del> <ins> let gen_trait = tcx.require_lang_item(lang_items::GeneratorTraitLangItem); </ins> let is_gen = gen_trait == trait_ref.def_id(); if !is_fn && !is_gen { debug!("deduce_sig_from_projection: not fn or generator");

<ins> // error-pattern: requires `generator` lang_item #![feature(no_core, lang_items, unboxed_closures)] #![no_core] #[lang = "sized"] pub trait Sized { } #[lang = "fn_once"] #[rustc_paren_sugar] pub trait FnOnce<Args> { type Output; extern "rust-call" fn call_once(self, args: Args) -> Self::Output; } pub fn abc() -> impl FnOnce(f32) { |_| {} } fn main() {} </ins>

<ins> error: requires `generator` lang_item error: aborting due to previous error </ins>
Change:
The following piece of code fail when compiled to wasm32-unknown-unknown since nightly-2019-07-18. This nightly introduces so probably related. with configuration: see the repo: it contains: javascript file used to execute test with node. file to execute the test on rust version 2019-07-17 and 2019-07-18. probably introduced by if you remove either or it works (it is not failing anymore) cc
I changed an example a bit, minimized it from the size of wasm binary prespective and used some c-reduce (which hasn't yield much improvements). compiling with there is no notable difference in , only some identifiers and imm arg in e.g. which I believe is not related. The miscompilation seems to happen around function, specifically when copying low and high parts of the u128 by the out RVO ptr (): in miscompiled version we just do this (): which doesn't make a lot of sense since should hold i64 of descriminator of returned by . All this makes me think (although I am of course not sure) that this is a LLVM IR to wasm32 lowering bug, so cc
I haven't investigated this in detail yet, but in your analysis, in the reduced version, returns a plain , not a , so it makes sense that it's not storing the discriminator.
What I meant is that the descriminator of the returned by (which is , AFAIR) is stored in first half of the out ptr (which is the return value of as you noted) Or in other words, it attempts to squeeze the descriminator of into .
I think I've reduced this a bit further: generates: and it looks like the upper or lower bits (dunno which, but at least one) isn't being copied over I've opened an upstream bug at
Visiting for compiler triage meeting. I'm marking this as a "P-medium" bug since it is specific to WASM and also due to an LLVM bug. I'm not sure if we plan to fix this on our side in any way?
The reduced testcase is now fixed in .

Discussion:
<del> Subproject commit 48818e9f5d0f2d5978a9b43ad1a2e8d0b83f6aa0 </del> <ins> Subproject commit 71fe7ec06b85f612fc0e4eb4134c7a7d0f23fac5 </ins>
Change:
() Errors: Notice how it says "struct" when it should say "union". cc this looks like low-hanging fruit
Can I pick this up if no-one is working on this?
go ahead! You need to use here to get whether it is a struct or union using .
Thanks . Newbie question, but how do I test this while development? Do I build the stage1 compiler and then write a sample test?
is the way to get the fastest iteration time. is theoretically suspect but should affect you on what you're working on and is marginally slower on first compile but much faster on subsequent compiles. You rarely (if ever) need .

Discussion:
base_did: DefId, ) { let struct_path = self.tcx().def_path_str(base_did); <ins> let kind_name = match self.tcx().def_kind(base_did) { Some(def_kind) => def_kind.descr(base_did), _ => " ", }; </ins> let mut err = struct_span_err!( self.tcx().sess, expr.span, E0616, <del> "field `{}` of struct `{}` is private", </del> <ins> "field `{}` of {} `{}` is private", </ins> field, <ins> kind_name, </ins> struct_path ); // Also check if an accessible method exists, which is often what is meant.

let a = u.a; // OK let b = u.b; // OK <del> let c = u.c; //~ ERROR field `c` of struct `m::U` is private </del> <ins> let c = u.c; //~ ERROR field `c` of union `m::U` is private </ins> }

<del> error[E0616]: field `c` of struct `m::U` is private </del> <ins> error[E0616]: field `c` of union `m::U` is private </ins> --> $DIR/union-field-privacy-2.rs:14:13 | LL |     let c = u.c;
Change:
Code Example (): <img width="805" alt="image" src="https://user-"Currently we provide a "do you mean..." for the but not for the . We probably should provide one for both.
Consider fixing Btw (which is a similar enhancement)
I'd like to work on this if it is still available.
go ahead! Ideally, you could turn the output into but just changing the tuple case would be enough.
I created a PR, could you please help review. I took a look at your suggestion of updating all the errors to , that seemed too many changes, not sure if it was necessary, so I just the tuple case.

Discussion:
(Res::Def(DefKind::Ctor(_, CtorKind::Fictive), _), _) if ns == ValueNS => { bad_struct_syntax_suggestion(); } <ins> (Res::Def(DefKind::Ctor(_, CtorKind::Fn), _), _) if ns == ValueNS => { err.span_label( span, format!("did you mean `{} ( /* fields */ )`?", path_str), ); } </ins> (Res::SelfTy(..), _) if ns == ValueNS => { err.span_label(span, fallback_label); err.note("can't use `Self` as a constructor, you must use the implemented struct");

--> $DIR/empty-struct-tuple-pat.rs:29:9 | LL |         E::Empty4 => () <del> |         ^^^^^^^^^ not a unit struct/variant or constant </del> <ins> |         ^^^^^^^^^ did you mean `E::Empty4 ( /* fields */ )`? </ins> error[E0532]: expected unit struct/variant or constant, found tuple variant `XE::XEmpty5` --> $DIR/empty-struct-tuple-pat.rs:33:9 | LL |         XE::XEmpty5 => (), |         ^^^^------- <del> |             | |             help: a unit variant with a similar name exists: `XEmpty4` </del> <ins> |         |   | |         |   help: a unit variant with a similar name exists: `XEmpty4` |         did you mean `XE::XEmpty5 ( /* fields */ )`? </ins> error: aborting due to 4 previous errors

| LL |         Foo::Bar => {} |         ^^^^^--- <del> |              | |              help: a unit variant with a similar name exists: `Baz` </del> <ins> |         |    | |         |    help: a unit variant with a similar name exists: `Baz` |         did you mean `Foo::Bar ( /* fields */ )`? </ins> error[E0532]: expected tuple struct/variant, found unit struct `S` --> $DIR/issue-32004.rs:16:9

<ins> enum MyEnum { Tuple(i32), Struct{ s: i32 }, } fn foo(en: MyEnum) { match en { MyEnum::Tuple => "", //~^ ERROR expected unit struct/variant or constant, found tuple variant `MyEnum::Tuple` MyEnum::Struct => "", //~^ ERROR expected unit struct/variant or constant, found struct variant `MyEnum::Struct` }; } fn main() {} </ins>

<ins> error[E0532]: expected unit struct/variant or constant, found tuple variant `MyEnum::Tuple` --> $DIR/issue-63983.rs:8:9 | LL |         MyEnum::Tuple => "", |         ^^^^^^^^^^^^^ did you mean `MyEnum::Tuple ( /* fields */ )`? error[E0532]: expected unit struct/variant or constant, found struct variant `MyEnum::Struct` --> $DIR/issue-63983.rs:10:9 | LL |         MyEnum::Struct => "", |         ^^^^^^^^^^^^^^ did you mean `MyEnum::Struct { /* fields */ }`? error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0532`. </ins>
Change:
Follow-up to , , , and . Same symptoms as . Additionally, I'm seeing styles from both and active, and the ones in are taking precedence over the ones in even though the system is in dark mode. Tested on deleting the local storage entry, and docs generated locally.
cc

Discussion:
function getSystemValue() { var property = getComputedStyle(document.documentElement).getPropertyValue('content'); <del> return property.replace(/"'/g, ""); </del> <ins> return property.replace(/["']/g, ""); </ins> } switchTheme(currentTheme, mainTheme,
Change:
The test has the following failing assertion: Note the , so this is for an LLDB that is not rust-enabled. Here's what I see in the failing test stdout: <details<summaryFull dump</summary</detailsSo, it seems like LLDB 8 - even without built-in Rust support - does a better job than older versions when printing that local. It only fails to resolve the local var name . It could be that we think there's something off about my local lldb. If not, and lldb 8+ is just doing a better job by default, we may need to refine the conditional assertions in the debuginfo tests, since they depend on debugger version. Platform: x86-64 Linux Distro: Void Linux lldb: 8.0.0 My lldb version string: Note the absence of the string , which is what we look for in to set .
cc I wonder if this is the no-assertions equivalent to
Maybe this could be fixed by making the check a bit more lenient. can be used as a wildcard in the check patterns. would you mind giving this a try locally by changing the check to: That version should work for both old and new versions of LLDB.
Using code from comment above does fix the error for LLDB 8.0.1.
I'd be happy to r+ a PR providing that fix.

Discussion:
// lldbg-check:[...]$0 = vec![1, 2, 3] // lldbr-check:(alloc::vec::Vec<i32>) v = vec![1, 2, 3] // lldb-command:print zs <del> // lldbg-check:[...]$1 = StructWithZeroSizedField { x: ZeroSizedStruct, y: 123, z: ZeroSizedStruct, w: 456 } </del> <ins> // lldbg-check:[...]$1 = StructWithZeroSizedField { x: ZeroSizedStruct[...], y: 123, z: ZeroSizedStruct[...], w: 456 } </ins> // lldbr-check:(issue_22656::StructWithZeroSizedField) zs = StructWithZeroSizedField { x: ZeroSizedStruct { }, y: 123, z: ZeroSizedStruct { }, w: 456 } // lldbr-command:continue
Change:
Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust, I observed that the tool miri no longer builds. A follow-up PR to the repository is needed to fix the fallout. cc do you think you would have time to do the follow-up work? If so, that would be great! cc the PR reviewer, and -- nominating for prioritization.
I need to port parts of from miri to rustc and only keep the actual miri-parts in miri. I'll try to get it done by tomorrow night.
check-in from compiler triage: Go go!

Discussion:
} } <ins> impl Allocation<()> { /// Add Tag and Extra fields pub fn retag<T, E>( self, mut tagger: impl FnMut(AllocId) -> T, extra: E, ) -> Allocation<T, E> { Allocation { bytes: self.bytes, size: self.size, relocations: Relocations::from_presorted( self.relocations.iter() // The allocations in the relocations (pointers stored *inside* this allocation) // all get the base pointer tag. .map(|&(offset, ((), alloc))| { let tag = tagger(alloc); (offset, (tag, alloc)) }) .collect() ), undef_mask: self.undef_mask, align: self.align, mutability: self.mutability, extra, } } } </ins> /// Raw accessors. Provide access to otherwise private bytes. impl<Tag, Extra> Allocation<Tag, Extra> { pub fn len(&self) -> usize {

<del> Subproject commit 69268fb75fdb452296caa9bc4aaeff1674279de2 </del> <ins> Subproject commit e479ab26406ed8a473987e5f4a1f3be3e978e5d2 </ins>
Change:
Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust, I observed that the tool clippy-driver no longer builds. A follow-up PR to the repository is needed to fix the fallout. cc do you think you would have time to do the follow-up work? If so, that would be great! cc the PR reviewer, and -- nominating for prioritization.
Check-in from compiler triage team: looks like we have a pending fix in , thanks !

Discussion:
<del> Subproject commit aeadf1562c024d3c5421e61dc6b8d48c2d7902f5 </del> <ins> Subproject commit 5f28fda13efeb85097fe082af4b4827a58b0ecf6 </ins>
Change:
Apple Clang version numbering doesn't match the open source project. Typically it's a full major version ahead. This is why the configure script currently allows for and . However, this isn't particularly future-proof. The configure script should instead learn to use the "based on" version when present, because this describes what the open source version is. For example, the version string looks something like "Apple LLVM version 4.2 (clang-421.2.1) (based on LLVM 3.2svn)".
Here's a new version of the command that should produce the "based on" version when the version string contains it:
This was just handled via the pull request

Discussion:
CFG_CLANG_VERSION=$("$CFG_CLANG"  --version  | grep version  <del> | sed 's/.*(version .*)/1/'  </del> <ins> | sed 's/.*(version .*)/1/; s/.*based on (LLVM .*))/1/'  </ins> | cut -d ' ' -f 2) case $CFG_CLANG_VERSION in <del> (3.0svn | 3.0 | 3.1* | 3.2* | 3.3* | 4.0* | 4.1* | 4.2*) </del> <ins> (3.0svn | 3.0 | 3.1* | 3.2* | 3.3*) </ins> step_msg "found ok version of CLANG: $CFG_CLANG_VERSION" CFG_C_COMPILER="clang" ;;
Change:
Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust, I observed that the tool clippy-driver no longer builds. A follow-up PR to the repository is needed to fix the fallout. cc do you think you would have time to do the follow-up work? If so, that would be great! cc the PR reviewer, and -- nominating for prioritization.
I suspect the or-pattern PR, , is to blame.
Fix for Clippy repo:

Discussion:
<del> Subproject commit 5f28fda13efeb85097fe082af4b4827a58b0ecf6 </del> <ins> Subproject commit 58e01ea4d7df69e658c034afbfa6d0abd90808ed </ins>
Change:
The following pattern is common in diagnostic messages in rustc: It would be good to extract all of these pluralisation checks into a function or macro: There's already one in , but it's not used anywhere else, so we could move it to somewhere in src/librustcerrors, and replace the occurrences of this pattern with the macro. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --This issue has been assigned to via . <!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOT_END --
I'd love to be assigned to this issue!
assign
So, I have moved the macro under in a file called . I have also located all the occurrences of the pattern. I am a bit new to Rust, so I still am learning about the module system. How shall I pull the macro into the scope of all the relevant files?
I'd put it in , so we don't have one new file for a single macro. Then you can use it from .
Thanks for pointing me in the right direction
searching for and in rustc, I can see a few cases that weren't caught by , e.g. in , , etc. Let's keep this issue open until they've all been replaced with the new macro.
I have open a to refactor the pluralisations remain, please have a look at it, thanks.
Oh, my bad. thanks for helping out!

Discussion:
use std::fmt; use rustc_target::spec::abi; use syntax::ast; <ins> use syntax::errors::pluralise; </ins> use errors::{Applicability, DiagnosticBuilder}; use syntax_pos::Span;

} }; <del> macro_rules! pluralise { ($x:expr) => { if $x != 1 { "s" } else { "" } }; } </del> match *self { CyclicTy(_) => write!(f, "cyclic type of infinite size"), Mismatch => write!(f, "types differ"),

} } } <ins> #[macro_export] macro_rules! pluralise { ($x:expr) => { if $x != 1 { "s" } else { "" } }; } </ins>

use crate::require_c_abi_if_c_variadic; use smallvec::SmallVec; use syntax::ast; <ins> use syntax::errors::pluralise; </ins> use syntax::feature_gate::{GateIssue, emit_feature_err}; use syntax::util::lev_distance::find_best_match_for_name; use syntax::symbol::sym;

quantifier, bound, kind, <del> if bound != 1 { "s" } else { "" }, </del> <ins> pluralise!(bound), </ins> )) };

use errors::{Applicability, DiagnosticId}; use syntax_pos::Span; <ins> use syntax::errors::pluralise; </ins> use super::{Inherited, FnCtxt, potentially_plural_count};

declaration has {} {kind} parameter{}", trait_.ident, impl_count, <del> if impl_count != 1 { "s" } else { "" }, </del> <ins> pluralise!(impl_count), </ins> trait_count, <del> if trait_count != 1 { "s" } else { "" }, </del> <ins> pluralise!(trait_count), </ins> kind = kind, ), DiagnosticId::Error("E0049".into()),

"expected {} {} parameter{}", trait_count, kind, <del> if trait_count != 1 { "s" } else { "" }, </del> <ins> pluralise!(trait_count), </ins> )); } for span in spans {

"found {} {} parameter{}{}", impl_count, kind, <del> if impl_count != 1 { "s" } else { "" }, </del> <ins> pluralise!(impl_count), </ins> suffix.unwrap_or_else(|| String::new()), )); }
Change:
Hello, this is your friendly neighborhood mergebot. After merging PR rust-lang/rust, I observed that the tool miri has failing tests. A follow-up PR to the repository is needed to fix the fallout. cc do you think you would have time to do the follow-up work? If so, that would be great! cc the PR reviewer, and -- nominating for prioritization.

Discussion:
<del> Subproject commit e479ab26406ed8a473987e5f4a1f3be3e978e5d2 </del> <ins> Subproject commit dd94c7c5a32be2ee0adeeaf9d46f26f14925797c </ins>
Change:
The method is defined as follows. Clean-up function is defined as follows; It is possible for another thread to use while the main thread quits, and access already freed memory - assuming the following sequence of events. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --This issue has been assigned to via . <!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
cc (do we want an label?)
I suppose we could just turn into a NOP. How do other platforms handle this?
claim
Looking at other implementations, the only times when this is not a NOP is for and on non-apple variants. In all these cases the code is: I am inclined to just change it to a NOP. What was the motivation for the existing logic?
Implement the required function without knowing exactly what needs to happen. Having done some git archeology, it looks to me like the function exists solely for certain platforms where the arguments may be stored on the stack of the main thread. If the main thread exits, that stack may no longer be available so other threads may not reference it. I think turning it into a nop for SGX is probably fine.

Discussion:
} } <del> pub unsafe fn cleanup() { let args = ARGS.swap(0, Ordering::Relaxed); if args != 0 { drop(Box::<ArgsStore>::from_raw(args as _)) } } </del> <ins> pub unsafe fn cleanup() {} </ins> pub fn args() -> Args { let args = unsafe { (ARGS.load(Ordering::Relaxed) as *const ArgsStore).as_ref() };
Change:
Related WIP pull request:
I'm getting this when running reliably:
This test is also failing for me with GDB 8.3 on Arch. Same error. As of GDB 8.3, batch mode causes GDB to exit with non-zero exit status if a command failed, per We either need to execute the "failing" command (the print that accesses invalid memory) from python in gdb and ignore the exception thrown, or ignore the return code of gdb for this test.
pre-triage: not certain what priority to assign (tempted to do P-medium). Leaving nominated for dicsussion of priority at T-compiler meeting. Also, I think I'll nominate for discussion there too.
topic is too big to handle in triage meeting. Plan is now to allocate steering meeting to topic; see:
for now, tagging P-high because this is causing pain for T-release. Hopefully we'll figure something out in the aforementioned planning meeting. Removing nomination.
there's a planning meeting scheduled Oct 18th to discuss debuginfo; this will hopefully be addressed as part of that. See
self-assigning to at least look into this as part of prep work for aforementioned planning meeting.
I'm confused by . AFAIK the issue here is the test is not compatible with more recent GDB versions, could you elaborate?
I believe the impression in the planning meeting was that a rustc change broke this test -- if it is a GDB version issue we can likely work to fix the test and bump GDB version requirements.
This was definitely a change to GDB that made the test fail. It still does the expected behavior, but GDB now returns a failure return code.
adding to assignee list to deal with the test suite stuff to T-release. (See also )
Of potential interest: This bug does not reproduce for me on a build with in the ; I have to turn the setting back to its default of to reproduce the problem.

Discussion:
("(len: %i, cap: %i)" % (length, cap))) def children(self): <ins> saw_inaccessible = False </ins> (length, data_ptr, cap) = rustpp.extract_length_ptr_and_cap_from_std_vec(self.__val) gdb_ptr = data_ptr.get_wrapped_value() for index in xrange(0, length): <del> yield (str(index), (gdb_ptr + index).dereference()) </del> <ins> if saw_inaccessible: return try: # rust-lang/rust#64343: passing deref expr to `str` allows # catching exception on garbage pointer str((gdb_ptr + index).dereference()) yield (str(index), (gdb_ptr + index).dereference()) except RuntimeError: saw_inaccessible = True yield (str(index), "inaccessible") </ins> class RustStdVecDequePrinter(object):