jiebi/CodeConvo huggingface dataset:
Code 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. --(Originally found ) I tried this code: I expected to see this happen: lifetime error, is not Instead, this happened: compiles <!-- 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. --Regression in nightly-2022-08-10 found 7 bors merge commits in the specified range commit[0] 2022-08-08: Auto merge of - compiler-errors:projection-msg, r=estebank commit[1] 2022-08-09: Auto merge of - cjgillot:noice-doc, r=camelid commit[2] 2022-08-09: Auto merge of - matthiaskrgr:rollup-gs56vlw, r=matthiaskrgr commit[3] 2022-08-09: Auto merge of - JakobDegen:no-invalidate-visitor, r=tmiasko commit[4] 2022-08-09: Auto merge of - Dylan-DPC:rollup-18tzp6q, r=Dylan-DPC commit[5] 2022-08-09: Auto merge of - lcnr:implied-bounds-pre-norm, r=lcnr commit[6] 2022-08-09: Auto merge of - notriddle:notriddle/implementors-js, r=GuillaumeGomez label T-types T-compiler regression-from-stable-to-stable I-unsound A-lifetimes
Hmm… maybe this is just a duplicate of ?
I went ahead and implemented the "hacky" fix in
Looks like an NLL regression. The following invalid example compiles in v1.63.0, where NLL is enabled by default:
WG-prioritization assigning priority (). label -I-prioritize +P-high

Related discussion:
text: <ins> // <https://github.com/rust-lang/rust/issues/114936> fn whoops( s: String, f: impl for<'s> FnOnce(&'s str) -> (&'static str, [&'static &'s (); 0]), ) -> &'static str { f(&s).0 //~^ ERROR `s` does not live long enough } // <https://github.com/rust-lang/rust/issues/118876> fn extend<T>(input: &T) -> &'static T { struct Bounded<'a, 'b: 'static, T>(&'a T, [&'b (); 0]); let n: Box<dyn FnOnce(&T) -> Bounded<'static, '_, T>> = Box::new(|x| Bounded(x, [])); n(input).0 //~^ ERROR borrowed data escapes outside of function } // <https://github.com/rust-lang/rust/issues/118876> fn extend_mut<'a, T>(input: &'a mut T) -> &'static mut T { struct Bounded<'a, 'b: 'static, T>(&'a mut T, [&'b (); 0]); let mut n: Box<dyn FnMut(&mut T) -> Bounded<'static, '_, T>> = Box::new(|x| Bounded(x, [])); n(input).0 //~^ ERROR borrowed data escapes outside of function } fn main() {} </ins>
Code 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. --(Originally found ) I tried this code: I expected to see this happen: lifetime error, is not Instead, this happened: compiles <!-- 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. --Regression in nightly-2022-08-10 found 7 bors merge commits in the specified range commit[0] 2022-08-08: Auto merge of - compiler-errors:projection-msg, r=estebank commit[1] 2022-08-09: Auto merge of - cjgillot:noice-doc, r=camelid commit[2] 2022-08-09: Auto merge of - matthiaskrgr:rollup-gs56vlw, r=matthiaskrgr commit[3] 2022-08-09: Auto merge of - JakobDegen:no-invalidate-visitor, r=tmiasko commit[4] 2022-08-09: Auto merge of - Dylan-DPC:rollup-18tzp6q, r=Dylan-DPC commit[5] 2022-08-09: Auto merge of - lcnr:implied-bounds-pre-norm, r=lcnr commit[6] 2022-08-09: Auto merge of - notriddle:notriddle/implementors-js, r=GuillaumeGomez label T-types T-compiler regression-from-stable-to-stable I-unsound A-lifetimes
Hmm… maybe this is just a duplicate of ?
I went ahead and implemented the "hacky" fix in
Looks like an NLL regression. The following invalid example compiles in v1.63.0, where NLL is enabled by default:
WG-prioritization assigning priority (). label -I-prioritize +P-high

Related discussion:
text: <ins> error[E0597]: `s` does not live long enough --> $DIR/check-normalized-sig-for-wf.rs:7:7 | LL |     s: String, |     - binding `s` declared here ... LL |     f(&s).0 |     --^^- |     | | |     | borrowed value does not live long enough |     argument requires that `s` is borrowed for `'static` LL | LL | } | - `s` dropped here while still borrowed error[E0521]: borrowed data escapes outside of function --> $DIR/check-normalized-sig-for-wf.rs:15:5 | LL | fn extend<T>(input: &T) -> &'static T { |              -----  - let's call the lifetime of this reference `'1` |              | |              `input` is a reference that is only valid in the function body ... LL |     n(input).0 |     ^^^^^^^^ |     | |     `input` escapes the function body here |     argument requires that `'1` must outlive `'static` error[E0521]: borrowed data escapes outside of function --> $DIR/check-normalized-sig-for-wf.rs:23:5 | LL | fn extend_mut<'a, T>(input: &'a mut T) -> &'static mut T { |               --     ----- `input` is a reference that is only valid in the function body |               | |               lifetime `'a` defined here ... LL |     n(input).0 |     ^^^^^^^^ |     | |     `input` escapes the function body here |     argument requires that `'a` must outlive `'static` error: aborting due to 3 previous errors Some errors have detailed explanations: E0521, E0597. For more information about an error, try `rustc --explain E0521`. </ins>
Code change:
I have a that has started to fail running clippy, due to a compiler error compiling wayland-protocols. The dependency chain is down from iced thru "clipboardwayland" (0.2.0) to "smithay-clipboard" (0.6.6) and to "wayland-protocols" v0.29.5 "clipboardwayland" 0.2.0 is the latest version on , but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on wayland-protocols 0.29.5 : See also: </p</details
Ruffle is running into this same ICE with wayland-protocols:
minimized:
searched nightlies: from nightly-2023-12-17 to nightly-2023-12-19 regressed nightly: nightly-2023-12-19 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.7</summaryHost triple: x86_64-pc-windows-msvc Reproduce with: </details
cc for the bisection
~This snippet doesn't reproduce the ICE.~ Upd: sorry, it does, on 2018+ edition.
Fixed in
After being released to nightly yesterday, things are back to normal and building. Thanks!

Related discussion:
text: id: NodeId, parent_prefix: &[Segment], nested: bool, <ins> list_stem: bool, </ins> // The whole `use` item item: &Item, vis: ty::Visibility,
Code change:
I have a that has started to fail running clippy, due to a compiler error compiling wayland-protocols. The dependency chain is down from iced thru "clipboardwayland" (0.2.0) to "smithay-clipboard" (0.6.6) and to "wayland-protocols" v0.29.5 "clipboardwayland" 0.2.0 is the latest version on , but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on wayland-protocols 0.29.5 : See also: </p</details
Ruffle is running into this same ICE with wayland-protocols:
minimized:
searched nightlies: from nightly-2023-12-17 to nightly-2023-12-19 regressed nightly: nightly-2023-12-19 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.7</summaryHost triple: x86_64-pc-windows-msvc Reproduce with: </details
cc for the bisection
~This snippet doesn't reproduce the ICE.~ Upd: sorry, it does, on 2018+ edition.
Fixed in
After being released to nightly yesterday, things are back to normal and building. Thanks!

Related discussion:
text: parent_prefix, use_tree, nested ); <del> if nested { </del> <ins> // Top level use tree reuses the item's id and list stems reuse their parent // use tree's ids, so in both cases their visibilities are already filled. if nested && !list_stem { </ins> self.r.feed_visibility(self.r.local_def_id(id), vis); }
Code change:
I have a that has started to fail running clippy, due to a compiler error compiling wayland-protocols. The dependency chain is down from iced thru "clipboardwayland" (0.2.0) to "smithay-clipboard" (0.6.6) and to "wayland-protocols" v0.29.5 "clipboardwayland" 0.2.0 is the latest version on , but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on wayland-protocols 0.29.5 : See also: </p</details
Ruffle is running into this same ICE with wayland-protocols:
minimized:
searched nightlies: from nightly-2023-12-17 to nightly-2023-12-19 regressed nightly: nightly-2023-12-19 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.7</summaryHost triple: x86_64-pc-windows-msvc Reproduce with: </details
cc for the bisection
~This snippet doesn't reproduce the ICE.~ Upd: sorry, it does, on 2018+ edition.
Fixed in
After being released to nightly yesterday, things are back to normal and building. Thanks!

Related discussion:
text: for &(ref tree, id) in items { self.build_reduced_graph_for_use_tree( // This particular use tree <del> tree, id, &prefix, true, // The whole `use` item </del> <ins> tree, id, &prefix, true, false, // The whole `use` item </ins> item, vis, root_span, ); }
Code change:
I have a that has started to fail running clippy, due to a compiler error compiling wayland-protocols. The dependency chain is down from iced thru "clipboardwayland" (0.2.0) to "smithay-clipboard" (0.6.6) and to "wayland-protocols" v0.29.5 "clipboardwayland" 0.2.0 is the latest version on , but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on wayland-protocols 0.29.5 : See also: </p</details
Ruffle is running into this same ICE with wayland-protocols:
minimized:
searched nightlies: from nightly-2023-12-17 to nightly-2023-12-19 regressed nightly: nightly-2023-12-19 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.7</summaryHost triple: x86_64-pc-windows-msvc Reproduce with: </details
cc for the bisection
~This snippet doesn't reproduce the ICE.~ Upd: sorry, it does, on 2018+ edition.
Fixed in
After being released to nightly yesterday, things are back to normal and building. Thanks!

Related discussion:
text: id, &prefix, true, <ins> true, </ins> // The whole `use` item item, ty::Visibility::Restricted(
Code change:
I have a that has started to fail running clippy, due to a compiler error compiling wayland-protocols. The dependency chain is down from iced thru "clipboardwayland" (0.2.0) to "smithay-clipboard" (0.6.6) and to "wayland-protocols" v0.29.5 "clipboardwayland" 0.2.0 is the latest version on , but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on wayland-protocols 0.29.5 : See also: </p</details
Ruffle is running into this same ICE with wayland-protocols:
minimized:
searched nightlies: from nightly-2023-12-17 to nightly-2023-12-19 regressed nightly: nightly-2023-12-19 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.7</summaryHost triple: x86_64-pc-windows-msvc Reproduce with: </details
cc for the bisection
~This snippet doesn't reproduce the ICE.~ Upd: sorry, it does, on 2018+ edition.
Fixed in
After being released to nightly yesterday, things are back to normal and building. Thanks!

Related discussion:
text: item.id, &[], false, <ins> false, </ins> // The whole `use` item item, vis,
Code change:
I have a that has started to fail running clippy, due to a compiler error compiling wayland-protocols. The dependency chain is down from iced thru "clipboardwayland" (0.2.0) to "smithay-clipboard" (0.6.6) and to "wayland-protocols" v0.29.5 "clipboardwayland" 0.2.0 is the latest version on , but it depends on "smithay-clipboard" 0.6.6, while 0.7.0 is the latest version on wayland-protocols 0.29.5 : See also: </p</details
Ruffle is running into this same ICE with wayland-protocols:
minimized:
searched nightlies: from nightly-2023-12-17 to nightly-2023-12-19 regressed nightly: nightly-2023-12-19 searched commit range: regressed commit: <details<summarybisected with <a href=''cargo-bisect-rustc</av0.6.7</summaryHost triple: x86_64-pc-windows-msvc Reproduce with: </details
cc for the bisection
~This snippet doesn't reproduce the ICE.~ Upd: sorry, it does, on 2018+ edition.
Fixed in
After being released to nightly yesterday, things are back to normal and building. Thanks!

Related discussion:
text: <ins> // check-pass // edition: 2018 mod outer { mod inner { pub mod inner2 {} } pub(crate) use inner::{}; pub(crate) use inner::{{}}; pub(crate) use inner::{inner2::{}}; pub(crate) use inner::{inner2::{{}}}; } fn main() {} </ins>
Code 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. -- In particular, this also happens with . <!-- 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 label F-dyn_star requires-nightly
Regression in nightly-2022-10-16 found 7 bors merge commits in the specified range commit[0] 2022-10-14: Auto merge of - woppopo:const_location, r=scottmcm commit[1] 2022-10-14: Auto merge of - matthiaskrgr:rollup-xxsx6sk, r=matthiaskrgr commit[2] 2022-10-15: Auto merge of - joshtriplett:is-terminal-fd-handle, r=thomcc commit[3] 2022-10-15: Auto merge of - Aaron1011:stability-use-tree, r=cjgillot commit[4] 2022-10-15: Auto merge of - compiler-errors:dyn-star-plus, r=eholk commit[5] 2022-10-15: Auto merge of - Dylan-DPC:rollup-97cvwdv, r=Dylan-DPC commit[6] 2022-10-15: Auto merge of - Nilstrieb:query-cleanups, r=cjgillot ERROR: no CI builds available between and within last 167 days maybe ?

Related discussion:
text: /// Whether the layout is from a type that implements [`std::marker::PointerLike`]. /// /// Currently, that means that the type is pointer-sized, pointer-aligned, <del> /// and has a scalar ABI. </del> <ins> /// and has a initialized (non-union), scalar ABI. </ins> pub fn is_pointer_like(self, data_layout: &TargetDataLayout) -> bool { self.size() == data_layout.pointer_size && self.align().abi == data_layout.pointer_align.abi <del> && matches!(self.abi(), Abi::Scalar(..)) </del> <ins> && matches!(self.abi(), Abi::Scalar(Scalar::Initialized { .. })) </ins> } }
Code 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. -- In particular, this also happens with . <!-- 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 label F-dyn_star requires-nightly
Regression in nightly-2022-10-16 found 7 bors merge commits in the specified range commit[0] 2022-10-14: Auto merge of - woppopo:const_location, r=scottmcm commit[1] 2022-10-14: Auto merge of - matthiaskrgr:rollup-xxsx6sk, r=matthiaskrgr commit[2] 2022-10-15: Auto merge of - joshtriplett:is-terminal-fd-handle, r=thomcc commit[3] 2022-10-15: Auto merge of - Aaron1011:stability-use-tree, r=cjgillot commit[4] 2022-10-15: Auto merge of - compiler-errors:dyn-star-plus, r=eholk commit[5] 2022-10-15: Auto merge of - Dylan-DPC:rollup-97cvwdv, r=Dylan-DPC commit[6] 2022-10-15: Auto merge of - Nilstrieb:query-cleanups, r=cjgillot ERROR: no CI builds available between and within last 167 days maybe ?

Related discussion:
text: <ins> #![feature(dyn_star)] //~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes union Union { x: usize, } trait Trait {} impl Trait for Union {} fn bar(_: dyn* Trait) {} fn main() { bar(Union { x: 0usize }); //~^ ERROR `Union` needs to have the same ABI as a pointer } </ins>
Code 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. -- In particular, this also happens with . <!-- 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 label F-dyn_star requires-nightly
Regression in nightly-2022-10-16 found 7 bors merge commits in the specified range commit[0] 2022-10-14: Auto merge of - woppopo:const_location, r=scottmcm commit[1] 2022-10-14: Auto merge of - matthiaskrgr:rollup-xxsx6sk, r=matthiaskrgr commit[2] 2022-10-15: Auto merge of - joshtriplett:is-terminal-fd-handle, r=thomcc commit[3] 2022-10-15: Auto merge of - Aaron1011:stability-use-tree, r=cjgillot commit[4] 2022-10-15: Auto merge of - compiler-errors:dyn-star-plus, r=eholk commit[5] 2022-10-15: Auto merge of - Dylan-DPC:rollup-97cvwdv, r=Dylan-DPC commit[6] 2022-10-15: Auto merge of - Nilstrieb:query-cleanups, r=cjgillot ERROR: no CI builds available between and within last 167 days maybe ?

Related discussion:
text: <ins> warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/union.rs:1:12 | LL | #![feature(dyn_star)] |            ^^^^^^^^ | = note: see issue #102425 <https://github.com/rust-lang/rust/issues/102425> for more information = note: `#[warn(incomplete_features)]` on by default error[E0277]: `Union` needs to have the same ABI as a pointer --> $DIR/union.rs:14:9 | LL |     bar(Union { x: 0usize }); |         ^^^^^^^^^^^^^^^^^^^ `Union` needs to be a pointer-like type | = help: the trait `PointerLike` is not implemented for `Union` error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0277`. </ins>
Code change:
Reading the compiler code (specifically the one responsible for mir output) I found these s where probably expected . <!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOT_END --
Have you actually encountered an ICE due to this?
No, I just happened to find that. It's not a ICE, just a typo in the code
claim

Related discussion:
text: | ProjectionElem::Subtype(_) | ProjectionElem::Downcast(_, _) | ProjectionElem::Field(_, _) => { <del> write!(fmt, "(").unwrap(); </del> <ins> write!(fmt, "(")?; </ins> } ProjectionElem::Deref => { <del> write!(fmt, "(*").unwrap(); </del> <ins> write!(fmt, "(*")?; </ins> } ProjectionElem::Index(_) | ProjectionElem::ConstantIndex { .. }
Code 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. --Basically this is the module where it fails, right now I can't create a minimized example, I'll try to later: on: branch: Bug also exists on nightly, and also on Linux: : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
I can confirm this bug on
minimized repro: label T-rustdoc A-intra-doc-links A-resolve S-has-mcve -needs-triage

Related discussion:
text: // but there's already an item with the same namespace and same name. Rust gives // priority to the not-imported one, so we should, too. items.extend(doc.items.values().flat_map(|(item, renamed, import_id)| { <del> // First, lower everything other than imports. </del> <ins> // First, lower everything other than glob imports. </ins> if matches!(item.kind, hir::ItemKind::Use(_, hir::UseKind::Glob)) { return Vec::new(); }
Code 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. --Basically this is the module where it fails, right now I can't create a minimized example, I'll try to later: on: branch: Bug also exists on nightly, and also on Linux: : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
I can confirm this bug on
minimized repro: label T-rustdoc A-intra-doc-links A-resolve S-has-mcve -needs-triage

Related discussion:
text: use rustc_hir::HirId; use rustc_lint_defs::Applicability; use rustc_resolve::rustdoc::source_span_for_markdown_range; <ins> use rustc_span::def_id::DefId; </ins> use rustc_span::Symbol; use crate::clean::utils::find_nearest_parent_module;
Code 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. --Basically this is the module where it fails, right now I can't create a minimized example, I'll try to later: on: branch: Bug also exists on nightly, and also on Linux: : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
I can confirm this bug on
minimized repro: label T-rustdoc A-intra-doc-links A-resolve S-has-mcve -needs-triage

Related discussion:
text: return; } <del> if item.link_names(&cx.cache).is_empty() { // If there's no link names in this item, // then we skip resolution querying to // avoid from panicking. return; </del> <ins> if let Some(item_id) = item.def_id() { check_redundant_explicit_link_for_did(cx, item, item_id, hir_id, &doc); </ins> } <ins> if let Some(item_id) = item.inline_stmt_id { check_redundant_explicit_link_for_did(cx, item, item_id, hir_id, &doc); } } </ins> <del> let Some(item_id) = item.def_id() else { return; }; let Some(local_item_id) = item_id.as_local() else { </del> <ins> fn check_redundant_explicit_link_for_did<'md>( cx: &DocContext<'_>, item: &Item, did: DefId, hir_id: HirId, doc: &'md str, ) { let Some(local_item_id) = did.as_local() else { </ins> return; };
Code 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. --Basically this is the module where it fails, right now I can't create a minimized example, I'll try to later: on: branch: Bug also exists on nightly, and also on Linux: : <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details
I can confirm this bug on
minimized repro: label T-rustdoc A-intra-doc-links A-resolve S-has-mcve -needs-triage

Related discussion:
text: return; } let is_private = !cx.render_options.document_private <del> && !cx.cache.effective_visibilities.is_directly_public(cx.tcx, item_id); </del> <ins> && !cx.cache.effective_visibilities.is_directly_public(cx.tcx, did); </ins> if is_private { return; } <del> check_redundant_explicit_link(cx, item, hir_id, &doc); </del> <ins> let module_id = match cx.tcx.def_kind(did) { DefKind::Mod if item.inner_docs(cx.tcx) => did, _ => find_nearest_parent_module(cx.tcx, did).unwrap(), }; let Some(resolutions) = cx.tcx.resolutions(()).doc_link_resolutions.get(&module_id.expect_local()) else { // If there's no resolutions in this module, // then we skip resolution querying to // avoid from panicking. return; }; check_redundant_explicit_link(cx, item, hir_id, &doc, &resolutions); </ins> } fn check_redundant_explicit_link<'md>(