Auto merge of #10000 - alexcrichton:upgrade-edition, r=Eh2406

Upgrade Cargo to the 2021 edition

While I was poking around in the manifests I also went ahead and removed the `authors` entries since at least the one for Cargo itself is quite outdated and Cargo otherwise doesn't use these any more.
This commit is contained in:
bors 2021-10-23 18:08:27 +00:00
commit dc6a1d5304
22 changed files with 29 additions and 37 deletions

View File

@ -68,7 +68,9 @@ jobs:
# Deny warnings on CI to avoid warnings getting into the codebase. # Deny warnings on CI to avoid warnings getting into the codebase.
- run: cargo test --features 'deny-warnings' - run: cargo test --features 'deny-warnings'
- run: cargo test --features 'deny-warnings' -p cargo-test-support - run: cargo test --features 'deny-warnings' --manifest-path crates/cargo-test-support/Cargo.toml
env:
CARGO_TARGET_DIR: target
- run: cargo test -p cargo-platform - run: cargo test -p cargo-platform
- run: cargo test -p cargo-util - run: cargo test -p cargo-util
- run: cargo test --manifest-path crates/mdman/Cargo.toml - run: cargo test --manifest-path crates/mdman/Cargo.toml
@ -113,6 +115,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- run: rustup update nightly && rustup default nightly - run: rustup update nightly && rustup default nightly
- run: rustup update stable
- run: rustup component add rust-docs - run: rustup component add rust-docs
- run: ci/validate-man.sh - run: ci/validate-man.sh
# This requires rustfmt, use stable. # This requires rustfmt, use stable.

View File

@ -1,10 +1,7 @@
[package] [package]
name = "cargo" name = "cargo"
version = "0.59.0" version = "0.59.0"
edition = "2018" edition = "2021"
authors = ["Yehuda Katz <wycats@gmail.com>",
"Carl Lerche <me@carllerche.com>",
"Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
homepage = "https://crates.io" homepage = "https://crates.io"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"

View File

@ -1,7 +1,7 @@
[package] [package]
name = "benchsuite" name = "benchsuite"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
homepage = "https://github.com/rust-lang/cargo" homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"

View File

@ -1,7 +1,7 @@
[package] [package]
name = "capture" name = "capture"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
description = "Tool for capturing a real-world workspace for benchmarking." description = "Tool for capturing a real-world workspace for benchmarking."

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-platform" name = "cargo-platform"
version = "0.1.2" version = "0.1.2"
authors = ["The Cargo Project Developers"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
homepage = "https://github.com/rust-lang/cargo" homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-test-macro" name = "cargo-test-macro"
version = "0.1.0" version = "0.1.0"
authors = ["Jethro Beekman <jethro@fortanix.com>"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
homepage = "https://github.com/rust-lang/cargo" homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"

View File

@ -1,9 +1,8 @@
[package] [package]
name = "cargo-test-support" name = "cargo-test-support"
version = "0.1.0" version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
edition = "2018" edition = "2021"
[lib] [lib]
doctest = false doctest = false
@ -24,3 +23,6 @@ tar = { version = "0.4.18", default-features = false }
termcolor = "1.1.2" termcolor = "1.1.2"
toml = "0.5.7" toml = "0.5.7"
url = "2.2.2" url = "2.2.2"
[features]
deny-warnings = []

View File

@ -5,6 +5,7 @@
#![allow(clippy::all)] #![allow(clippy::all)]
#![warn(clippy::needless_borrow)] #![warn(clippy::needless_borrow)]
#![warn(clippy::redundant_clone)] #![warn(clippy::redundant_clone)]
#![cfg_attr(feature = "deny-warnings", deny(warnings))]
use std::env; use std::env;
use std::ffi::OsStr; use std::ffi::OsStr;

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-util" name = "cargo-util"
version = "0.1.1" version = "0.1.1"
authors = ["The Cargo Project Developers"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
homepage = "https://github.com/rust-lang/cargo" homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"

View File

@ -1,8 +1,7 @@
[package] [package]
name = "crates-io" name = "crates-io"
version = "0.33.0" version = "0.33.0"
edition = "2018" edition = "2021"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"
description = """ description = """

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-credential-1password" name = "cargo-credential-1password"
version = "0.1.0" version = "0.1.0"
authors = ["The Rust Project Developers"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens in a 1password vault." description = "A Cargo credential process that stores tokens in a 1password vault."

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-credential-gnome-secret" name = "cargo-credential-gnome-secret"
version = "0.1.0" version = "0.1.0"
authors = ["The Rust Project Developers"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens with GNOME libsecret." description = "A Cargo credential process that stores tokens with GNOME libsecret."

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-credential-macos-keychain" name = "cargo-credential-macos-keychain"
version = "0.1.0" version = "0.1.0"
authors = ["The Rust Project Developers"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens in a macOS keychain." description = "A Cargo credential process that stores tokens in a macOS keychain."

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-credential-wincred" name = "cargo-credential-wincred"
version = "0.1.0" version = "0.1.0"
authors = ["The Rust Project Developers"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens with Windows Credential Manager." description = "A Cargo credential process that stores tokens with Windows Credential Manager."

View File

@ -1,8 +1,7 @@
[package] [package]
name = "cargo-credential" name = "cargo-credential"
version = "0.1.0" version = "0.1.0"
authors = ["The Rust Project Developers"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/cargo" repository = "https://github.com/rust-lang/cargo"
description = "A library to assist writing Cargo credential helpers." description = "A library to assist writing Cargo credential helpers."

View File

@ -1,8 +1,7 @@
[package] [package]
name = "mdman" name = "mdman"
version = "0.1.0" version = "0.1.0"
authors = ["Eric Huss"] edition = "2021"
edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
description = "Creates a man page page from markdown." description = "Creates a man page page from markdown."

View File

@ -1,7 +1,6 @@
[package] [package]
name = "resolver-tests" name = "resolver-tests"
version = "0.1.0" version = "0.1.0"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]

View File

@ -2,7 +2,7 @@
name = "semver-check" name = "semver-check"
version = "0.1.0" version = "0.1.0"
authors = ["Eric Huss"] authors = ["Eric Huss"]
edition = "2018" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -33,7 +33,7 @@ This is all we need to get started. First, lets check out `Cargo.toml`:
[package] [package]
name = "hello_world" name = "hello_world"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
[dependencies] [dependencies]
``` ```

View File

@ -29,7 +29,7 @@ Lets take a closer look at `Cargo.toml`:
[package] [package]
name = "hello_world" name = "hello_world"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
[dependencies] [dependencies]

View File

@ -35,7 +35,7 @@ crates:
[package] [package]
name = "hello_world" name = "hello_world"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
[dependencies] [dependencies]
time = "0.1.12" time = "0.1.12"

View File

@ -147,7 +147,7 @@ Pretty similar to before! Next, the manifest:
[package] [package]
name = "hello-world-from-c" name = "hello-world-from-c"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
``` ```
For now were not going to use any build dependencies, so lets take a look at For now were not going to use any build dependencies, so lets take a look at
@ -297,7 +297,7 @@ with `pkg-config` installed. Let's start by setting up the manifest:
[package] [package]
name = "libz-sys" name = "libz-sys"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
links = "z" links = "z"
[build-dependencies] [build-dependencies]
@ -384,7 +384,7 @@ Here's an example:
[package] [package]
name = "zuser" name = "zuser"
version = "0.1.0" version = "0.1.0"
edition = "2018" edition = "2021"
[dependencies] [dependencies]
libz-sys = "1.0.25" libz-sys = "1.0.25"