2020-01-08 08:05:31 -08:00
|
|
|
error[E0599]: no variant or associated item named `Baz` found for enum `Foo` in the current scope
|
2019-04-08 17:58:18 -04:00
|
|
|
--> $DIR/issue-28971.rs:7:18
|
2017-12-10 22:47:55 +03:00
|
|
|
|
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | enum Foo {
|
2022-07-01 16:47:26 -07:00
|
|
|
| -------- variant or associated item `Baz` not found for this enum
|
2017-12-10 22:47:55 +03:00
|
|
|
...
|
2018-02-23 03:42:32 +03:00
|
|
|
LL | Foo::Baz(..) => (),
|
2024-07-11 16:23:03 +00:00
|
|
|
| ^^^ variant or associated item not found in `Foo`
|
|
|
|
|
|
|
|
|
help: there is a variant with a similar name
|
|
|
|
|
|
|
|
|
LL | Foo::Bar(..) => (),
|
|
|
|
| ~~~
|
2017-12-10 22:47:55 +03:00
|
|
|
|
2024-02-01 22:45:00 +00:00
|
|
|
error[E0596]: cannot borrow `f` as mutable, as it is not declared as mutable
|
|
|
|
--> $DIR/issue-28971.rs:15:5
|
|
|
|
|
|
|
|
|
LL | f();
|
|
|
|
| ^ cannot borrow as mutable
|
|
|
|
|
|
|
|
|
help: consider changing this to be mutable
|
|
|
|
|
|
|
|
|
LL | fn foo<F>(mut f: F) where F: FnMut() {
|
|
|
|
| +++
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2017-12-10 22:47:55 +03:00
|
|
|
|
2024-02-01 22:45:00 +00:00
|
|
|
Some errors have detailed explanations: E0596, E0599.
|
|
|
|
For more information about an error, try `rustc --explain E0596`.
|