Skip to content

x test tidy --bless incorrectly duplicates a part of where #107610

Closed
@peter-lyons-kehl

Description

@peter-lyons-kehl
  • Background: Experimentation with addition of a const generic parameter to library/alloc and using macro_rules! for default values of those const generic params and also in new where bounds. Daring, of course.
  • checkout coop-rs@17d14cc
  • library/alloc builds well: RUST_BACKTRACE=full x build --stage 0 library/alloc. (Some (default) implementations are incorrect and they make 3rd party crates not build (when RUST_BACKTRACE=full x build --stage 0). It's work in progress. But that shouldn't affect the issue being reported here.)
  • run x test tidy --bless
  • git diff shows this incorrect change:
git diff
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs
index 9d78818fdb5..a8b7d3b8cd7 100644
--- a/library/alloc/src/vec/mod.rs
+++ b/library/alloc/src/vec/mod.rs
@@ -1880,6 +1880,8 @@ struct FillGapOnDrop<'a, T, A: core::alloc::Allocator, const CO_ALLOC_PREF: CoAl
         where
             [(); { crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:,
         {
+            crate::meta_num_slots!(A, CO_ALLOC_PREF) }]:,
+            {
             /* Offset of the element we want to check if it is duplicate */
             read: usize,
  • Now RUST_BACKTRACE=full x build --stage 0 library/alloc fails. The above code (before tidy) is at https://github.com/coop-rs/rust/blob/17d14cca54391bc87b014976add4fb3ff59ef685/library/alloc/src/vec/mod.rs#L1878.
  • Unfortunately, I don't have skills, nor capacity, to "minimize" this. I admit I haven't run x test tidy --bless frequently. If I notice anything related, I'll update you.
  • This issue showed up only today (Feb 2, 2023) when I rebased my code on current master. However, I don't know if it's caused by anything new in master, or it only showed up by some constellation of my code, or a combination of both... My previous rebase on master was max. 30 hours earlier (but I don't have the previous commits, because I git push --force since I'm the only developer on this for now).

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.E-needs-mcveCall for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions