dtolnay/cxx

Permissibility heuristics for signatures involving lifetimes

Open

#165 opened on 2020年4月28日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)Rust (4,472 stars) (253 forks)batch import
help wanted

説明

As motivated in https://github.com/dtolnay/cxx/issues/122#issuecomment-615372359, it may be nice to permit a signature like fn(&mut CThing, &str) -> &mut CThingChild even though we don't support explicit lifetime specifications in full generality. In that signature it's obvious the output mutable reference isn't going to be borrowed from inside the contents of the const &str, and it would be a big red flag in the C++ code if it were, so this is fine to allow.

コントリビューターガイド

Permissibility heuristics for signatures involving lifetimes · dtolnay/cxx#165 | Good First Issue