Git Product home page Git Product logo

Comments (6)

lukas-code avatar lukas-code commented on July 19, 2024 2

Here is a self-contained reproducer, can probably be minimized further: playground link

trait Api: Sized {
    type Device: ?Sized;
}

struct OpenDevice<A: Api>
where
    A::Device: Sized,
{
    device: A::Device,
    queue: (),
}

trait Adapter {
    type A: Api;

    fn open() -> OpenDevice<Self::A>
    where
        <Self::A as Api>::Device: Sized;
}

struct ApiS;

impl Api for ApiS {
    type Device = [u8];
}

impl<T> Adapter for T {
    type A = ApiS;

    fn open() -> OpenDevice<Self::A>
    where
        <Self::A as Api>::Device: Sized,
    {
        unreachable!()
    }
}

from rust.

lylythechosenone avatar lylythechosenone commented on July 19, 2024

@compiler-errors I'm not really sure how to minimize it. Currently, I have no idea which struct is causing the error, nor why. I have tried using cargo-minimize, but it did do very much at all. Let me know if there's something else I should try.

P.S. the scope of the changes isn't too huge, and I'm 100% sure that the issue relates to the new ?Sized bounds on Api types.

from rust.

jieyouxu avatar jieyouxu commented on July 19, 2024
ERROR rustc_abi::layout dl=TargetDataLayout { endian: little, i1_align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(1 bytes) }, i8_align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(1 bytes) }, i16_align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(2 bytes) }, i32_align: AbiAndPrefAlign { abi: Align(4 bytes), pref: Align(4 bytes) }, i64_align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, i128_align: AbiAndPrefAlign { abi: Align(16 bytes), pref: Align(16 bytes) }, f16_align: AbiAndPrefAlign { abi: Align(2 bytes), pref: Align(2 bytes) }, f32_align: AbiAndPrefAlign { abi: Align(4 bytes), pref: Align(4 bytes) }, f64_align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, f128_align: AbiAndPrefAlign { abi: Align(16 bytes), pref: Align(16 bytes) }, pointer_size: Size(8 bytes), pointer_align: AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }, aggregate_align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(8 bytes) }, vector_align: [(Size(8 bytes), AbiAndPrefAlign { abi: Align(8 bytes), pref: Align(8 bytes) }), (Size(16 bytes), AbiAndPrefAlign { abi: Align(16 bytes), pref: Align(16 bytes) })], instruction_address_space: AddressSpace(0), c_enum_min_size: I32 }, fields=[Layout { size: Size(0 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: false }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(1 bytes) }, Layout { size: Size(0 bytes), align: AbiAndPrefAlign { abi: Align(1 bytes), pref: Align(8 bytes) }, abi: Aggregate { sized: false }, fields: Arbitrary { offsets: [], memory_index: [] }, largest_niche: None, variants: Single { index: 0 }, max_repr_align: None, unadjusted_abi_align: Align(1 bytes) }], repr=ReprOptions { int: None, align: None, pack: None, flags: , field_shuffle_seed: 779237850841490393 }, kind=AlwaysSized
note: no errors encountered even though delayed bugs were created

note: those delayed bugs will now be shown as internal compiler errors

error: internal compiler error: univariant: field #2 comes after unsized field

from rust.

lylythechosenone avatar lylythechosenone commented on July 19, 2024

Alright I may have actually just found it. It seems like it's in this struct:

pub struct OpenDevice<A: Api>
where
    A::Device: Sized,
    A::Queue: Sized,
{
    pub device: A::Device,
    pub queue: A::Queue,
}

from rust.

lylythechosenone avatar lylythechosenone commented on July 19, 2024

@lukas-code thank you very much. I was gone else I would've done that myself 😅.

from rust.

matthiaskrgr avatar matthiaskrgr commented on July 19, 2024

Regression in nightly-2023-08-30
looking for regression commit between 2023-08-29 and 2023-08-30
fetching (via remote github) commits from max(4e78abb, 2023-08-27) to 84a9f4c
ending github query because we found starting sha: 4e78abb
get_commits_between returning commits, len: 13
commit[0] 2023-08-28: Auto merge of #115326 - matthiaskrgr:rollup-qsoa8ar, r=matthiaskrgr
commit[1] 2023-08-28: Auto merge of #115182 - RalfJung:abi-compat-sign, r=b-naber
commit[2] 2023-08-29: Auto merge of #115309 - hermitcore:hermit-net-init, r=cuviper
commit[3] 2023-08-29: Auto merge of #115260 - scottmcm:not-quite-so-cold, r=WaffleLapkin
commit[4] 2023-08-29: Auto merge of #115312 - hermitcore:hermit-is_interrupted, r=thomcc
commit[5] 2023-08-29: Auto merge of #113859 - Manishearth:vec-as-mut-ptr-stacked-borrow, r=dtolnay
commit[6] 2023-08-29: Auto merge of #114795 - RalfJung:cell-swap, r=dtolnay
commit[7] 2023-08-29: Auto merge of #115277 - RalfJung:is_1zst, r=davidtwco
commit[8] 2023-08-29: Auto merge of #114894 - Zoxc:sharded-cfg-cleanup2, r=cjgillot
commit[9] 2023-08-29: Auto merge of #112775 - c410-f3r:t3st3ss, r=petrochenkov
commit[10] 2023-08-29: Auto merge of #115183 - flip1995:clippyup, r=Manishearth,oli-obk
commit[11] 2023-08-29: Auto merge of #115354 - matthiaskrgr:rollup-4cotcxz, r=matthiaskrgr
commit[12] 2023-08-29: Auto merge of #114114 - keith:ks/always-add-lc_build_version-for-metadata-object-files, r=wesleywiser
ERROR: no CI builds available between 4e78abb and 84a9f4c within last 167 days

from rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.