argotorg / argotorg/fe

`invalid(..)` type description in diagnostic

Open
#1,367 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.7k
Forks
218
Avg merge
1d 4h
Merged PRs (30d)
8

Description

```rust

struct Slice {
source: ref [u256; 8], // reference to the original array
start: usize,
len: usize,
}

impl Slice {
fn new(source: ref [u256; 8], start: usize, len: usize) -> Slice {
Slice { source, start, len }
}
}

impl Seq for Slice {
type Item = u256

fn len(self) -> usize {
self.len
}

fn get(ref self, i: usize) -> ref Item {
self.source[self.start + I] // ERROR: expected `ref invalid(PathResolutionFailed(Item))`, but `u256` is given
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the diagnostic with the Slice and Seq example in the issue, then trace the compiler path that formats the expected `ref invalid(PathResolutionFailed(Item))` type. Identify where the unresolved associated type is rendered and update the diagnostic so it gives a useful type description; rerun the same example to confirm the output.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.