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

Refine the lintstore section #1429

Merged
merged 8 commits into from
Aug 27, 2022
Merged

Refine the lintstore section #1429

merged 8 commits into from
Aug 27, 2022

Conversation

tshepang
Copy link
Member

@tshepang tshepang commented Aug 14, 2022

cc #1414

@tshepang
Copy link
Member Author

tshepang commented Aug 14, 2022

@JohnTitor I do not understand the date-check sentence, so please bump it if it's still current (and maybe explain it some more).

Here it is:

As of February 2022, we lint against direct declarations without the use of the macro today (although this may change in the future, as the macro is somewhat unwieldy to add new fields to, like all macros).

There are two parts to the linting mechanism within the compiler: lints and
lint passes. Unfortunately, a lot of the documentation we have refers to both
of these as just "lints."

First, we have the lint declarations themselves: this is where the name and
default lint level and other metadata come from. These are normally defined by
way of the [`declare_lint!`] macro, which boils down to a static with type
`&rustc_session::lint::Lint`.
`&rustc_lint::Lint`.
Copy link
Member

Choose a reason for hiding this comment

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

It'd be better to link to the nightly rustc doc so we can see if it's moved as a link checker failure. Also, it should be on rustc_lint_defs, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh kool, didn't think of link checker.
Also, did not notice that rust_lint::Lint is a re-export... thanks.

@JohnTitor
Copy link
Member

@JohnTitor I do not understand the date-check sentence, so please bump it if it's still current (and maybe explain it some more).

Here it is:

As of February 2022, we lint against direct declarations without the use of the macro today (although this may change in the future, as the macro is somewhat unwieldy to add new fields to, like all macros).

I think the "we lint~" part and the "although this~" part talk about different things. The first says linting by rustc doesn't work on macros. The second says we use the declare_lint macro, but it may be changed in the future. The original paragraph is here: https://github.com/rust-lang/rustc-dev-guide/pull/476/files#diff-8f8ad089b3a6deea75fb8bc35716ff0b43bb6bfaf16e639afac64ed033a8ef37R16-R20

The date reference is for the first, so I think the situation still continues and we could just update the date but we could also improve the wording, I also think it's kinda confusing.

@JohnTitor JohnTitor added the S-waiting-on-author Status: this PR is waiting for additional action by the OP label Aug 17, 2022
@tshepang
Copy link
Member Author

that seems to conflict with what is written there, but I pushed the update with the new date regardless

@JohnTitor
Copy link
Member

I mean, we should do rewording something like:

First, we have the lint declarations themselves: this is where the name and default lint level and other metadata come from. These are normally defined by way of the [declare_lint!](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_session/macro.declare_lint.html) macro, which boils down to a static with type [&rustc_lint_defs::Lint](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint_defs/struct.Lint.html) (although this may change in the future, as the macro is somewhat unwieldy to add new fields to, like all macros).

As of Aug 2022, we lint against direct declarations without the use of the macro.

@tshepang
Copy link
Member Author

@JohnTitor I pushed

@JohnTitor
Copy link
Member

Thanks!

@JohnTitor JohnTitor changed the title lintstore nits Refine the lintstore section Aug 27, 2022
@JohnTitor JohnTitor merged commit b5a632f into rust-lang:master Aug 27, 2022
JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 30, 2022
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)
@anirudh24seven
Copy link
Contributor

I think 7b5c503 did not remove the previous paragraph while adding the new paragraph. Raising a PR to remove the near-duplicate paragraph.

anirudh24seven added a commit to anirudh24seven/rustc-dev-guide that referenced this pull request Dec 3, 2022
Removing outdated paragraph that was improved in rust-lang#1429
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 20, 2024
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)
RalfJung pushed a commit to RalfJung/rust-analyzer that referenced this pull request Apr 27, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: this PR is waiting for additional action by the OP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants