Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find crate #61463

Open
svenschmidt75 opened this issue Jun 2, 2019 · 2 comments
Open

cannot find crate #61463

svenschmidt75 opened this issue Jun 2, 2019 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@svenschmidt75
Copy link

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
@jonas-schievink
Copy link
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

@jonas-schievink jonas-schievink added A-diagnostics Area: Messages for errors, warnings, and lints C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 2, 2019
@Centril Centril removed the C-bug Category: This is a bug. label Jun 2, 2019
@Centril
Copy link
Contributor

Centril commented Jun 2, 2019

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.

@crlf0710 crlf0710 added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants