Bump up rust to 2021 edition (#1430)

This commit is contained in:
SchwarzBier 2022-03-12 17:39:21 -05:00 committed by GitHub
parent 3c994fcdef
commit 97a8dfe71d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
55 changed files with 110 additions and 57 deletions

View File

@ -1,7 +1,8 @@
[package]
name = "avm"
version = "0.22.1"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[[bin]]
name = "avm"

View File

@ -2,7 +2,8 @@
name = "anchor-cli"
version = "0.22.1"
authors = ["armaniferrante <armaniferrante@gmail.com>"]
edition = "2018"
rust-version = "1.56"
edition = "2021"
[[bin]]
name = "anchor"

View File

@ -2,7 +2,8 @@
name = "anchor-client"
version = "0.22.1"
authors = ["Serum Foundation <foundation@projectserum.com>"]
edition = "2018"
rust-version = "1.56"
edition = "2021"
license = "Apache-2.0"
description = "Rust client for Anchor programs"

View File

@ -2,7 +2,8 @@
name = "example"
version = "0.1.0"
authors = ["Armani Ferrante <armaniferrante@gmail.com>"]
edition = "2018"
rust-version = "1.56"
edition = "2021"
[workspace]

View File

@ -2,7 +2,8 @@
name = "basic-0"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "basic-1"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "basic-2"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "puppet-master"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "puppet"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "basic-4"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -3,7 +3,8 @@ name = "anchor-lang"
version = "0.22.1"
authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
license = "Apache-2.0"
description = "Solana Sealevel eDSL"

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor attribute macro for instruction access control"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor attribute macro for defining an account"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor attribute macro for creating constant types"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor attribute macro for creating error types"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor attribute macro for defining an event"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Attribute for defining a program interface trait"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor attribute macro for defining a program"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Attribute for defining a program state struct"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor Derive macro for accounts"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
proc-macro = true

View File

@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
repository = "https://github.com/project-serum/anchor"
license = "Apache-2.0"
description = "Anchor syntax parsing and code generation tools"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[features]
init-if-needed = []

View File

@ -159,12 +159,12 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
#(#re_exports)*
#struct_doc
pub struct #name#generics {
pub struct #name #generics {
#(#account_struct_fields),*
}
#[automatically_derived]
impl#generics anchor_lang::ToAccountMetas for #name#generics {
impl #generics anchor_lang::ToAccountMetas for #name #generics {
fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<anchor_lang::solana_program::instruction::AccountMeta> {
let mut account_metas = vec![];
#(#account_struct_metas)*
@ -173,7 +173,7 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
}
#[automatically_derived]
impl<'info> anchor_lang::ToAccountInfos<'info> for #name#generics {
impl<'info> anchor_lang::ToAccountInfos<'info> for #name #generics {
fn to_account_infos(&self) -> Vec<anchor_lang::solana_program::account_info::AccountInfo<'info>> {
let mut account_infos = vec![];
#(#account_struct_infos)*

View File

@ -29,7 +29,7 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
quote! {
#[automatically_derived]
impl#impl_gen anchor_lang::ToAccountMetas for #name #ty_gen #where_clause{
impl #impl_gen anchor_lang::ToAccountMetas for #name #ty_gen #where_clause{
fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<anchor_lang::solana_program::instruction::AccountMeta> {
let mut account_metas = vec![];

View File

@ -2,7 +2,8 @@
name = "anchor-spl"
version = "0.22.1"
authors = ["Serum Foundation <foundation@projectserum.com>"]
edition = "2018"
rust-version = "1.56"
edition = "2021"
license = "Apache-2.0"
description = "CPI clients for SPL programs"

View File

@ -2,7 +2,8 @@
name = "bpf-upgradeable-state"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "cashiers-check"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "cfo"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "chat"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "composite"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "custom-coder"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "spl-token"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "errors"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "escrow"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "events"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "ido-pool"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "counter-auth"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "counter"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "lockup"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "registry"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "misc"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "misc2"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,7 +1,8 @@
[package]
name = "shared"
version = "0.1.0"
edition = "2018"
rust-version = "1.56"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -2,7 +2,8 @@
name = "multisig"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "pda-derivation"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "pyth"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "token-proxy"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "swap"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "system-accounts"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "sysvars"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "tictactoe"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,7 +1,8 @@
[package]
name = "shared"
version = "0.1.0"
edition = "2018"
rust-version = "1.56"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -2,7 +2,8 @@
name = "typescript"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -1,7 +1,8 @@
[package]
name = "shared"
version = "0.1.0"
edition = "2018"
rust-version = "1.56"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -2,7 +2,8 @@
name = "zero-copy"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]

View File

@ -2,7 +2,8 @@
name = "zero-cpi"
version = "0.1.0"
description = "Created with Anchor"
edition = "2018"
rust-version = "1.56"
edition = "2021"
[lib]
crate-type = ["cdylib", "lib"]