Commit Graph

7 Commits

Author SHA1 Message Date
David Wood
4528b8e581 collector: limit pme context note to user-defd fns
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-01 16:34:18 +00:00
David Wood
da2b69b614 polymorphize: remove predicate logic
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-01 16:34:18 +00:00
David Wood
50433a0bf4 polymorphize: don't check foreign items
Foreign items do not have bodies and so cannot be polymorphized.

Signed-off-by: David Wood <david.wood@huawei.com>
2021-10-01 16:34:18 +00:00
Mark Rousskov
c746be2219 Migrate to 2021 2021-09-20 22:21:42 -04:00
Tomasz Miąsko
b6b19f3b6c Use explicit log level in tracing instrument macro
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-15 19:02:10 +02:00
Camille GILLOT
924dbc36c9 Rebase fallout. 2021-09-08 20:40:30 +02:00
Camille GILLOT
81a600b6b7 Move monomorphize code to its own crate. 2021-09-07 19:53:04 +02:00