Skip to content

Overflowing literal lint is silenced in range literals in loops on nightly #60459

Closed

Description

@varkor
fn main() {
    for _ in 0..256u8 {} // should warn
}

since #60330.

Activity

  1. added
    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.
    on May 1, 2019
  2. self-assigned this
    on May 1, 2019
  3. varkor commented on May 1, 2019

    @varkor
    ContributorAuthor

    It is hitting the err.emit() here:

    err.emit();

    So I'm not quite sure why the error isn't being emitted yet.

  4. added
    C-bugCategory: This is a bug.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on May 2, 2019
  5. ehuss commented on May 2, 2019

    @ehuss
    Contributor

    It appears to be hitting this line of code which is cancelling the diagnostic:

    err.cancel()

  6. pnkfelix commented on May 23, 2019

    @pnkfelix
    Contributor

    this appears to be a stable-to-beta regression (playpen)

  7. pnkfelix commented on May 23, 2019

    @pnkfelix
    Contributor

    triage: P-high. Assigning to self.

  8. self-assigned this
    on May 23, 2019
  9. estebank commented on May 23, 2019

    @estebank
    Contributor

    We need to change

    ExpnFormat::CompilerDesugaring(_) => return true, // well, it's "external"
    to not consider desugarings coming from for loops as external. If that has regressions in our test suite, then we can add a new desugaring kind to differentiate between different parts of the for loop desugaring and target it further, but I do not expect that to be needed.

  10. varkor commented on May 23, 2019

    @varkor
    ContributorAuthor

    @pnkfelix: I've opened #61098 with a fix, based on @estebank's comment.

  11. added a commit that references this issue on May 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.P-highHigh priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions