1.99 beta crater regression: type annotations needed
Open
Nobody has claimed this yet.
C-bug
I-prioritize
needs-triage
regression-from-stable-to-beta
S-has-bisection
S-has-mcve
T-types
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reduced Rust example and reading the linked crater log to identify the changed compiler behavior around the missing type annotations. Compare the report with issue #161913 to determine whether this is a duplicate. Done means the regression's scope and expected behavior are established and the appropriate compiler fix is identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100