Skip to content

derive AbiExample for GenericArray overflow #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lcnr opened this issue Apr 25, 2025 · 1 comment · Fixed by rust-lang/rust#140306
Closed

derive AbiExample for GenericArray overflow #187

lcnr opened this issue Apr 25, 2025 · 1 comment · Fixed by rust-lang/rust#140306
Assignees
Labels
from-crater A regression found via a crater run, not part of our test suite

Comments

@lcnr
Copy link
Contributor

lcnr commented Apr 25, 2025

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();
}
@lcnr lcnr added the from-crater A regression found via a crater run, not part of our test suite label Apr 25, 2025
@lcnr
Copy link
Contributor Author

lcnr commented Apr 25, 2025

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

@lcnr lcnr moved this from unknown to in progress in -Znext-solver=globally Apr 25, 2025
@lcnr lcnr self-assigned this Apr 25, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 25, 2025
…r-errors

handle specialization in the new trait solver

fixes rust-lang/trait-system-refactor-initiative#187
also fixes the regression in `plonky2_field` from rust-lang/trait-system-refactor-initiative#188

cc rust-lang#111994

r? `@compiler-errors`
jhpratt added a commit to jhpratt/rust that referenced this issue Apr 26, 2025
…r-errors

handle specialization in the new trait solver

fixes rust-lang/trait-system-refactor-initiative#187
also fixes the regression in `plonky2_field` from rust-lang/trait-system-refactor-initiative#188

cc rust-lang#111994

r? ``@compiler-errors``
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Apr 26, 2025
Rollup merge of rust-lang#140306 - lcnr:specialization-new, r=compiler-errors

handle specialization in the new trait solver

fixes rust-lang/trait-system-refactor-initiative#187
also fixes the regression in `plonky2_field` from rust-lang/trait-system-refactor-initiative#188

cc rust-lang#111994

r? ```@compiler-errors```
@lcnr lcnr moved this from in progress to done in -Znext-solver=globally Apr 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from-crater A regression found via a crater run, not part of our test suite
Projects
Development

Successfully merging a pull request may close this issue.

1 participant