-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
returning an unconstrained, bound region should be an error #2478
Copy link
Copy link
Closed
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-lifetimesArea: Lifetimes / regionsArea: Lifetimes / regionsA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.Area: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
If you have a function like this:
we should report an error. The only thing you could legally do in that case is fail or return a static item, so you miight as well write:
This sounds like a good lint warning/error.