Skip to main content
added 80 characters in body
Source Link
leotron
  • 157
  • 8

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

I get no errors If I switch to version 0.24.2 and repeat the steps above, but I want to use 0.26.0. How can I solve the error above?

Some additional info:

  • OS: macOS Ventura 13.1
  • rustc version: 1.66.0

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

I get no errors If I switch to version 0.24.2 and repeat the steps above, but I want to use 0.26.0. How can I solve the error above?

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

I get no errors If I switch to version 0.24.2 and repeat the steps above, but I want to use 0.26.0. How can I solve the error above?

Some additional info:

  • OS: macOS Ventura 13.1
  • rustc version: 1.66.0
made it clearer that I'm using the correct anchor version when running anchor build
Source Link
leotron
  • 157
  • 8

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

VersionI get no errors If I switch to version 0.24.2 worksand repeat the steps above, but I want to use 0.26.0. How can I solve the error above?

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

Version 0.24.2 works, but I want to use 0.26.0. How can I solve the error above?

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

I get no errors If I switch to version 0.24.2 and repeat the steps above, but I want to use 0.26.0. How can I solve the error above?

add more details
Source Link
leotron
  • 157
  • 8

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

Version 0.24.2 works, but I want to use 0.26.0. How can I solve the error above?

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

Version 0.24.2 works, but I want to use 0.26.0. How can I solve the error above?

Using anchor version 0.26.0. Steps I took:

  1. anchor init test && cd test
  2. anchor build

Result:

error[E0425]: cannot find function `is` in this scope

I did not make any changes to anything generated by anchor build. This is the default code:

use anchor_lang::prelude::*;

declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");

#[program]
pub mod test {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize {}

This is the default Cargo.toml file:

[package]
name = "test"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "test"

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.26.0"

Version 0.24.2 works, but I want to use 0.26.0. How can I solve the error above?

Source Link
leotron
  • 157
  • 8
Loading