about summary refs log tree commit diff
path: root/src/test/ui/polymorphization/predicates.rs
AgeCommit message (Collapse)AuthorLines
2020-08-17polymorphize: ∃ used param ∈ predicate → all usedDavid Wood-0/+17
This commit modifies polymorphization's handling of predicates so that if any generic parameter is used in a predicate then all parameters in that predicate are used. Signed-off-by: David Wood <david@davidtw.co>
2020-08-14polymorphize: `I` used if `T` used in `I: Foo<T>`David Wood-0/+48
This commit adjusts polymorphization's handling of predicates so that after ensuring that `T` is used in `I: Foo<T>` if `I` is used, it now ensures that `I` is used if `T` is used in `I: Foo<T>`. This is necessary to mark generic parameters that only exist in impl parameters as used - thereby avoiding symbol clashes when using the new mangling scheme. Signed-off-by: David Wood <david@davidtw.co>
2020-07-22sess: disable polymorphisationDavid Wood-0/+1
This commit disables polymorphisation to resolve regressions related to closures which inherit unused generic parameters and are then used in casts or reflection. Signed-off-by: David Wood <david@davidtw.co>
2020-07-20mir: use attribute over `-Z polymorphize-errors`David Wood-2/+4
This commit replaces the `-Z polymorphize-errors` debugging flag with a `#[rustc_polymorphize_error]` attribute for use on functions. Signed-off-by: David Wood <david@davidtw.co>
2020-07-20mir: `unused_generic_params` queryDavid Wood-0/+21
This commit implements the `unused_generic_params` query, an initial version of polymorphization which detects when an item does not use generic parameters and is being needlessly monomorphized as a result. Signed-off-by: David Wood <david@davidtw.co>