Skip to content

derive AbiExample for GenericArray overflow #187

@lcnr

Description

@lcnr
Contributor

a lot of failures seem to be overflow errors due to this. Haven't yet looked into this at all

impacts:

#![feature(specialization)]

use gemachain_frozen_abi::abi_example::AbiExample;
use generic_array::{typenum::U64, GenericArray};

fn main() {
    let _ = GenericArray::<u8, U64>::example();
}

Activity

added
from-craterA regression found via a crater run, not part of our test suite
on Apr 25, 2025
lcnr

lcnr commented on Apr 25, 2025

@lcnr
ContributorAuthor

MVCE

#![feature(specialization)]

trait WithAssoc: 'static {
    type Assoc;
}
impl<T: 'static> WithAssoc for (T,) {
    type Assoc = ();
}

struct GenericArray<U: WithAssoc>(U::Assoc);

trait AbiExample {
    fn example();
}
impl<U: WithAssoc> AbiExample for GenericArray<U> {
    fn example() {}
}
impl<T> AbiExample for T {
    default fn example() {}
}

fn main() {
    let _ = GenericArray::<((),)>::example();
}

no idea why it fails idc

moved this from unknown to in progress in -Znext-solver=globallyon Apr 25, 2025
self-assigned this
on Apr 25, 2025
added a commit that references this issue on Apr 25, 2025
41cf18c
added a commit that references this issue on Apr 26, 2025
b80b2f4
added a commit that references this issue on Apr 26, 2025
54eae59
added a commit that references this issue on Apr 26, 2025
moved this from in progress to done in -Znext-solver=globallyon Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

from-craterA regression found via a crater run, not part of our test suite

Type

No type

Projects

Status

done

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @lcnr

    Issue actions

      derive `AbiExample` for `GenericArray` overflow · Issue #187 · rust-lang/trait-system-refactor-initiative