jiebi/CodeConvo huggingface dataset:
Change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --I tried this code with : I expected to see this happen: It compiles, as it does under the MIR checker 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. --: </p</details<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Reduced (either of the following two functions reproduces the issue): This is caused by the fact that closures are handled by their owner: claim

Discussion:
// Closures are handled by their owner, if it has a body if tcx.is_closure(def.did.to_def_id()) { <del> let owner = tcx.hir().local_def_id_to_hir_id(def.did).owner; let owner_hir_id = tcx.hir().local_def_id_to_hir_id(owner); if tcx.hir().maybe_body_owned_by(owner_hir_id).is_some() { tcx.ensure().thir_check_unsafety(owner); return; } </del> <ins> let hir = tcx.hir(); let owner = hir.enclosing_body_owner(hir.local_def_id_to_hir_id(def.did)); tcx.ensure().thir_check_unsafety(hir.local_def_id(owner)); return; </ins> } let (thir, expr) = tcx.thir_body(def);

<ins> // Regression test for #87414. // check-pass // compile-flags: -Zthir-unsafeck fn bad<T>() -> Box<dyn Iterator<Item = [(); { |x: u32| { x }; 4 }]>> { todo!() } fn foo() -> [(); { |x: u32| { x }; 4 }] { todo!() } fn bar() { let _: [(); { |x: u32| { x }; 4 }]; } // This one should not cause any errors either: unsafe fn unsf() {} fn bad2<T>() -> Box<dyn Iterator<Item = [(); { unsafe { || { unsf() } }; 4 }]>> { todo!() } fn main() {} </ins>
Change:
Trying to build  0.2.5 with latest nightly results in an ICE. Bisected the regression to , cc I have tried to minimize it. This still requires 0.3, I'm not sure how to minimize if further. <!-- 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
Seems like a duplicate of
I don't think that is related, neither the error matches nor is it a recent regression. Did you link the wrong issue? fixes this ICE
Assigning priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-high
Still needs a backport
(assigning self to ensure backport happens.)
Also seen in the latest (): zebra-consensus: https://crater- warp v0.3.1: https://crater- linkerd: https://crater- Along with a number of others.
Backport () was merged.

Discussion:
.and_then(|ur_vid| self.definitions[*ur_vid].external_name) .unwrap_or(infcx.tcx.lifetimes.re_root_empty), ty::ReLateBound(..) => region, <ins> ty::ReStatic => region, </ins> _ => { infcx.tcx.sess.delay_span_bug( span,

<ins> // check-pass use std::error::Error as StdError; use std::pin::Pin; use std::task::{Context, Poll}; pub trait Stream { type Item; fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>; fn size_hint(&self) -> (usize, Option<usize>) { (0, None) } } pub trait TryStream: Stream { type Ok; type Error; fn try_poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Self::Ok, Self::Error>>>; } impl<S, T, E> TryStream for S where S: ?Sized + Stream<Item = Result<T, E>>, { type Ok = T; type Error = E; fn try_poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Self::Ok, Self::Error>>> { self.poll_next(cx) } } pub trait ServerSentEvent: Sized + Send + Sync + 'static {} impl<T: Send + Sync + 'static> ServerSentEvent for T {} struct SseKeepAlive<S> { event_stream: S, } struct SseComment<T>(T); impl<S> Stream for SseKeepAlive<S> where S: TryStream + Send + 'static, S::Ok: ServerSentEvent, S::Error: StdError + Send + Sync + 'static, { type Item = Result<SseComment<&'static str>, ()>; fn poll_next(self: Pin<&mut Self>, _cx: &mut Context) -> Poll<Option<Self::Item>> { unimplemented!() } } pub fn keep<S>( event_stream: S, ) -> impl TryStream<Ok = impl ServerSentEvent + Send + 'static, Error = ()> + Send + 'static where S: TryStream + Send + 'static, S::Ok: ServerSentEvent + Send, S::Error: StdError + Send + Sync + 'static, { SseKeepAlive { event_stream } } fn main() {} </ins>
Change:
The FFI tutorial should reflect the fact that: is guaranteed to be a pointer with None represented as NULL. is the recommended way to represent a nullable fn pointer.
Nominating for milestone.
Accepted for well-defined
part of
Nominating to remove from milestone.
We can ship 1.0 without this, though it would be good to have this. Leaving as P-high, but removing from 1.0 milestone.
Taking this.

Discussion:
The standard library includes type aliases and function definitions for the C standard library in the `libc` module, and Rust links against `libc` and `libm` by default. <ins> # The "nullable pointer optimization" Certain types are defined to not be `null`. This includes references (`&T`, `&mut T`), owning pointers (`~T`), and function pointers (`extern "abi" fn()`). When interfacing with C, pointers that might be null are often used. As a special case, a generic `enum` that contains exactly two variants, one of which contains no data and the other containing a single field, is eligible for the "nullable pointer optimization". When such an enum is instantiated with one of the non-nullable types, it is represented as a single pointer, and the non-data variant is represented as the null pointer. So `Option<extern "C" fn(c_int) -> c_int>` is how one represents a nullable function pointer using the C ABI. </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
can be replaced by any function item, e.g. or . Lifetime of must be bounded to a parameter, therefore does not work Regression in not sure which PR exactly though but I think modify labels: regression-from-stable-to-nightly
Assigning priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-low
can actually also be replaced with or seemingly any type other than the return type in the function signature, but strangely leaving the function body empty does not trigger the ICE.
No longer ICEs since

Discussion:
<ins> fn main() {} trait StreamOnce { type Position; } impl StreamOnce for &str { type Position = usize; } fn follow(_: &str) -> <&str as StreamOnce>::Position { String::new  //~ ERROR mismatched types } </ins>

<ins> error[E0308]: mismatched types --> $DIR/issue-87490.rs:9:5 | LL | fn follow(_: &str) -> <&str as StreamOnce>::Position { |                       ------------------------------ expected `usize` because of return type LL |     String::new |     ^^^^^^^^^^^ expected `usize`, found fn item | = note: expected type `usize` found fn item `fn() -> String {String::new}` error: aborting due to previous error For more information about this error, try `rustc --explain E0308`. </ins>
Change:
<!-- Thank you for filing a bug report! Please provide a short summary of the bug, along with any information you feel relevant to replicating the bug. --I tried this code: Playground: I expected to see this happen: The error message should indicate that the should be a single . Instead, this happened: The error message gives no hint of the correct syntax. It gives two errors, neither of which are helpful: This error is unhelpful because it says "expected one of or ", but is also allowed. Also, the suggestion to use curly braces is a red herring. This error is unhelpful because I am not specifying const arguments; I'm specifying associated types. Rust version according to 1.53.0
cc

Discussion:
} match self.parse_expr_res(Restrictions::CONST_EXPR, None) { Ok(expr) => { <del> if token::Comma == self.token.kind || self.token.kind.should_end_const_arg() { </del> <ins> // Find a mistake like `MyTrait<Assoc == S::Assoc>`. if token::EqEq == snapshot.token.kind { err.span_suggestion( snapshot.token.span, "if you meant to use an associated type binding, replace `==` with `=`", "=".to_string(), Applicability::MaybeIncorrect, ); let value = self.mk_expr_err(start.to(expr.span)); err.emit(); return Ok(GenericArg::Const(AnonConst { id: ast::DUMMY_NODE_ID, value })); } else if token::Comma == self.token.kind || self.token.kind.should_end_const_arg() { </ins> // Avoid the following output by checking that we consumed a full const arg: // help: expressions must be enclosed in braces to be used as const generic //       arguments

<ins> pub trait MyTrait { type Assoc; } pub fn foo<S, T>(_s: S, _t: T) where S: MyTrait, T: MyTrait<Assoc == S::Assoc>, //~^ ERROR: expected one of `,` or `>`, found `==` //~| ERROR: this trait takes 0 generic arguments but 1 generic argument was supplied { } fn main() {} </ins>

<ins> error: expected one of `,` or `>`, found `==` --> $DIR/issue-87493.rs:8:22 | LL |     T: MyTrait<Assoc == S::Assoc>, |                      ^^ expected one of `,` or `>` | help: if you meant to use an associated type binding, replace `==` with `=` | LL |     T: MyTrait<Assoc = S::Assoc>, |                      ~ error[E0107]: this trait takes 0 generic arguments but 1 generic argument was supplied --> $DIR/issue-87493.rs:8:8 | LL |     T: MyTrait<Assoc == S::Assoc>, |        ^^^^^^^------------------- help: remove these generics |        | |        expected 0 generic arguments | note: trait defined here, with 0 generic parameters --> $DIR/issue-87493.rs:1:11 | LL | pub trait MyTrait { |           ^^^^^^^ error: aborting due to 2 previous errors For more information about this error, try `rustc --explain E0107`. </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
modify labels: regression-from-stable-to-nightly Regressed in cc
Hmm, I don't think this is actually a regression. The MCVE triggers an error on stable and beta: and it seems like the requirements for were relaxed by such that this code should compile successfully on nightly.
Sorry, I forgot to re-check this issue before opening my PR. You can have a look at to avoid duplicate work, if it's not too late already...
Assigning priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-low

Discussion:
use FfiResult::*; if def.repr.transparent() { <del> // Can assume that only one field is not a ZST, so only check </del> <ins> // Can assume that at most one field is not a ZST, so only check </ins> // that field's type for FFI-safety. if let Some(field) = transparent_newtype_field(self.cx.tcx, variant) { self.check_field_type_for_ffi(cache, field, substs) } else { <del> bug!("malformed transparent type"); </del> <ins> // All fields are ZSTs; this means that the type should behave // like (), which is FFI-unsafe FfiUnsafe { ty, reason: "this struct contains only zero-sized fields".into(), help: None, } </ins> } } else { // We can't completely trust repr(C) markings; make sure the fields are

<ins> // Regression test for the ICE described in #87496. // check-pass #[repr(transparent)] struct TransparentCustomZst(()); extern "C" { fn good17(p: TransparentCustomZst); //~^ WARNING: `extern` block uses type `TransparentCustomZst`, which is not FFI-safe } fn main() {} </ins>

<ins> warning: `extern` block uses type `TransparentCustomZst`, which is not FFI-safe --> $DIR/repr-transparent-issue-87496.rs:8:18 | LL |     fn good17(p: TransparentCustomZst); |                  ^^^^^^^^^^^^^^^^^^^^ not FFI-safe | = note: `#[warn(improper_ctypes)]` on by default = note: this struct contains only zero-sized fields note: the type is defined here --> $DIR/repr-transparent-issue-87496.rs:6:1 | LL | struct TransparentCustomZst(()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ warning: 1 warning emitted </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
So, will fix this ICE. But the coherence code should probably not be passing escaping bound vars to begin with. As for prioritization, this is an ICE that occurs only after an error that, if fixed, will solve the ICE. I say low or medium.
Assigning priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-low
didn't fix this ICE; it's actually different than others and utterly broken (as expected)
No longer ICEs since

Discussion:
<ins> struct ErrorKind; struct Error(ErrorKind); impl Fn(&isize) for Error { //~^ ERROR manual implementations of `Fn` are experimental //~| ERROR associated type bindings are not allowed here fn from() {} //~ ERROR method `from` is not a member of trait `Fn` } fn main() {} </ins>

<ins> error[E0407]: method `from` is not a member of trait `Fn` --> $DIR/issue-87558.rs:6:5 | LL |     fn from() {} |     ^^^^^^^^^^^^ not a member of trait `Fn` error[E0183]: manual implementations of `Fn` are experimental --> $DIR/issue-87558.rs:3:6 | LL | impl Fn(&isize) for Error { |      ^^^^^^^^^^ manual implementations of `Fn` are experimental | = help: add `#![feature(unboxed_closures)]` to the crate attributes to enable error[E0229]: associated type bindings are not allowed here --> $DIR/issue-87558.rs:3:6 | LL | impl Fn(&isize) for Error { |      ^^^^^^^^^^ associated type not allowed here error: aborting due to 3 previous errors Some errors have detailed explanations: E0183, E0229, E0407. For more information about an error, try `rustc --explain E0183`. </ins>
Change:
This is a regression from 1.53.0 to 1.54.0 (released today). It's likely that the display of other parts of the docs has regressed in a similar way as well (e.g., fields), but I haven't checked those. More broadly, the way the variant looks when hovered has changed as well. I am unsure if that part of the change was intentional; to me it seems like a regression. ! !
Assigning priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-medium
Fixing it.
It's actually already fixed in and . Should we close it then?
It doesn't look fixed to me in the links you posted. When I hover over the variant, the section icon still covers the word , and the styling of the highlight is still different from 1.53.0. EDIT: Ah, I realize what caused the confusion: you actually have to click on , and then hover to see the problem. Or, you have to add the anchor to the URL before visiting the page.
That's interesting: ! I love when dark magic is involved haha. Well, I'm gonna try to see how to reproduce it.
The bug is present in all themes, but it looks a bit different in Ayu: ! As you can see, it looks like the section icon's background is overlapping with the text .
Ayu seems to have also had a highlighting regression from stable to beta, perhaps separate from the one described in this issue? ! !
For for the background, it's definitely on purpose.

Discussion:
.anchor { display: none; position: absolute; <del> left: -7px; </del> <ins> left: 0; background: none !important; </ins> } .anchor.field { left: -5px; } .small-section-header > .anchor { <del> left: -28px; padding-right: 10px; /* avoid gap that causes hover to disappear */ </del> <ins> left: -15px; padding-right: 8px; </ins> } <del> .anchor:before { content: '200200a72002'; </del> <ins> h2.small-section-header > .anchor { padding-right: 6px; } .anchor::before { content: '§'; </ins> } .docblock a:not(.srclink):not(.test-arrow):hover,
Change:
We could do better here.
This looks like it can be closed.
Perhaps this issue should be closed, as it now gives a much more useful error:

Discussion:
use std::vec; use syntax::abi::AbiSet; <del> use syntax::{ast, ast_util}; </del> <ins> use syntax::{ast, ast_map, ast_util}; </ins> use syntax::codemap::Span; use syntax::opt_vec::OptVec; use syntax::opt_vec; <ins> use syntax::parse::token; </ins> use syntax::print::pprust::{lifetime_to_str, path_to_str}; pub trait AstConv {

let did = ast_util::local_def(id); ty::mk_self(tcx, did) } <ins> ast::DefMod(id) => { tcx.sess.span_fatal(ast_ty.span, format!("found module name used as a type: {}", ast_map::node_id_to_str(tcx.items, id.node, token::get_ident_interner()))); } </ins> _ => { tcx.sess.span_fatal(ast_ty.span, format!("found value name used as a type: {:?}", a_def));

<ins> // Copyright 2013 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. mod a { } trait A { } impl A for a { //~ERROR found module name used as a type } fn main() { } </ins>

<del> // Copyright 2012 The Rust Project Developers. See the COPYRIGHT </del> <ins> // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT </ins> // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //

// option. This file may not be copied, modified, or distributed // except according to those terms. <del> // error-pattern: found value name used as a type impl<T> Option<T> { </del> <ins> // FIXME(#8767) bad error message; Option is not a module impl<T> Option<T> { //~ERROR found module name used as a type </ins> pub fn foo(&self) { } }
Change:
Playground with repro . Not present in latest stable or beta. <!-- 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
Regressed since , I think is the cause.
right, this issue can be probably be closed as duplicate of
I would suggest not closing this issue as long as literally starts with the statement referencing back to this issue. Furthermore, this issue is older, so if they’d be duplicates, would be closed.

Discussion:
// the AST for typechecking. err.span_label(ident.span, "while parsing this `fn`"); err.emit(); <del> (Vec::new(), None) </del> } else { return Err(err); } <del> } else { unreachable!() </del> } <ins> (Vec::new(), None) </ins> }; attrs.extend(inner_attrs); Ok(body)

<ins> struct Foo {} impl Foo { pub fn bar() //~^ ERROR: expected `;`, found `}` //~| ERROR: associated function in `impl` without body } fn main() {} </ins>

<ins> error: expected `;`, found `}` --> $DIR/issue-87635.rs:4:17 | LL |     pub fn bar() |                 ^ help: add `;` here ... LL | } | - unexpected token error: associated function in `impl` without body --> $DIR/issue-87635.rs:4:5 | LL |     pub fn bar() |     ^^^^^^^^^^^- |                | |                help: provide a definition for the function: `{ <body> }` error: aborting due to 2 previous errors </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. --Haven't minimized the code yet, but the exact code is up here: It's a kind of search algorithm. I think the problematic code is the function in . Will report back if I figure out anything more. <!-- 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</detailsI just switched to the stable toolchain, and the compilar gave me two errors: Apparently these were not caught by the nightly compiler.
This is probably a duplicate of You're using the nightly compiler though, so working as intended
Assigning priority as discussed in the of the Prioritization Working Group. label -I-prioritize +P-medium

Discussion:
use rustc_errors::{Applicability, DiagnosticBuilder}; <ins> use rustc_infer::infer::TyCtxtInferExt; </ins> use rustc_middle::mir::*; use rustc_middle::ty; use rustc_span::source_map::DesugaringKind;

); } else if matches!(span.desugaring_kind(), Some(DesugaringKind::ForLoop(_))) { let suggest = match self.infcx.tcx.get_diagnostic_item(sym::IntoIterator) { <del> Some(def_id) => type_known_to_meet_bound_modulo_regions( &self.infcx, self.param_env, self.infcx.tcx.mk_imm_ref(self.infcx.tcx.lifetimes.re_erased, ty), def_id, DUMMY_SP, ), </del> <ins> Some(def_id) => self.infcx.tcx.infer_ctxt().enter(|infcx| { type_known_to_meet_bound_modulo_regions( &infcx, self.param_env, infcx .tcx .mk_imm_ref(infcx.tcx.lifetimes.re_erased, infcx.tcx.erase_regions(ty)), def_id, DUMMY_SP, ) }), </ins> _ => false, }; if suggest {

} } <ins> const LOADERS: &Vec<&'static u8> = &Vec::new(); pub fn break_code() -> Option<&'static u8> { for loader in &*LOADERS { //~ ERROR cannot move out of a shared reference return Some(loader); } None } </ins> fn main() {}

} } <ins> const LOADERS: &Vec<&'static u8> = &Vec::new(); pub fn break_code() -> Option<&'static u8> { for loader in *LOADERS { //~ ERROR cannot move out of a shared reference return Some(loader); } None } </ins> fn main() {}

LL |         for _ in &self.h { |                  + <del> error: aborting due to 2 previous errors </del> <ins> error[E0507]: cannot move out of a shared reference --> $DIR/for-i-in-vec.rs:21:19 | LL |     for loader in *LOADERS { |                   ^^^^^^^^ move occurs because value has type `Vec<&u8>`, which does not implement the `Copy` trait | help: consider iterating over a slice of the `Vec<&u8>`'s content | LL |     for loader in &*LOADERS { |                   + error: aborting due to 3 previous errors </ins> For more information about this error, try `rustc --explain E0507`.
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!
I think this is what's necessary to fix the issue, but I'll test more tomorrow when a nightly with is released
There are more failures in tests (which are not run when tests fail): and fail with . Revision of fails with -- unwinding past a function seems to abort instead of triggering UB now. does not trigger the error anymore. Adding fixes it. All tests fail with this error: Which seems to be an ABI mismatch between and : Opened to fix that.
Ah ok in that case I think I unfortunately don't think I have time to personally look more into this.
The fix is ready at , but bors is broken so we can't land it.

Discussion:
<del> Subproject commit 99ec9c1707aad74b4a4a6d301f27fb1c19733f58 </del> <ins> Subproject commit 042cbf175bfdad6524fd00d7570b2297a0426063 </ins>