CFI: Support complex receivers by maurer · Pull Request #123005 · rust-lang/rust...
source link: https://github.com/rust-lang/rust/pull/123005
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Conversation
Contributor
Right now, we only support rewriting &self
and &mut self
into &dyn MyTrait
and &mut dyn MyTrait
. This expands it to handle the full gamut of receivers by calculating the receiver based on substitution rather than based on a rewrite. This means that, for example, Arc<Self>
will become Arc<dyn MyTrait>
appropriately with this change.
This approach also allows us to support associated type constraints as well, so we will correctly rewrite &self
into &dyn MyTrait<T=i32>
, for example.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK