Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/display.rs')
| -rw-r--r-- | crates/hir_ty/src/display.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs index 307323690a..c09f8db86e 100644 --- a/crates/hir_ty/src/display.rs +++ b/crates/hir_ty/src/display.rs @@ -20,6 +20,7 @@ use hir_def::{ }; use hir_expand::{hygiene::Hygiene, name::Name}; use itertools::Itertools; +use syntax::SmolStr; use crate::{ const_from_placeholder_idx, @@ -774,8 +775,9 @@ impl SizedByDefault { match self { Self::NotSized => false, Self::Sized { anchor } => { - let sized_trait = - db.lang_item(anchor, "sized".into()).and_then(|lang_item| lang_item.as_trait()); + let sized_trait = db + .lang_item(anchor, SmolStr::new_inline("sized")) + .and_then(|lang_item| lang_item.as_trait()); Some(trait_) == sized_trait } } |