MCPcopy Index your code
hub / github.com/SoftbearStudios/bitcode / remove_lifetimes

Function remove_lifetimes

bitcode_derive/src/shared.rs:185–196  ·  view source on GitHub ↗
(generics: &mut Generics)

Source from the content-addressed store, hash-verified

183}
184
185pub fn remove_lifetimes(generics: &mut Generics) {
186 generics.params = std::mem::take(&mut generics.params)
187 .into_iter()
188 .filter(|param| !matches!(param, GenericParam::Lifetime(_)))
189 .collect();
190 if let Some(where_clause) = &mut generics.where_clause {
191 where_clause.predicates = std::mem::take(&mut where_clause.predicates)
192 .into_iter()
193 .filter(|predicate| !matches!(predicate, WherePredicate::Lifetime(_)))
194 .collect()
195 }
196}
197
198#[must_use]
199pub fn replace_lifetimes(t: &Type, s: &str) -> Type {

Callers 2

derive_implMethod · 0.85
derive_implMethod · 0.85

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected