Skip to content

Commit 56fbf5d

Browse files
bors[bot]Veykril
andauthored
Merge #10607
10607: Migrate to edition 2021 r=Veykril a=Veykril Co-authored-by: Lukas Wirth <[email protected]>
2 parents 6aeeb4e + 1294bfc commit 56fbf5d

File tree

56 files changed

+48
-71
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+48
-71
lines changed

crates/base_db/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "base_db"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/cfg/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "cfg"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/flycheck/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "flycheck"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/hir/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "hir"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/hir_def/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "hir_def"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/hir_def/src/attr.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
//! A higher level attributes based on TokenTree, with also some shortcuts.
22
3-
use std::{
4-
convert::{TryFrom, TryInto},
5-
fmt,
6-
hash::Hash,
7-
ops,
8-
sync::Arc,
9-
};
3+
use std::{fmt, hash::Hash, ops, sync::Arc};
104

115
use base_db::CrateId;
126
use cfg::{CfgExpr, CfgOptions};

crates/hir_expand/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "hir_expand"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/hir_ty/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "hir_ty"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/ide/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "ide"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/ide/src/doc_links.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
33
mod intra_doc_links;
44

5-
use std::convert::{TryFrom, TryInto};
6-
75
use either::Either;
86
use pulldown_cmark::{BrokenLink, CowStr, Event, InlineStr, LinkType, Options, Parser, Tag};
97
use pulldown_cmark_to_cmark::{cmark_with_options, Options as CmarkOptions};

crates/ide/src/join_lines.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
use std::convert::TryFrom;
2-
31
use ide_assists::utils::extract_trivial_expression;
42
use ide_db::helpers::node_ext::expr_as_name_ref;
53
use itertools::Itertools;

crates/ide_assists/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "ide_assists"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/ide_completion/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "ide_completion"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/ide_db/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "ide_db"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/ide_diagnostics/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "ide_diagnostics"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/ide_ssr/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.0.0"
44
description = "Structural search and replace of Rust code"
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/rust-analyzer/rust-analyzer"
7-
edition = "2018"
7+
edition = "2021"
88

99
[lib]
1010
doctest = false

crates/limit/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
66
authors = ["rust-analyzer developers"]
7-
edition = "2018"
7+
edition = "2021"
88

99
[features]
1010
tracking = []

crates/mbe/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "mbe"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/parser/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "parser"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/paths/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "paths"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/paths/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
//! relative paths.
33
use std::{
44
borrow::Borrow,
5-
convert::{TryFrom, TryInto},
65
ffi::OsStr,
76
ops,
87
path::{Component, Path, PathBuf},

crates/proc_macro_api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "proc_macro_api"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/proc_macro_srv/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "proc_macro_srv"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/proc_macro_test/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "proc_macro_test"
33
version = "0.0.0"
44
license = "MIT OR Apache-2.0"
5-
edition = "2018"
5+
edition = "2021"
66
publish = false
77

88
[lib]

crates/proc_macro_test/imp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "proc_macro_test_impl"
33
version = "0.0.0"
44
license = "MIT OR Apache-2.0"
5-
edition = "2018"
5+
edition = "2021"
66
publish = false
77

88
[lib]

crates/profile/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "profile"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/project_model/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "project_model"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/project_model/src/cargo_workspace.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! See [`CargoWorkspace`].
22
3-
use std::convert::{TryFrom, TryInto};
43
use std::iter;
54
use std::path::PathBuf;
65
use std::{ops, process::Command};

crates/project_model/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ mod build_scripts;
2828
mod tests;
2929

3030
use std::{
31-
convert::{TryFrom, TryInto},
3231
fs::{self, read_dir, ReadDir},
3332
io,
3433
process::Command,

crates/project_model/src/manifest_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! See [`ManifestPath`].
2-
use std::{convert::TryFrom, ops, path::Path};
2+
use std::{ops, path::Path};
33

44
use paths::{AbsPath, AbsPathBuf};
55

crates/project_model/src/sysroot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! but we can't process `.rlib` and need source code instead. The source code
55
//! is typically installed with `rustup component add rust-src` command.
66
7-
use std::{convert::TryFrom, env, fs, iter, ops, path::PathBuf, process::Command};
7+
use std::{env, fs, iter, ops, path::PathBuf, process::Command};
88

99
use anyhow::{format_err, Result};
1010
use la_arena::{Arena, Idx};

crates/project_model/src/workspace.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//! metadata` or `rust-project.json`) into representation stored in the salsa
33
//! database -- `CrateGraph`.
44
5-
use std::{collections::VecDeque, convert::TryFrom, fmt, fs, process::Command};
5+
use std::{collections::VecDeque, fmt, fs, process::Command};
66

77
use anyhow::{format_err, Context, Result};
88
use base_db::{

crates/rust-analyzer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = "A language server for the Rust programming language"
77
documentation = "https://rust-analyzer.github.io/manual.html"
88
license = "MIT OR Apache-2.0"
99
autobins = false
10-
edition = "2018"
10+
edition = "2021"
1111

1212
[lib]
1313
doctest = false

crates/rust-analyzer/src/bin/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
mod logger;
55
mod rustc_wrapper;
66

7-
use std::{convert::TryFrom, env, fs, path::Path, process};
7+
use std::{env, fs, path::Path, process};
88

99
use lsp_server::Connection;
1010
use project_model::ProjectManifest;

crates/rust-analyzer/src/from_proto.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
//! Conversion lsp_types types to rust-analyzer specific ones.
2-
use std::convert::TryFrom;
3-
42
use ide::{Annotation, AnnotationKind, AssistKind, LineCol, LineColUtf16};
53
use ide_db::base_db::{FileId, FilePosition, FileRange};
64
use syntax::{TextRange, TextSize};

crates/rust-analyzer/src/handlers.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//! `ide` crate.
44
55
use std::{
6-
convert::TryFrom,
76
io::Write as _,
87
process::{self, Stdio},
98
};

crates/rust-analyzer/src/integrated_benchmarks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! in release mode in VS Code. There's however "Rust Analyzer: Copy Run Command Line"
1111
//! which you can use to paste the command in terminal and add `--release` manually.
1212
13-
use std::{convert::TryFrom, sync::Arc};
13+
use std::sync::Arc;
1414

1515
use ide::{Change, CompletionConfig, FilePosition, TextSize};
1616
use ide_db::helpers::{

crates/rust-analyzer/tests/slow-tests/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ fn test_format_document_2018() {
350350
[package]
351351
name = "foo"
352352
version = "0.0.0"
353-
edition = "2018"
353+
edition = "2021"
354354
355355
//- /src/lib.rs
356356
mod bar;
@@ -799,7 +799,7 @@ fn resolve_proc_macro() {
799799
[package]
800800
name = "foo"
801801
version = "0.0.0"
802-
edition = "2018"
802+
edition = "2021"
803803
[dependencies]
804804
bar = {path = "../bar"}
805805
@@ -818,7 +818,7 @@ fn main() {
818818
[package]
819819
name = "bar"
820820
version = "0.0.0"
821-
edition = "2018"
821+
edition = "2021"
822822
823823
[lib]
824824
proc-macro = true

crates/sourcegen/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "sourcegen"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/stdx/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stdx"
33
version = "0.0.0"
44
description = "TBD"
55
license = "MIT OR Apache-2.0"
6-
edition = "2018"
6+
edition = "2021"
77

88
[lib]
99
doctest = false

crates/syntax/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.0.0"
44
description = "Comment and whitespace preserving parser for the Rust language"
55
license = "MIT OR Apache-2.0"
66
repository = "https://github.com/rust-analyzer/rust-analyzer"
7-
edition = "2018"
7+
edition = "2021"
88

99
[lib]
1010
doctest = false

crates/syntax/fuzz/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
name = "syntax-fuzz"
44
version = "0.0.1"
55
publish = false
6-
edition = "2018"
6+
edition = "2021"
77

88
[package.metadata]
99
cargo-fuzz = true

crates/syntax/src/ast/token_ext.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
//! There are many AstNodes, but only a few tokens, so we hand-write them here.
22
3-
use std::{
4-
borrow::Cow,
5-
convert::{TryFrom, TryInto},
6-
};
3+
use std::borrow::Cow;
74

85
use rustc_lexer::unescape::{unescape_literal, Mode};
96

0 commit comments

Comments
 (0)