From 9787bddac577a6aa24388fb91286474a7a8cf0bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Thu, 25 Mar 2021 21:03:20 +0200 Subject: Use arrayvec 0.6 --- crates/hir_ty/Cargo.toml | 2 +- crates/hir_ty/src/display.rs | 6 ++---- crates/hir_ty/src/method_resolution.rs | 4 ++-- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'crates/hir_ty') diff --git a/crates/hir_ty/Cargo.toml b/crates/hir_ty/Cargo.toml index 0ef27cd37..030b7eebe 100644 --- a/crates/hir_ty/Cargo.toml +++ b/crates/hir_ty/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] cov-mark = { version = "1.1", features = ["thread-local"] } itertools = "0.10.0" -arrayvec = "0.5.1" +arrayvec = "0.6" smallvec = "1.2.0" ena = "0.14.0" log = "0.4.8" diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs index 6149067c7..51480304b 100644 --- a/crates/hir_ty/src/display.rs +++ b/crates/hir_ty/src/display.rs @@ -1,8 +1,7 @@ //! FIXME: write short doc here -use std::fmt; +use std::{array, fmt}; -use arrayvec::ArrayVec; use chalk_ir::Mutability; use hir_def::{ db::DefDatabase, @@ -669,8 +668,7 @@ fn fn_traits(db: &dyn DefDatabase, trait_: TraitId) -> impl Iterator Option> { + ) -> Option> { // Types like slice can have inherent impls in several crates, (core and alloc). // The corresponding impls are marked with lang items, so we can use them to find the required crates. macro_rules! lang_item_crate { ($($name:expr),+ $(,)?) => {{ - let mut v = ArrayVec::<[LangItemTarget; 2]>::new(); + let mut v = ArrayVec::::new(); $( v.extend(db.lang_item(cur_crate, $name.into())); )+ -- cgit v1.2.3