-
Notifications
You must be signed in to change notification settings - Fork 273
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
Update lifetimes.md #372
Update lifetimes.md #372
Conversation
Get rid of the obviously wrong (and potentially confusing) double lifetime annotation. My guess as to the etiology is an errant copy-and-paste.
Hi, thanks for the PR! This doesn't look obviously wrong to me, so can you say more about what you think is wrong about it? This is intentionally not Rust syntax, and is intended as an illustration of desugaring. |
Thank you for taking a look.
With this explanation, it makes sense. Without it, it looked like a copy-and-paste slip-up to me. I think that's because there are no other examples (that I could find) where lifetime annotations appear twice in a de-sugaring. I have updated the PR to add a comment instead of deleting what I thought was an extraneous lifetime annotation. |
Add a comment that would have made the reading smoother for me, at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Update books ## nomicon 1 commits in 8e6aa3448515a0654e347b5e2510f1d4bc4d5a64..d880e6ac2acf133dce640da24b9fb692844f02d4 2022-08-15 15:36:13 -0700 to 2022-08-24 12:42:34 -0700 - Update lifetimes.md (rust-lang/nomicon#372) ## reference 2 commits in e647eb102890e8927f488bea12672b079eff8d9d..f62e93c28323ed9637d0a205a0c256498674a509 2022-08-16 11:35:27 -0700 to 2022-08-28 10:01:28 -0700 - Update examples of what implements `Termination` (rust-lang/reference#1256) - allow to quickly edit a page directly on github (rust-lang/reference#1254) ## book 7 commits in 42ca0ef484fcc8437a0682cee23abe4b7c407d52..0a5421ceb238357b3634fb75234eba4d1dad643c 2022-08-12 21:52:02 -0400 to 2022-08-28 19:51:04 -0400 - Add a missing line generated by 'cargo new' - Clarify ThreadPool-Worker analogy wording - Fixed incorrect mutex lock usage - Merge remote-tracking branch 'origin/pr/3314' - Put interactive book notice in a blockquote box to draw attention to it - Remove the word 'new' because someday it won't be new anymore - Merge remote-tracking branch 'origin/pr/3304' ## rustc-dev-guide 27 commits in d3daa1f..04892c1 2022-08-13 10:00:38 +0900 to 2022-08-29 20:07:51 +0200 - Fix the link to `Parser` struct - Remove a dangling link on "The `#[test]` attribute" - Update the stabilization guide to refer to the new placeholder system - Refine the lintstore section (rust-lang/rustc-dev-guide#1429) - typo - Updates text to refer to LLVM documentation. - Updates LLVM prereqs since upgrade to C++17. - we got 3 (rust-lang/rustc-dev-guide#1447) - A few corrections - Update some statements - correct typo in parallel-rustc.md - Correct some statements in parallel-rustc.md - update parallel-rustc.md - address review comment - make date-check more easy to use - update thir output (rust-lang/rustc-dev-guide#1445) - do not offer option to run code (rust-lang/rustc-dev-guide#1442) - fix quick-edit link (rust-lang/rustc-dev-guide#1441) - Document changes introduced by kind-less SessionDiagnostics - diagnostics: fix outdated use of string slugs (rust-lang/rustc-dev-guide#1436) - Add missing lifetime (rust-lang/rustc-dev-guide#1439) - more syntax fixes - fix incorrect #[note] syntax - Update slug style to use _ instead of - (rust-lang/rustc-dev-guide#1426) - remove incorrect info (rust-lang/rustc-dev-guide#1435) - fix lifetime name (rust-lang/rustc-dev-guide#1431) - Update the date reference around Git submodule bug (rust-lang/rustc-dev-guide#1430)
Update books ## nomicon 1 commits in 8e6aa3448515a0654e347b5e2510f1d4bc4d5a64..d880e6ac2acf133dce640da24b9fb692844f02d4 2022-08-15 15:36:13 -0700 to 2022-08-24 12:42:34 -0700 - Update lifetimes.md (rust-lang/nomicon#372) ## reference 2 commits in e647eb102890e8927f488bea12672b079eff8d9d..f62e93c28323ed9637d0a205a0c256498674a509 2022-08-16 11:35:27 -0700 to 2022-08-28 10:01:28 -0700 - Update examples of what implements `Termination` (rust-lang/reference#1256) - allow to quickly edit a page directly on github (rust-lang/reference#1254) ## book 7 commits in 42ca0ef484fcc8437a0682cee23abe4b7c407d52..0a5421ceb238357b3634fb75234eba4d1dad643c 2022-08-12 21:52:02 -0400 to 2022-08-28 19:51:04 -0400 - Add a missing line generated by 'cargo new' - Clarify ThreadPool-Worker analogy wording - Fixed incorrect mutex lock usage - Merge remote-tracking branch 'origin/pr/3314' - Put interactive book notice in a blockquote box to draw attention to it - Remove the word 'new' because someday it won't be new anymore - Merge remote-tracking branch 'origin/pr/3304' ## rustc-dev-guide 27 commits in d3daa1f28e169087becbc5e2b49ac91ca0405a44..04892c1a6fc145602ac7367945fda9d4ee83c9fb 2022-08-13 10:00:38 +0900 to 2022-08-29 20:07:51 +0200 - Fix the link to `Parser` struct - Remove a dangling link on "The `#[test]` attribute" - Update the stabilization guide to refer to the new placeholder system - Refine the lintstore section (rust-lang/rustc-dev-guide#1429) - typo - Updates text to refer to LLVM documentation. - Updates LLVM prereqs since upgrade to C++17. - we got 3 (rust-lang/rustc-dev-guide#1447) - A few corrections - Update some statements - correct typo in parallel-rustc.md - Correct some statements in parallel-rustc.md - update parallel-rustc.md - address review comment - make date-check more easy to use - update thir output (rust-lang/rustc-dev-guide#1445) - do not offer option to run code (rust-lang/rustc-dev-guide#1442) - fix quick-edit link (rust-lang/rustc-dev-guide#1441) - Document changes introduced by kind-less SessionDiagnostics - diagnostics: fix outdated use of string slugs (rust-lang/rustc-dev-guide#1436) - Add missing lifetime (rust-lang/rustc-dev-guide#1439) - more syntax fixes - fix incorrect #[note] syntax - Update slug style to use _ instead of - (rust-lang/rustc-dev-guide#1426) - remove incorrect info (rust-lang/rustc-dev-guide#1435) - fix lifetime name (rust-lang/rustc-dev-guide#1431) - Update the date reference around Git submodule bug (rust-lang/rustc-dev-guide#1430)
Update books ## nomicon 1 commits in 8e6aa3448515a0654e347b5e2510f1d4bc4d5a64..d880e6ac2acf133dce640da24b9fb692844f02d4 2022-08-15 15:36:13 -0700 to 2022-08-24 12:42:34 -0700 - Update lifetimes.md (rust-lang/nomicon#372) ## reference 2 commits in e647eb102890e8927f488bea12672b079eff8d9d..f62e93c28323ed9637d0a205a0c256498674a509 2022-08-16 11:35:27 -0700 to 2022-08-28 10:01:28 -0700 - Update examples of what implements `Termination` (rust-lang/reference#1256) - allow to quickly edit a page directly on github (rust-lang/reference#1254) ## book 7 commits in 42ca0ef484fcc8437a0682cee23abe4b7c407d52..0a5421ceb238357b3634fb75234eba4d1dad643c 2022-08-12 21:52:02 -0400 to 2022-08-28 19:51:04 -0400 - Add a missing line generated by 'cargo new' - Clarify ThreadPool-Worker analogy wording - Fixed incorrect mutex lock usage - Merge remote-tracking branch 'origin/pr/3314' - Put interactive book notice in a blockquote box to draw attention to it - Remove the word 'new' because someday it won't be new anymore - Merge remote-tracking branch 'origin/pr/3304' ## rustc-dev-guide 27 commits in d3daa1f28e169087becbc5e2b49ac91ca0405a44..04892c1a6fc145602ac7367945fda9d4ee83c9fb 2022-08-13 10:00:38 +0900 to 2022-08-29 20:07:51 +0200 - Fix the link to `Parser` struct - Remove a dangling link on "The `#[test]` attribute" - Update the stabilization guide to refer to the new placeholder system - Refine the lintstore section (rust-lang/rustc-dev-guide#1429) - typo - Updates text to refer to LLVM documentation. - Updates LLVM prereqs since upgrade to C++17. - we got 3 (rust-lang/rustc-dev-guide#1447) - A few corrections - Update some statements - correct typo in parallel-rustc.md - Correct some statements in parallel-rustc.md - update parallel-rustc.md - address review comment - make date-check more easy to use - update thir output (rust-lang/rustc-dev-guide#1445) - do not offer option to run code (rust-lang/rustc-dev-guide#1442) - fix quick-edit link (rust-lang/rustc-dev-guide#1441) - Document changes introduced by kind-less SessionDiagnostics - diagnostics: fix outdated use of string slugs (rust-lang/rustc-dev-guide#1436) - Add missing lifetime (rust-lang/rustc-dev-guide#1439) - more syntax fixes - fix incorrect #[note] syntax - Update slug style to use _ instead of - (rust-lang/rustc-dev-guide#1426) - remove incorrect info (rust-lang/rustc-dev-guide#1435) - fix lifetime name (rust-lang/rustc-dev-guide#1431) - Update the date reference around Git submodule bug (rust-lang/rustc-dev-guide#1430)
Get rid of the obviously wrong (and potentially confusing) double lifetime annotation. My guess as to the etiology is an errant copy-and-paste.