Failed to lookup type reference for associated type in where-clause bound
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start by compiling the provided no_core reproducer and compare it with the Godbolt example. Trace the compiler's type-reference lookup for T::AssocType in the where-clause bound. Done means the reproducer compiles successfully without the “Failed to lookup type reference” error.
Written by the indexing model from the issue text.
Description
Summary
Failed to lookup type reference for associated type in where-clause bound
Reproducer
I tried this code:
#![feature(no_core, lang_items)]
#![no_core]
#[lang = "sized"]
pub trait Sized {}
pub trait Trait {
type AssocType;
}
pub trait Trait2 {}
pub struct TraitWrapper<T> {
inner: T,
}
impl<T: Trait> TraitWrapper<T>
where
T::AssocType: Trait2,
{
pub fn new(inner: T) -> Self {
Self { inner }
}
}
Does the code make use of any (1.49) nightly feature ?
- Nightly
Godbolt link
https://godbolt.org/z/dEcr35Khh
Actual behavior
crab1: error: Failed to lookup type reference for node: T::AssocType
Expected behavior
Compiler returned: 0
GCC Version
master
- Dominant language
- C++
- Stars
- 3k
- Forks
- 238
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 31
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from Rust-GCC/gccrs
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 3 days
-
Allow pattern matching of floating point literalsPossibly taken @Vivekkumar0995 claimed this 7 days ago. Opencleanup good-first-pr typechecking
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Rust-GCC/gccrs#5047 · 3 comments · 1 assignee ·
Maintainers usually reply within 3 days
-
ICE in variance analysis on core, projection field keeps the impl's type paramPossibly taken @u7k4rs6 claimed this 1 day ago. Opentypechecking
Rust-GCC/gccrs#5074 · 1 assignee ·
Maintainers usually reply within 3 days
-
subset-error typechecking
Difficulty 4/5 3-5 days Newbie friendliness 25/100
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 46/100
Rust-GCC/gccrs#5060 · 2 comments ·
Maintainers usually reply within 3 days
Similar issues
-
area/ysql kind/bug priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yugabyte/yugabyte-db#37523 ·
Maintainers usually reply within 1 day
-
mlir
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
llvm/llvm-project#241070 · 1 comment ·
Maintainers usually reply within 1 day
-
backlog documentation
Difficulty 1/5 Under an hour Newbie friendliness 96/100
EchoTools/nevr-runtime#2354 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
help wanted new command
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
tldr-pages/tldr#25111 ·
Maintainers usually reply within 1 day