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

Small fixes to primitive_types6.rs #561

Merged
merged 2 commits into from
Oct 14, 2020
Merged

Small fixes to primitive_types6.rs #561

merged 2 commits into from
Oct 14, 2020

Conversation

notmatt
Copy link

@notmatt notmatt commented Oct 14, 2020

It appears that #548 (thanks for the new test!) introduced a parse error and warning when the actual exercise is completed correctly. These commits correct the parse error (missing comma) and remove the potentially distracting unused doc comment warning.

Output when the let second = ???; is corrected:

⚠️  Compiling of exercises/primitive_types/primitive_types6.rs failed! Please try again. Here's the output:
error: no rules expected the token `"This is not the 2nd number in the tuple!"`
  --> exercises/primitive_types/primitive_types6.rs:15:9
   |
14 |     assert_eq!(2, second
   |                         - help: missing comma here
15 |         "This is not the 2nd number in the tuple!")
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no rules expected this token in macro call

warning: unused doc comment
  --> exercises/primitive_types/primitive_types6.rs:11:5
   |
11 |     /// Replace below ??? with the tuple indexing syntax.
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 |     let second = numbers.1;
   |     ----------------------- rustdoc does not generate documentation for statements
   |
   = note: `#[warn(unused_doc_comments)]` on by default

error: aborting due to previous error; 1 warning emitted

@shadows-withal shadows-withal mentioned this pull request Oct 14, 2020
Copy link
Member

@shadows-withal shadows-withal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@shadows-withal shadows-withal merged commit f38f42f into rust-lang:main Oct 14, 2020
@darnuria
Copy link
Contributor

darnuria commented Oct 14, 2020

Whops it's my fault! thanks for your sharp eyes, think I got distracted since it was the first time I used the github review add functionality will be more careful next time! :D

@notmatt
Copy link
Author

notmatt commented Oct 14, 2020 via email

ppp3 pushed a commit to ppp3/rustlings that referenced this pull request May 23, 2022
dmoore04 pushed a commit to dmoore04/rustlings that referenced this pull request Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants