Ambiguous generic arguments #42
Labels
C-design-docs
Category: This is part of our design documentation
K-behavior
Document Kind: regarding user visible behavior
P-optional
Priority: not strictly required
S-active
What is this
This is a design document for const generics. Any discussions about its content should be on zulip. The conclusions of these discussions should then be edited back into this issue. Please do not post any comments directly in this issue.
Content
We currently do not correctly deal with ambiguous generic arguments, preventing the following example from compiling:
That's unfortunate and should be changed.
This also affects
()
, see rust-lang/rust#66615 for previous discussions about this.This also affects unit structs, e.g.
struct Empty;
, see rust-lang/rust#67075 for a previous discussion about this.This also affects
_
, currently unstable asfeature(generic_arg_infer)
, tracked in rust-lang/rust#85077. The current implementation of that feature is somewhat brittle however.While not strictly ambiguous, we also forbid multi-segment paths, see rust-lang/rust#77773 (comment) for context.
The text was updated successfully, but these errors were encountered: