Skip to content

1.99 beta crater regression: type annotations needed #162109

Closed

Description

@cyrgani

log: https://crater-reports.s3.amazonaws.com/beta-1.99-5/1.99.0-beta.1/reg/lazy_transducer-0.2.1/log.txt

partial reduction:

use std::marker::PhantomData;
use std::mem::transmute;

fn main() {
    let bytes: Vec<u8> = vec![1u8, 0, 2, 0, 3, 0, 4, 0];
    let lt: LazyTransducer<_, &u16> =
        LazyTransducer::new(&bytes, |input| unsafe { transmute::<_, &u16>(&input[0]) });
}

struct LazyTransducer<'a, Input, Output>
where
    Input: 'a + Copy,
    Output: 'a,
{
    contents: Input,
    transducer: fn(Input) -> Output,
    _marker: PhantomData<&'a Output>,
}

impl<'a, Input, Output> LazyTransducer<'a, Input, Output>
where
    Input: 'a + Copy,
    Output: 'a,
{
    fn new(contents: Input, transducer: fn(Input) -> Output) -> Self {
        LazyTransducer {
            contents,
            transducer,
            _marker: PhantomData::default(),
        }
    }
}

possibly a duplicate of #161913?

Activity

  1. added
    regression-from-stable-to-beta
    C-bug
    E-needs-bisection
    E-needs-mcve
    on Sep 1, 2026
  2. added
    needs-triage
    I-prioritize
    on Sep 1, 2026
  3. added
    T-types
    on Sep 1, 2026
  4. cyrgani commented on Sep 1, 2026

    @cyrgani
    ContributorAuthor

    smaller:

    fn main() {
        let _: Foo<_, u8> = Foo::new(&1u8, |input| *input);
    }
    
    struct Foo<I, O>(I, fn(I) -> O);
    
    impl<I, O> Foo<I, O> {
        fn new(_: I, _: fn(I) -> O) -> Self {
            loop {}
        }
    }

    bisects to #158447

  5. added
    S-has-mcve
    S-has-bisection
    and removed
    E-needs-mcve
    E-needs-bisection
    on Sep 1, 2026
  6. theemathas commented on Sep 1, 2026

    @theemathas
    Contributor
  7. theemathas commented on Sep 4, 2026

    @theemathas
    Contributor

    Possibly a duplicate of #161913.

  8. 4 remaining items

  9. added
    regression-from-stable-to-stable
    and removed
    regression-from-stable-to-beta
    on Oct 19, 2026
  10. removed
    I-prioritize
    on Oct 19, 2026
  11. yashaggarwal85d commented on Oct 24, 2026

    @yashaggarwal85d
  12. added a commit that references this issue on Oct 25, 2026
  13. added a commit that references this issue on Oct 25, 2026
  14. added a commit that references this issue on Oct 25, 2026
  15. added a commit that references this issue on Oct 25, 2026
  16. added a commit that references this issue on Oct 25, 2026
  17. added 2 commits that reference this issue on Oct 25, 2026
  18. added a commit that references this issue on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

C-bugE-needs-testS-has-bisectionS-has-mcveT-typesregression-from-stable-to-stable

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions