MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / debug_var_found

Method debug_var_found

crates/rustc_codegen_spirv/src/linker/specializer.rs:1128–1146  ·  view source on GitHub ↗
(
            var_found: &'a SmallIntMap<impl smallvec::Array<Item = SmallVec<A>>>,
            display: &'a impl Fn(&'a T) -> TD,
        )

Source from the content-addressed store, hash-verified

1126 cx: &'b InferCx<'a, impl Specialization>,
1127 ) -> impl fmt::Debug + Captures<'a> + '_ {
1128 fn debug_var_found<'a, A: smallvec::Array<Item = T> + 'a, T: 'a, TD: fmt::Display>(
1129 var_found: &'a SmallIntMap<impl smallvec::Array<Item = SmallVec<A>>>,
1130 display: &'a impl Fn(&'a T) -> TD,
1131 ) -> impl Iterator<Item = impl fmt::Debug + 'a> + 'a {
1132 var_found
1133 .0
1134 .iter()
1135 .filter(|found| !found.is_empty())
1136 .map(move |found| {
1137 FmtBy(move |f| {
1138 let mut found = found.iter().map(display);
1139 write!(f, "{}", found.next().unwrap())?;
1140 for x in found {
1141 write!(f, " = {x}")?;
1142 }
1143 Ok(())
1144 })
1145 })
1146 }
1147 FmtBy(move |f| {
1148 let Self {
1149 ambiguous,

Callers

nothing calls this directly

Calls 2

FmtByClass · 0.85
iterMethod · 0.80

Tested by

no test coverage detected