-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo example1 page 11 #10272
Comments
What research have you done? Why do you think this is a problem with |
I am a beginner. I was following the guide.Step 1 .. Step2 ... step3
Step two was to dl and run the rustc.Step 3 was to use cargo.When the problem occurred, I just did the report.
BTW, I am really just starting with Rust, after 20 years of C.
I will never work in rust, except for some self-created project.
Regards
Leslie
Leslie Satenstein
Montréal Québec, Canada
On Saturday, January 8, 2022, 01:27:30 p.m. EST, Jacob Finkelman ***@***.***> wrote:
What research have you done? Why do you think this is a problem with cargo as opposed to a problem with regex?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Welcome to the community! I'm sorry you're having trouble. Which guide were you following? |
The book from the website.
Regards
Leslie
Leslie Satenstein
Montréal Québec, Canada
On Monday, January 10, 2022, 07:05:57 p.m. EST, Jacob Finkelman ***@***.***> wrote:
Welcome to the community! I'm sorry you're having trouble.
Which guide were you following?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
by "the book" do you mean "The Rust Programming Language"? If so I don't have a print copy of the current edition so do not know what is on page 11.
I am guessing you are referring to https://doc.rust-lang.org/book/ch01-03-hello-cargo.html but that no where mentions regex. If you are having a problem with the book it is maintained at https://github.com/rust-lang/book Cargo is a package manager, we can not be responsible for keeping all rust code working even when the code is build with Cargo. |
@Eh2406 I think they are referring to https://doc.rust-lang.org/cargo/guide/working-on-an-existing-project.html @lsatenstein Thanks for opening this issue! I think it is not unusual for projects to start to have warnings with newer versions of the compiler. I believe this particular issue was introduced by rust-lang/rust#85200. Indeed those fields appear to be unused. I don't have time to try to develop a PR to fix it, but if you want to write an issue at https://github.com/rust-lang/regex, that would be helpful. Or, if you are feeling adventurous, you can work on a PR to fix the warnings. I'm going to close, as I think the example in the documentation is fine. Real-world projects will have warnings like this, and I don't think it is anything to be particularly concerned about. I'm going to close as this is more of an issue with the regex project. |
Thank you all for the prompt response. I am doing my frst pass through Rustland. On the second pass, I will do the deep learning and on the third pass, I will write some code that I will share. Again thank you!! |
If you are wondering why 3 passes to learn, it comes from my teaching / learning experience. |
Problem
First example that is supposed to compile cleanly
$ git clone https://github.com/rust-lang/regex.git
$ cd regex
$ cargo build
Compiling regex v1.5.0 (file:///path/to/package/regex)
leslie@Fed35 ~$ cd regex/
leslie@Fed35 regex$ cargo build
GOT
Updating crates.io index
Compiling memchr v2.4.1
Compiling regex-syntax v0.6.25 (/home/leslie/regex/regex-syntax)
Compiling aho-corasick v0.7.18
warning: field is never read:
printer
--> regex-syntax/src/ast/print.rs:66:5
|
66 | printer: &'p mut Printer,
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= note:
#[warn(dead_code)]
on by defaultwarning: field is never read:
printer
--> regex-syntax/src/hir/print.rs:74:5
|
74 | printer: &'p mut Printer,
| ^^^^^^^^^^^^^^^^^^^^^^^^
Compiling regex v1.5.4 (/home/leslie/regex)
warning:
regex-syntax
(lib) generated 2 warningsFinished dev [unoptimized + debuginfo] target(s) in 5.10s
Steps
refer to listing
Possible Solution(s)
Please correct syntax errors so cloned example compiles cleanly
Notes
No response
Version
The text was updated successfully, but these errors were encountered: