1154: Initial support for lang items (and str completion) r=flodiebold a=marcogroppo

This PR adds partial support for lang items.
For now, the only supported lang items are the ones that target an impl block.

Lang items are now resolved during type inference - this means that `str` completion now works.

Fixes #1139.

(thanks Florian Diebold for the help!)


Co-authored-by: Marco Groppo <marco.groppo@gmail.com>
This commit is contained in:
bors[bot] 2019-04-20 16:13:50 +00:00
commit 4ad2e4ce4e
11 changed files with 174 additions and 19 deletions

View file

@ -1325,6 +1325,7 @@ impl ToOwned for ImplBlock {
impl ast::TypeParamsOwner for ImplBlock {}
impl ast::AttrsOwner for ImplBlock {}
impl ImplBlock {
pub fn item_list(&self) -> Option<&ItemList> {
super::child_opt(self)