Global TypeRef/TraitRef interning

This commit is contained in:
Jonas Schievink 2021-04-01 19:46:43 +02:00
parent 25201b2dad
commit b00266b79f
11 changed files with 205 additions and 120 deletions

View file

@ -91,7 +91,7 @@ impl HirDisplay for Function {
let ret_type = if !qual.is_async {
&data.ret_type
} else {
match &data.ret_type {
match &*data.ret_type {
TypeRef::ImplTrait(bounds) => match &bounds[0] {
TypeBound::Path(path) => {
path.segments().iter().last().unwrap().args_and_bindings.unwrap().bindings