-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
non_local_definitions common issues: impl for &Local, From<Local> for Global, ... #121621
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-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-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.I-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.L-non_local_definitionsLint: non_local_definitionsLint: non_local_definitionsT-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-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-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.I-types-nominatedNominated for discussion during a types team meeting.Nominated for discussion during a types team meeting.L-non_local_definitionsLint: non_local_definitionsLint: non_local_definitionsT-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
I wonder whether the following code should be triggering
non_local_definitions. It currently does and I think it's a bug:A real-world occurrence can be seen in https://github.com/serde-rs/json/blob/e1b3a6d8a161ff5ec4865b487d148c17d0188e3e/tests/test.rs#L2334-L2346.
In general #[fundamental] exists to allow what would otherwise be a coherence violation, and it would make sense for the same exception to be applied here for the non_local_definitions lint.