immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.79k stars 219 forks source link

analyze: generate subset relationships for arguments such as `arg: &'a &'b &'c i32` #1002

Open aneksteind opened 11 months ago

aneksteind commented 11 months ago

The 'c: 'a bound that's implied by well-formedness of arg's type should definitely show up somewhere. I think I've seen bounds like that in the output of either predicates_of or a related query. Maybe try looking at explicit_predicates_of, inferred_outlives_of, and/or predicates_defined_on.

It would also be fine to just leave a comment about the limitation, especially if you can't find an easy way to get the predicate from rustc.

_Originally posted by @spernsteiner in https://github.com/immunant/c2rust/pull/975#discussion_r1271169915_

A FIXME comment was added in 3a50eec8