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 6898d88 commit 9ea118fCopy full SHA for 9ea118f
compiler/rustc_target/src/spec/mod.rs
@@ -693,6 +693,19 @@ impl LinkSelfContainedComponents {
693
}
694
695
696
+impl IntoIterator for LinkSelfContainedComponents {
697
+ type Item = LinkSelfContainedComponents;
698
+ type IntoIter = std::vec::IntoIter<LinkSelfContainedComponents>;
699
+
700
+ fn into_iter(self) -> Self::IntoIter {
701
+ LinkSelfContainedComponents::all_components()
702
+ .into_iter()
703
+ .filter(|&s| self.contains(s))
704
+ .collect::<Vec<_>>()
705
706
+ }
707
+}
708
709
impl ToJson for LinkSelfContainedComponents {
710
fn to_json(&self) -> Json {
711
let components: Vec<_> = Self::all_components()
0 commit comments