diff options
| -rw-r--r-- | crates/base-db/src/input.rs | 2 | ||||
| -rw-r--r-- | crates/hir-ty/src/consteval.rs | 1 | ||||
| -rw-r--r-- | crates/ide-db/src/search.rs | 2 | ||||
| -rw-r--r-- | crates/ide/src/goto_definition.rs | 2 | ||||
| -rw-r--r-- | crates/ide/src/status.rs | 2 | ||||
| -rw-r--r-- | crates/proc-macro-api/src/msg/flat.rs | 5 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/abis/abi_1_58/proc_macro/mod.rs | 4 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/abis/abi_1_58/ra_server.rs | 1 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/abis/abi_1_63/proc_macro/mod.rs | 4 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs | 1 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/abis/abi_1_64/proc_macro/mod.rs | 4 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/abis/abi_1_64/ra_server.rs | 1 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs | 2 | ||||
| -rw-r--r-- | crates/proc-macro-srv/src/dylib.rs | 1 | ||||
| -rw-r--r-- | crates/rust-analyzer/src/diagnostics/to_proto.rs | 2 | ||||
| -rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 2 | ||||
| -rw-r--r-- | crates/syntax/src/fuzz.rs | 5 | ||||
| -rw-r--r-- | lib/la-arena/src/lib.rs | 1 |
18 files changed, 15 insertions, 27 deletions
diff --git a/crates/base-db/src/input.rs b/crates/base-db/src/input.rs index 9b5a10acfbe..9580ce8007c 100644 --- a/crates/base-db/src/input.rs +++ b/crates/base-db/src/input.rs @@ -6,7 +6,7 @@ //! actual IO. See `vfs` and `project_model` in the `rust-analyzer` crate for how //! actual IO is done and lowered to input. -use std::{fmt, iter::FromIterator, ops, panic::RefUnwindSafe, str::FromStr, sync::Arc}; +use std::{fmt, ops, panic::RefUnwindSafe, str::FromStr, sync::Arc}; use cfg::CfgOptions; use rustc_hash::{FxHashMap, FxHashSet}; diff --git a/crates/hir-ty/src/consteval.rs b/crates/hir-ty/src/consteval.rs index 0495a4e64ca..6ecb6e6fd17 100644 --- a/crates/hir-ty/src/consteval.rs +++ b/crates/hir-ty/src/consteval.rs @@ -2,7 +2,6 @@ use std::{ collections::HashMap, - convert::TryInto, fmt::{Display, Write}, }; diff --git a/crates/ide-db/src/search.rs b/crates/ide-db/src/search.rs index bd038cdaa06..9eaabeec7a4 100644 --- a/crates/ide-db/src/search.rs +++ b/crates/ide-db/src/search.rs @@ -4,7 +4,7 @@ //! get a super-set of matches. Then, we we confirm each match using precise //! name resolution. -use std::{convert::TryInto, mem, sync::Arc}; +use std::{mem, sync::Arc}; use base_db::{FileId, FileRange, SourceDatabase, SourceDatabaseExt}; use hir::{DefWithBody, HasAttrs, HasSource, InFile, ModuleSource, Semantics, Visibility}; diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index b2123b9a879..d6cd5783f05 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs @@ -1,4 +1,4 @@ -use std::{convert::TryInto, mem::discriminant}; +use std::mem::discriminant; use crate::{doc_links::token_as_doc_comment, FilePosition, NavigationTarget, RangeInfo, TryToNav}; use hir::{AsAssocItem, AssocItem, Semantics}; diff --git a/crates/ide/src/status.rs b/crates/ide/src/status.rs index 32e39f82a0e..f4d0387440d 100644 --- a/crates/ide/src/status.rs +++ b/crates/ide/src/status.rs @@ -1,4 +1,4 @@ -use std::{fmt, iter::FromIterator, sync::Arc}; +use std::{fmt, sync::Arc}; use hir::{ExpandResult, MacroFile}; use ide_db::base_db::{ diff --git a/crates/proc-macro-api/src/msg/flat.rs b/crates/proc-macro-api/src/msg/flat.rs index 8437444e183..268a03bb535 100644 --- a/crates/proc-macro-api/src/msg/flat.rs +++ b/crates/proc-macro-api/src/msg/flat.rs @@ -35,10 +35,7 @@ //! as we don't have bincode in Cargo.toml yet, lets stick with serde_json for //! the time being. -use std::{ - collections::{HashMap, VecDeque}, - convert::TryInto, -}; +use std::collections::{HashMap, VecDeque}; use serde::{Deserialize, Serialize}; use tt::TokenId; diff --git a/crates/proc-macro-srv/src/abis/abi_1_58/proc_macro/mod.rs b/crates/proc-macro-srv/src/abis/abi_1_58/proc_macro/mod.rs index 4a07f22779e..a405497f3c9 100644 --- a/crates/proc-macro-srv/src/abis/abi_1_58/proc_macro/mod.rs +++ b/crates/proc-macro-srv/src/abis/abi_1_58/proc_macro/mod.rs @@ -157,7 +157,7 @@ impl From<TokenTree> for TokenStream { } /// Collects a number of token trees into a single stream. -impl iter::FromIterator<TokenTree> for TokenStream { +impl FromIterator<TokenTree> for TokenStream { fn from_iter<I: IntoIterator<Item = TokenTree>>(trees: I) -> Self { trees.into_iter().map(TokenStream::from).collect() } @@ -165,7 +165,7 @@ impl iter::FromIterator<TokenTree> for TokenStream { /// A "flattening" operation on token streams, collects token trees /// from multiple token streams into a single stream. -impl iter::FromIterator<TokenStream> for TokenStream { +impl FromIterator<TokenStream> for TokenStream { fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self { let mut builder = bridge::client::TokenStreamBuilder::new(); streams.into_iter().for_each(|stream| builder.push(stream.0)); diff --git a/crates/proc-macro-srv/src/abis/abi_1_58/ra_server.rs b/crates/proc-macro-srv/src/abis/abi_1_58/ra_server.rs index ebdfca00d73..b1e982f4779 100644 --- a/crates/proc-macro-srv/src/abis/abi_1_58/ra_server.rs +++ b/crates/proc-macro-srv/src/abis/abi_1_58/ra_server.rs @@ -12,7 +12,6 @@ use super::proc_macro::bridge::{self, server}; use std::collections::HashMap; use std::hash::Hash; -use std::iter::FromIterator; use std::ops::Bound; use std::{ascii, vec::IntoIter}; diff --git a/crates/proc-macro-srv/src/abis/abi_1_63/proc_macro/mod.rs b/crates/proc-macro-srv/src/abis/abi_1_63/proc_macro/mod.rs index c50a16bf4d1..7ab1f421daf 100644 --- a/crates/proc-macro-srv/src/abis/abi_1_63/proc_macro/mod.rs +++ b/crates/proc-macro-srv/src/abis/abi_1_63/proc_macro/mod.rs @@ -207,7 +207,7 @@ impl ConcatStreamsHelper { } /// Collects a number of token trees into a single stream. -impl iter::FromIterator<TokenTree> for TokenStream { +impl FromIterator<TokenTree> for TokenStream { fn from_iter<I: IntoIterator<Item = TokenTree>>(trees: I) -> Self { trees.into_iter().map(TokenStream::from).collect() } @@ -215,7 +215,7 @@ impl iter::FromIterator<TokenTree> for TokenStream { /// A "flattening" operation on token streams, collects token trees /// from multiple token streams into a single stream. -impl iter::FromIterator<TokenStream> for TokenStream { +impl FromIterator<TokenStream> for TokenStream { fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self { let iter = streams.into_iter(); let mut builder = ConcatStreamsHelper::new(iter.size_hint().0); diff --git a/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs b/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs index 05a565fbf34..ed49cc75966 100644 --- a/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs +++ b/crates/proc-macro-srv/src/abis/abi_1_63/ra_server.rs @@ -12,7 +12,6 @@ use super::proc_macro::bridge::{self, server}; use std::collections::HashMap; use std::hash::Hash; -use std::iter::FromIterator; use std::ops::Bound; use std::{ascii, vec::IntoIter}; diff --git a/crates/proc-macro-srv/src/abis/abi_1_64/proc_macro/mod.rs b/crates/proc-macro-srv/src/abis/abi_1_64/proc_macro/mod.rs index be62c73ef32..86a59b64559 100644 --- a/crates/proc-macro-srv/src/abis/abi_1_64/proc_macro/mod.rs +++ b/crates/proc-macro-srv/src/abis/abi_1_64/proc_macro/mod.rs @@ -207,7 +207,7 @@ impl ConcatStreamsHelper { } /// Collects a number of token trees into a single stream. -impl iter::FromIterator<TokenTree> for TokenStream { +impl FromIterator<TokenTree> for TokenStream { fn from_iter<I: IntoIterator<Item = TokenTree>>(trees: I) -> Self { trees.into_iter().map(TokenStream::from).collect() } @@ -215,7 +215,7 @@ impl iter::FromIterator<TokenTree> for TokenStream { /// A "flattening" operation on token streams, collects token trees /// from multiple token streams into a single stream. -impl iter::FromIterator<TokenStream> for TokenStream { +impl FromIterator<TokenStream> for TokenStream { fn from_iter<I: IntoIterator<Item = TokenStream>>(streams: I) -> Self { let iter = streams.into_iter(); let mut builder = ConcatStreamsHelper::new(iter.size_hint().0); diff --git a/crates/proc-macro-srv/src/abis/abi_1_64/ra_server.rs b/crates/proc-macro-srv/src/abis/abi_1_64/ra_server.rs index 7e8e67856e9..d8aa1ec429a 100644 --- a/crates/proc-macro-srv/src/abis/abi_1_64/ra_server.rs +++ b/crates/proc-macro-srv/src/abis/abi_1_64/ra_server.rs @@ -12,7 +12,6 @@ use super::proc_macro::bridge::{self, server}; use std::collections::HashMap; use std::hash::Hash; -use std::iter::FromIterator; use std::ops::Bound; use std::{ascii, vec::IntoIter}; diff --git a/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs b/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs index 46882845a80..52eb7ce17d6 100644 --- a/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs +++ b/crates/proc-macro-srv/src/abis/abi_sysroot/ra_server.rs @@ -20,7 +20,7 @@ use token_stream::TokenStreamBuilder; mod symbol; pub use symbol::*; -use std::{iter::FromIterator, ops::Bound}; +use std::ops::Bound; type Group = tt::Subtree; type TokenTree = tt::TokenTree; diff --git a/crates/proc-macro-srv/src/dylib.rs b/crates/proc-macro-srv/src/dylib.rs index 2b6c070fece..7aba74e5396 100644 --- a/crates/proc-macro-srv/src/dylib.rs +++ b/crates/proc-macro-srv/src/dylib.rs @@ -1,7 +1,6 @@ //! Handles dynamic library loading for proc macro use std::{ - convert::TryInto, fmt, fs::File, io, diff --git a/crates/rust-analyzer/src/diagnostics/to_proto.rs b/crates/rust-analyzer/src/diagnostics/to_proto.rs index cff4bd7f66a..74689fd8757 100644 --- a/crates/rust-analyzer/src/diagnostics/to_proto.rs +++ b/crates/rust-analyzer/src/diagnostics/to_proto.rs @@ -512,7 +512,7 @@ fn clippy_code_description(code: Option<&str>) -> Option<lsp_types::CodeDescript #[cfg(test)] #[cfg(not(windows))] mod tests { - use std::{convert::TryInto, path::Path}; + use std::path::Path; use crate::{config::Config, global_state::GlobalState}; diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 7f4fa57fa1e..e7115b0732e 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs @@ -1386,7 +1386,7 @@ fn main() { #[test] #[cfg(target_os = "windows")] fn test_lowercase_drive_letter() { - use std::{convert::TryInto, path::Path}; + use std::path::Path; let url = url_from_abs_path(Path::new("C:\\Test").try_into().unwrap()); assert_eq!(url.to_string(), "file:///c:/Test"); diff --git a/crates/syntax/src/fuzz.rs b/crates/syntax/src/fuzz.rs index 256999fe09c..7c7a60d6299 100644 --- a/crates/syntax/src/fuzz.rs +++ b/crates/syntax/src/fuzz.rs @@ -2,10 +2,7 @@ //! //! We don't normally run fuzzying, so this is hopelessly bitrotten :( -use std::{ - convert::TryInto, - str::{self, FromStr}, -}; +use std::str::{self, FromStr}; use text_edit::Indel; diff --git a/lib/la-arena/src/lib.rs b/lib/la-arena/src/lib.rs index a3fe59e946e..50e8d06b660 100644 --- a/lib/la-arena/src/lib.rs +++ b/lib/la-arena/src/lib.rs @@ -6,7 +6,6 @@ use std::{ fmt, hash::{Hash, Hasher}, - iter::FromIterator, marker::PhantomData, ops::{Index, IndexMut, Range, RangeInclusive}, }; |
