`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>
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>
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>
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>
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).