-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No associated item found when the associated item was used as const generic parameter in return type #99705
Comments
I did some digging and this might be related to rust/compiler/rustc_typeck/src/collect.rs Lines 2468 to 2480 in e33cc71
rust/compiler/rustc_typeck/src/collect.rs Lines 2158 to 2169 in e33cc71
@BoxyUwU Mind taking a look? |
A fix exists here at #99801 but we're waiting on @spastorino 's pending RPIT refactor work to fix this. In the mean time, developers who need this feature can use the branch in #99801. https://rust-lang.github.io/rustup/concepts/toolchains.html#custom-toolchains |
I tried this code:
This code should compile normally.
Instead, this happened:
In the
test
function, T was already bounded by theFoo
trait which does have an associated item namedABC
. However, Rust complains that no associated item namedABC
was found forT
.Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: