jiebi/CodeConvo huggingface dataset:
Change:
type AssocAlias = m::Pub3; } <del> impl <Priv as PrivTr>::AssocAlias { //~ ERROR no base type found for inherent implementation </del> <ins> impl <Priv as PrivTr>::AssocAlias { //~^ ERROR no nominal type found for inherent implementation </ins> pub fn f(arg: Priv) {} // private type `aliases_pub::Priv` in public interface } }

Discussion:
] To : This should probably use the covered/local terminology from instead of "base type" to avoid the problematic overlap with subtyping/inheritance terminology.
] ] ] (Not really [C-bug], but it was the closest of the template options.)
Just fyi, you can do modify labels to -C-bug +A-diagnostics +C-enhancement +D-newcomer-roadblock which will let you apply most labels yourself. .
Error: Label D-newcomer-roadblock can only be set by Rust team members Please let know if you're having trouble with this bot.
... Oh, unless that happens.
A second attempt :stuckouttongue: modify labels to -C-bug +A-diagnostics +C-enhancement
In the reference, we use the term "nominal type". The error code explanation should also mention unions and trait objects ( is valid). If the person use or , it should also hint at removing the reference and putting them on in the associated items. Not sure if I should open a new issue for that one or not though.
Change:
<ins> // Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. #![allow(dead_code)] struct A { a: &'static (), } static B: &'static A = &A { a: &() }; static C: &'static A = &B; //~^ ERROR cannot refer to other statics by value fn main() {} </ins>

Discussion:
I have a small project that I've been learning rust with. Just now I've some code and the next time I run rustc exits with SIGSEV signal 11. I've previously not run into this issue while working on this project. Minimal Reproducible Code: I'm working on Mac (OSX 10.11.5), with rust installed through Homebrew Cargo & Rust Version: Details on homebrew install:
I played around with the code to make it actually more minimal, as well as pointing to the line which introduces the error during compilation
This seems to have been fixed on nightly ().
According to a quick git-bisect, contained the commit that fixed this.
Change:
<ins> // Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. const U8_MAX_HALF: u8 = !0u8 / 2; const U16_MAX_HALF: u16 = !0u16 / 2; const U32_MAX_HALF: u32 = !0u32 / 2; const U64_MAX_HALF: u64 = !0u64 / 2; fn main() { assert_eq!(U8_MAX_HALF, 0x7f); assert_eq!(U16_MAX_HALF, 0x7fff); assert_eq!(U32_MAX_HALF, 0x7fff_ffff); assert_eq!(U64_MAX_HALF, 0x7fff_ffff_ffff_ffff); } </ins>

Discussion:
This affects the test suites for the and crates.
triage: I-wrong, P-high (1.0)
triage: P-high (1.0)
I ended up adding the 1.0 milestone by hand; isn't the above note with supposed to do it?
cc
the log above says that highfive did add this to the 1.0 milestone - it might just have been that your local view of the webpage needed refreshing?
yeah I guess so, I don't know what happened anymore. Maybe I should have given highfive a little more time to react.
Change:
} fn main() { <del> let mut futures = Vec::from_fn(1000, |ind| Future::spawn( proc() { partial_sum(ind) })); </del> <ins> let mut futures = Vec::from_fn(200, |ind| Future::spawn( proc() { partial_sum(ind) })); </ins> let mut final_res = 0f64; for ft in futures.mut_iter()  {

Discussion:
According to std::rt::min_stack(), the minimum Rust stack size is 2MB. Given that the default stack size on Windows is 1MB, and that is generally plenty for any program I've seen, this seems a bit excessive. This, btw, contributes to doctest failure of "futures" example from guide- on Windows: this example spawns 1000 threads, and in conjunction with , this results in it running out of memory.
The Rust compiler uses a 6MiB stack and then increase than to 20MiB (!!!) when optimizations are disabled. The default stack size on Linux is 8MiB, so that's likely how much is available for the main thread. Rust tends to need a ridiculous amount of stack space, especially without optimizations.
If this is indeed the intended value, at least the test should be adjusted, because right now it's guaranteed to fail on a 32-bit Windows machine, even if the large-address-aware flag were fixed.
Change:
#!/usr/bin/env python # xfail-license <ins> import glob </ins> import sys if __name__ == '__main__':

Discussion:
On OS X at least, it will think the link itself is the executable, then calculate sysroot based on that. Thanks to kyle for the report.
nominating to change to production ready
accepted for production-ready milestone
triage bump. still annoying.
or could be used to resolve the symlink. Would this issue warrant the badge "E_easy"?
Seems so! Adding the E-easy label.
Note that the relevant code is and it probably needs a check to see whether is a symlink or not.
seems important to fix for polish reasons. Accepted for P-high.
Change:
<ins> // check-pass #![feature(type_alias_impl_trait)] trait Callable { type Output; fn call() -> Self::Output; } impl<'a> Callable for &'a () { type Output = impl Sized; fn call() -> Self::Output {} } fn test<'a>() -> impl Sized { <&'a () as Callable>::call() } fn want_static<T: 'static>(_: T) {} fn test2<'a>() { want_static(<&'a () as Callable>::call()); } fn main() {} </ins>

Discussion:
This code should pass but it doesn't: This is resurrected. Cc label F-typealiasimpl_trait C-bug T-compiler T-types
Oh heh, I fixed the situation for registering the hidden type but didn't allow implying anything from that.
Change:
use std::path::PathBuf; use std::{env, fs}; <ins> use build_helper::git::warn_old_master_branch; </ins> #[cfg(not(feature = "bootstrap-self-test"))] use crate::builder::Builder; use crate::builder::Kind;

Discussion:
I have my master branch set up to track the master branch of my fork (mainly because i don't want to accidentally pull in every git tag into my shallow clone), so doesn't updated when i run (presumably the remote was created by ? i don't remember creating it, and lots of code needs it (or another branch pointing to this repo) to work). as it turns out, uses the state of to determine if a file has been modified. so instead of it formatting every file that i modified, it formats every file anyone has modified in the last few months. at no point did anything warn me that i need to be updating a remote i didn't add. it should probably do that. <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
this could be addressed by checking the timestamp on .git/refs/remotes/upstream/master and warning if it is very old
claim
I ran into a similar issue where was building llvm from source instead of using the prebuilt ci version due to an outdated branch. Would it make sense to solve both issues in one go?
should be pretty easy, just call the same warning method for both build steps maybe it should be used for all build steps?
Change:
<ins> error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:8:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:13:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:16:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:21:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:24:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:27:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:30:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:33:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: expected one of `(`, `,`, `::`, or `=`, found `-` --> $DIR/statement-attribute-validation.rs:36:16 | LL |     #[allow(two-words)] |                ^ expected one of `(`, `,`, `::`, or `=` error: aborting due to 9 previous errors </ins>

Discussion:
https://crater-
searched nightlies: from nightly-2023-08-01 to nightly-2023-10-10 regressed nightly: nightly-2023-09-15 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.6</summaryHost triple: x86_64-unknown-linux-gnu Reproduce with: </detailsthis bisection may look pretty nonsensical, but I did manually confirm that nightly-2023-09-14 worked and nightly-2023-09-16 didn't. I am surprised that this ever parsed, and given that there's only a single random repo that regressed, and the regressing code is a mistake, I don't think this is a problematic regression. anyways.
Agreed that we don't necessarily need a fix, but we should try to make sure that this is indeed limited to this one case (i.e., it's not some broader incompatibility that may have gone uncaught in Crater)
The change here is that AST validation is now checking that the attribute is valid. Some other cases: Marking as needs-test, with the new behavior being correct
Change:
pub use run::{cmd, run, run_fail, run_with_args}; /// Helpers for checking target information. <del> pub use targets::{is_darwin, is_msvc, is_windows, llvm_components_contain, target, uname}; </del> <ins> pub use targets::{is_darwin, is_msvc, is_windows, llvm_components_contain, target, uname, apple_os}; </ins> /// Helpers for building names of output artifacts that are potentially target-specific. pub use artifact_names::{

Discussion:
Repro: The same happens for 1.23-stable.
does this still reproduce?
no repro for .
Change:
<ins> // Regression test for issue 115264 // Tests that retrieving the ident of the X::foo field // in main() does not cause an ICE // check-pass #[allow(dead_code)] struct X { foo: i32, } fn main() { let _ = X { #[doc(alias = "StructItem")] foo: 123, }; } </ins>

Discussion:
<!-- 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 --
Regression in nightly-2022-08-16 commit[0] 2022-08-14: Auto merge of - GuillaumeGomez:merge-html-elements-together, r=notriddle commit[1] 2022-08-14: Auto merge of - matthiaskrgr:rollup-734hkpt, r=matthiaskrgr commit[2] 2022-08-15: Auto merge of - compiler-errors:as-a-treat, r=jackh726 commit[3] 2022-08-15: Auto merge of - austinabell:skip_optimization, r=Mark-Simulacrum commit[4] 2022-08-15: Auto merge of - ehuss:even-more-attribute-validation, r=cjgillot commit[5] 2022-08-15: Auto merge of - michaelwoerister:new-cpp-like-enum-debuginfo, r=wesleywiser commit[6] 2022-08-15: Auto merge of - matthiaskrgr:rollup-9450lzs, r=matthiaskrgr commit[7] 2022-08-15: Auto merge of - matthiaskrgr:rollup-f1zur58, r=matthiaskrgr
WG-prioritization assigning priority (). label -I-prioritize +P-medium
claim
Originates in PR . We are returning for although it does have an ident: The fix would be to start returning the ident. suffers from the same problem and may need the same treatment.
Change:
<ins> error[E0405]: cannot find trait `Error` in this scope --> $DIR/issue-102946.rs:1:6 | LL | impl Error for str::Utf8Error { |      ^^^^^ not found in this scope | help: consider importing this trait | LL | use std::error::Error; | error[E0223]: ambiguous associated type --> $DIR/issue-102946.rs:1:16 | LL | impl Error for str::Utf8Error { |                ^^^^^^^^^^^^^^ | help: you are looking for the module in `std`, not the primitive type | LL | impl Error for std::str::Utf8Error { |                +++++ error: aborting due to 2 previous errors Some errors have detailed explanations: E0223, E0405. For more information about an error, try `rustc --explain E0223`. </ins>

Discussion:
<!-- 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
I think this is related to
Change:
// Mangle all nominal types as paths. ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)), substs) | ty::FnDef(def_id, substs) <del> | ty::Alias(_, ty::AliasTy { def_id, substs, .. }) </del> <ins> | ty::Alias(ty::Projection | ty::Opaque, ty::AliasTy { def_id, substs, .. }) </ins> | ty::Closure(def_id, substs) | ty::Generator(def_id, substs, _) => { self = self.print_def_path(def_id, substs)?;

Discussion:
<!-- 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 --
regression in cc
claim
another one `

<!-- 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 --
Regression in cc
Thanks :) claim
Change:
) .emit() // Already reported in an earlier stage. } else { <ins> self.maybe_report_similar_assoc_fn(span, qself_ty, qself)?; </ins> let traits: Vec<_> = self.probe_traits_that_match_assoc_ty(qself_ty, assoc_ident);

Discussion:
` " ); } This had me VERY confused as I was certain I would try to get a String here, where does Example come from?? And associated types wut?? The problem is I used which should have been :D Maybe rustc could improve its suggestion somehow in that case? No response No response <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOT_END --
For reference, here is a MRE:
claim
Change:
[submodule "src/llvm"] path = src/llvm <del> url = https://github.com/alexcrichton/llvm.git </del> <ins> url = https://github.com/luqmana/llvm.git </ins> branch = master [submodule "src/libuv"] path = src/libuv

Discussion:
Introduced by . This is because we now use to build but it defaults to soft float for all arm which is wrong for gnueabihf/eabihf. This is fixed in upstream llvm to choose the right float abi based on the target. This will no longer be an issue once we update llvm.
Change:
pub(crate) fn recv(&self, deadline: Option<Instant>) -> Result<T, RecvTimeoutError> { let token = &mut Token::default(); loop { <ins> // Try receiving a message. </ins> if self.start_recv(token) { let res = unsafe { self.read(token) }; return res.map_err(|_| RecvTimeoutError::Disconnected);

Discussion:
Originally posted by in <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --This issue has been assigned to via . <!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
claim
Done in I believe
assign
Change:
Ok(utf8) => utf8.into_bytes(), Err(..) => return Err(invalid_encoding()), }; <del> if let Output::Console(_) = self.handle { if let Some(&last_byte) = data.last() { if last_byte == CTRL_Z { data.pop(); } </del> <ins> if let Some(&last_byte) = data.last() { if last_byte == CTRL_Z { data.pop(); </ins> } } *utf8 = Cursor::new(data);

Discussion:
Over time the value of may change (e.g. see ) and we should likely reload the value over time instead of caching the return value to catch cases like this.
There's very little value in caching the result. takes 3 nanoseconds for me according to a quick bench.
Change:
// If the resolution doesn't depend on glob definability, check privacy and return. if let Some(result) = self.try_result(&resolution, ns) { return result.and_then(|binding| { <del> if self.is_accessible(binding.vis) && !is_disallowed_private_import(binding) { </del> <ins> if self.is_accessible(binding.vis) && !is_disallowed_private_import(binding) || binding.is_extern_crate() { // c.f. issue #37020 </ins> Success(binding) } else { Failed(None)

Discussion:
A shows regressions related to () () I'm opening an issue to ensure that we're tracking these regressions and they're either expected (so we can close), this is a dupe (so we can close), or we can fix (and then close!) cc
Also fixed by .

A shows regressions related to () () I'm opening an issue to ensure that we're tracking these regressions and they're either expected (so we can close), this is a dupe (so we can close), or we can fix (and then close!) cc
Fixed in .

I get an ICE on an older project, when running cargo doc - when documenting glium v0.13.5 specifically - with the current nightly build. The issue seems to be the line in of that glium version The glium crate is linked in the backend::glutin_backend module. The compiler warns about PR , but at the moment it compiles fine, only generating docs doesn't work. A minimal example, that generates the same behaviour, when documenting, is: : Backtrace for minimal example:
Introduced between and ()
cc looks like this points to , any ideas here?
Hmm, that's odd -- I'll investigate.
Fixed in .
Change:
self.expr_count += 1; if let PatKind::Binding(..) = pat.kind { <del> let scope = self.region_scope_tree.var_scope(pat.hir_id.local_id); </del> <ins> let scope = self.region_scope_tree.var_scope(pat.hir_id.local_id).unwrap(); </ins> let ty = self.fcx.typeck_results.borrow().pat_ty(pat); self.record(ty, pat.hir_id, Some(scope), None, pat.span, false); }

Discussion:
<!-- 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 --
I was just looking at the parsing code for const generic exprs.. claim
actually, so this isn't related to incorrectly parsing , since we're parsing in expr position to allow if-let chains.. -- this is due to const eval lowering to MIR and the fact that const generic parameters have no enclosing scope. Adding around the generic args works, but I don't know where exactly to hack in a scope for these params. release-assignment label A-const-eval A-mir
Maybe fixing this also fixes :slightlysmilingface:
This gives an error without ICE in 1.55
It was unclear to me - I think meant that changing to gives a compile error instead of an ICE. So the proper fix here is probably to add somewhere instead of panicking.
Then this should be easy. claim
Change:
|| self.look_ahead(2, |t| *t == token::OpenDelim(token::Brace))) { // MACRO INVOCATION ITEM <ins> let last_span = self.last_span; self.complain_if_pub_macro(visibility, last_span); </ins> // item macro. let pth = self.parse_path(NoTypesAllowed); self.expect(&token::Not);

Discussion:
Hey, I have an issue on my macros use. The source code of my macro is . I can't put the pub keyword and if I call my macro like this : The methods aren't public. Am I doing something wrong or is it a compiler's bug ? Thanks in advance.
Any news on it ?
Related?
I think.
I just encountered this. I can reproduce it with:
Now let's just hope it'll be fixed sooner or later !
Hm, what should actually mean? A macro in item position can expand to zero or more items. Should the qualifier apply to all of them, or should it be an error to use it with a multi-item macro? We might want to forbid in this position for 1.0, and come back to the issue later. I had a design for that I think would be rather nice. The current workaround is to write The precise syntax is up to the macro author and can accommodate multiple items. This workaround would be less annoying if we had a "0 or 1" repeat operator in macros.
Could you be a little more explicit about the workaround - I can't seem to get it to work.
from the compiler itself. looks better, with less duplicated code.
Thanks for the examples. If I understand them correctly (neither of which generate forms, iiuc), I should be matching on and inserting a literal in the expansion, but does not seem to work :
It works for me on rustc 1.0.0-dev ( 2015-02-16). The playpen is just to have my fix for .
Thanks for the confirmation. I'll be looking forward to a new nightly for once :)