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

[wip] generic consts #5

Closed
wants to merge 7 commits into from
Closed

[wip] generic consts #5

wants to merge 7 commits into from

Conversation

fmease
Copy link
Owner

@fmease fmease commented Jun 10, 2023

No description provided.

@fmease fmease force-pushed the generic-consts branch 2 times, most recently from 0c39c9b to 554c26c Compare June 27, 2023 22:19
Repository owner locked and limited conversation to collaborators Jun 27, 2023
@fmease fmease force-pushed the generic-consts branch 4 times, most recently from bc7403d to 10de81b Compare July 2, 2023 22:49
@@ -50,7 +50,11 @@ impl<'tcx> LateLintPass<'tcx> for LargeConstArrays {
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
if_chain! {
if !item.span.from_expansion();
if let ItemKind::Const(hir_ty, _) = &item.kind;
if let ItemKind::Const(hir_ty, generics, _) = &item.kind;
// Since static items may not have generics, skip generic consts.
Copy link
Owner Author

Choose a reason for hiding this comment

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

Rephrase that

@@ -4420,7 +4491,9 @@ struct LifetimeCountVisitor<'a, 'b, 'tcx> {
impl<'ast> Visitor<'ast> for LifetimeCountVisitor<'_, '_, '_> {
fn visit_item(&mut self, item: &'ast Item) {
match &item.kind {
// @Question (minor, style) order
Copy link
Owner Author

Choose a reason for hiding this comment

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

Suggested change
// @Question (minor, style) order

yo, that should've been gone already by now!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant