]> git.lizzy.rs Git - rust.git/commit
HasSource::source_old -> HasSource::source for places where proc-macros were special...
authorNick Spain <nicholas.spain@stileeducation.com>
Fri, 1 Jan 2021 03:14:09 +0000 (14:14 +1100)
committerNick Spain <nicholas.spain@stileeducation.com>
Sat, 2 Jan 2021 10:53:52 +0000 (21:53 +1100)
commit14d0db0759c5b8e1d085ebab03a8b944a8921f2e
tree8dfb49f723094cc92d86e6d902309e5bc7ecf239
parentea4708c444509449b86c50b7b1b23f9ff5af4e97
HasSource::source_old -> HasSource::source for places where proc-macros were special cased

In #6901 some special case handling for proc-macros was introduced to
prevent panicing as they have no AST. Now the new HasSource::source
method is used that returns an option.

Generally this was a pretty trivial change, the only thing of much
interest is that `hir::MacroDef` now implements `TryToNav` not `ToNav`
as this allows us to handle `HasSource::source` now returning an option.
crates/completion/src/render/macro_.rs
crates/hir/src/code_model.rs
crates/ide/src/display/navigation_target.rs
crates/ide/src/hover.rs