-
-
Notifications
You must be signed in to change notification settings - Fork 15.5k
struct constructor of an alias ty under mgca produces error #160844
Copy link
Copy link
Open
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)A-const-genericsArea: const generics (parameters and arguments)Area: const generics (parameters and arguments)C-bugCategory: This is a bug.Category: This is a bug.F-adt_const_params`#![feature(adt_const_params)]``#![feature(adt_const_params)]`F-min_generic_const_args`#![feature(min_generic_const_args)]``#![feature(min_generic_const_args)]`S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
unsure whether to file this under min_generic_const_args, adt_const_params, inherent_associated_types, or something else ;-;
discovered when investigating how to progress with inherent_associated_types
pardon the wonky setup, it can probably be minimized a bit, just wanting to avoid more_qualified_paths. I think (I am unsure) that this should compile.
relevant line of code:
rust/compiler/rustc_hir_analysis/src/hir_ty_lowering/mod.rs
Line 2679 in 8a2fbe3
relevant PR: #149114
Speculation on my part:
The easiest way to resolve this is to have
ResolvedStructPathhave itsres: Result<Res, ErrorGuaranteed>field ripped out if at all possible. I haven't quite investigated why it exists, I thiiink it's only used in two places: this spot in mGCA direct arg lowering (hence me filing this issue), andfn_ctxt/checks.rscheck_struct_pathrust/compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs
Line 1049 in 8a2fbe3
Anyway, just filing an issue to track it for now, will fully investigate later.