mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
internal: intern TypeBound
s
Doesn't save much memory (~2 mb), but interning things is generally a good pattern to follow
This commit is contained in:
parent
05fc97e31b
commit
8ebb8d29e1
12 changed files with 49 additions and 27 deletions
|
@ -92,7 +92,7 @@ impl HirDisplay for Function {
|
|||
&data.ret_type
|
||||
} else {
|
||||
match &*data.ret_type {
|
||||
TypeRef::ImplTrait(bounds) => match &bounds[0] {
|
||||
TypeRef::ImplTrait(bounds) => match bounds[0].as_ref() {
|
||||
TypeBound::Path(path) => {
|
||||
path.segments().iter().last().unwrap().args_and_bindings.unwrap().bindings
|
||||
[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue