Rollup merge of #139345 - smoelius:into-iter-stability, r=lcnr
Extend `QueryStability` to handle `IntoIterator` implementations This PR extends the `rustc::potential_query_instability` lint to check values passed as `IntoIterator` implementations. Full disclosure: I want the lint to warn about this line (please see #138871 for why):aa8f0fd716/src/librustdoc/json/mod.rs (L261)However, the lint warns about several other lines as well. Final note: the functions `get_callee_generic_args_and_args` and `get_input_traits_and_projections` were copied directly from [Clippy's source code](4fd8c04da0/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs (L445-L496)).
This commit is contained in:
@@ -180,6 +180,7 @@ fn parse_rust_feature_flag<'a>(
|
||||
while let Some(new_feature) = new_features.pop() {
|
||||
if features.insert(new_feature) {
|
||||
if let Some(implied_features) = inverse_implied_features.get(&new_feature) {
|
||||
#[allow(rustc::potential_query_instability)]
|
||||
new_features.extend(implied_features)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user