about summary refs log tree commit diff
path: root/compiler/rustc_monomorphize
AgeCommit message (Collapse)AuthorLines
2021-10-04polymorphize: don't normalize self-ty need substsDavid Wood-9/+16
`characteristic_def_id_of_type` was being invoked during partitioning for self types of impl blocks which had projections that depended on the value of unused generic parameters of a function, resulting in an ICE in the 'generic-names' debuginfo test. If partitioning is enabled and the instance needs substitution then this is now skipped. Signed-off-by: David Wood <david.wood@huawei.com>
2021-10-01polymorphize: polymorphize shimsDavid Wood-44/+65
This commit removes the restriction of `InstanceDef::Item` on polymorphization, so that shims can now be polymorphized. Signed-off-by: David Wood <david.wood@huawei.com>
2021-10-01collector: limit pme context note to user-defd fnsDavid Wood-1/+3
rustc adds notes to errors which happen post-monomorphization to provide the user with helpful context (as these errors may rely on the specific instantiations). To prevent this note being added where it is not appropriate, the node is checked to originate outwith the current crate. However, when polymorphization is enabled, this can result in some errors (produced by `optimized_mir`) to occur earlier in compilation than they normally would, during the collection of shims. Some shims have ids that originate in the standard library, but these should not receive the PME note, so instances for compiler-generated functions no longer receive this note. Signed-off-by: David Wood <david.wood@huawei.com>
2021-10-01polymorphize: remove predicate logicDavid Wood-41/+0
This commit removes all logic which marks parameters as used based on their presence in predicates - given rust-lang/rust#75675, this will enable more polymorphization and avoid the symbol clashes that predicate logic previously sidestepped. Signed-off-by: David Wood <david@davidtw.co>
2021-10-01polymorphize: don't check foreign itemsDavid Wood-0/+5
Foreign items do not have bodies and so cannot be polymorphized. Signed-off-by: David Wood <david.wood@huawei.com>
2021-09-29Avoid more invocations of hir_crate query.Camille GILLOT-1/+1
2021-09-20Migrate to 2021Mark Rousskov-1/+1
2021-09-15Use explicit log level in tracing instrument macroTomasz Miąsko-10/+10
Specify a log level in tracing instrument macro explicitly. Additionally reduce the used log level from a default info level to a debug level (all of those appear to be developer oriented logs, so there should be no need to include them in release builds).
2021-09-08Rebase fallout.Camille GILLOT-1/+1
2021-09-07Move monomorphize code to its own crate.Camille GILLOT-0/+3087