Skip to content

cannot find crate #61463

Closed
Closed

Description

@svenschmidt75

Rust compiler:

rustup show
Default host: x86_64-unknown-linux-gnu

stable-x86_64-unknown-linux-gnu (default)
rustc 1.35.0 (3c235d5 2019-05-20)

Project: https://github.com/svenschmidt75/Rust, commit 78b9a8fd4740bbf8630cc0ade48346a5387f2075, authored 6/2/2019 @ 8:58 AM

File model.rs, line 139,

...
                    mb.a[0] = training_sample.input_activations.clone();
                    self.feedforward(mb);
                    self.backprop(mb, cost_function, known_classification);
                }
                let (dws, dbs) = self.calculate_derivatives(&mbs[..], lambda);
                self.apply_momentum(eta, rho, dws, dbs);
                self.update_network();
            }
...

Replace eta with meta and compile. The error refers to a missing crate which I found odd:

   Compiling ann v0.1.0 (/home/svenschmidt75/Develop/Rust/NeuralNetwork/lib/ann)
error[E0463]: can't find crate for `meta`
   --> lib/ann/src/ann/model.rs:139:37
    |
139 |                 self.apply_momentum(meta, rho, dws, dbs);
    |                                     ^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `ann`.
warning: build failed, waiting for other jobs to finish...
error[E0463]: can't find crate for `meta`
   --> lib/ann/src/ann/model.rs:139:37
    |
139 |                 self.apply_momentum(meta, rho, dws, dbs);
    |                                     ^^^^ can't find crate

error: aborting due to previous error

For more information about this error, try `rustc --explain E0463`.
error: Could not compile `ann`.

To learn more, run the command again with --verbose.

Process finished with exit code 101

Activity

  1. jonas-schievink commented on Jun 2, 2019

    @jonas-schievink
    Contributor

    Reproduction:

    let xyz = meta;
    

    (ie. this happens to any occurrence of a nonexistent local meta)

    Expected outcome would be error[E0425]: cannot find value `meta` in this scope

  2. added
    A-diagnosticsArea: Messages for errors, warnings, and lints
    C-bugCategory: This is a bug.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Jun 2, 2019
  3. Centril commented on Jun 2, 2019

    @Centril
    Contributor

    Not a bug. See #54116. The crate meta is reserved in the extern prelude in case we want to use it in the future for proc macros and so on.

  4. added
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    on Jun 11, 2020
  5. estebank commented on Sep 28, 2025

    @estebank
    Contributor

    Current output:

    error[E0425]: cannot find value `meta` in this scope
     --> src/main.rs:2:15
      |
    2 |     let xyz = meta;
      |               ^^^^ not found in this scope
    
  6. added
    E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.
    on Sep 28, 2025
  7. KaiTomotake commented on Jan 19, 2026

    @KaiTomotake
    Contributor

    @rustbot claim

  8. added a commit that references this issue on Jan 19, 2026
    0833ace
  9. added a commit that references this issue on Jan 20, 2026
    95a4661
  10. added 2 commits that reference this issue on Jan 20, 2026
    cf6744d
    e73834d
  11. added a commit that references this issue on Aug 7, 2026
    bf08b08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions