Skip to content

analyze: rewriter adds hypothetical lifetime args to mentions of non-rewritten structs #994

Closed
@spernsteiner

Description

@spernsteiner
extern "C" {
    fn epoll_wait(events: *mut epoll_event);
}

pub struct fdevents {
    pub epoll_events: *mut epoll_event,
}

pub struct epoll_event {
    pub ptr: *mut u8,
}

Rewritten output:

extern "C" {
    fn epoll_wait(events: *mut epoll_event);
}

pub struct fdevents<'h4,'h5> {
    pub epoll_events: &'h4 (epoll_event<'h5>),
}

pub struct epoll_event {
    pub ptr: *mut u8,
}

struct epoll_event can't be rewritten, since it's exposed to FFI via fn epoll_wait. But the field type in fdevents is rewritten as if a lifetime parameter was added to epoll_event.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions