We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
IntoIterator
1 parent 4d70750 commit e786235Copy full SHA for e786235
compiler/rustc_target/src/spec/mod.rs
@@ -695,6 +695,19 @@ impl LinkSelfContainedComponents {
695
}
696
697
698
+impl IntoIterator for LinkSelfContainedComponents {
699
+ type Item = LinkSelfContainedComponents;
700
+ type IntoIter = std::vec::IntoIter<LinkSelfContainedComponents>;
701
+
702
+ fn into_iter(self) -> Self::IntoIter {
703
+ LinkSelfContainedComponents::all_components()
704
+ .into_iter()
705
+ .filter(|&s| self.contains(s))
706
+ .collect::<Vec<_>>()
707
708
+ }
709
+}
710
711
impl ToJson for LinkSelfContainedComponents {
712
fn to_json(&self) -> Json {
713
let components: Vec<_> = Self::all_components()
0 commit comments