TyCtxt::variances_of is misdocumented as applying to a generic parameter #133494
Labels
A-docs
Area: documentation for any part of the project, including the compiler, standard library, and tools
A-variance
Area: Variance (https://doc.rust-lang.org/nomicon/subtyping.html)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Location
https://doc.rust-lang.org/beta/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html#method.variances_of
Summary
This method returns the variances of the generic parameters of the struct with the given def_id. Contrary to what the documentation suggests, when given the def_id of a generic parameter of a struct, it returns an empty slice.
The text was updated successfully, but these errors were encountered: