You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ast_types.rs
    path of file: ./repos/rls/racer/src/racer
    
    the code of the file until where you have to start completion: //! type conversion between racer types and libsyntax types
use super::ast::find_type_match;
use crate::core::{
    self, BytePos, ByteRange, Match, MatchType, Scope, SearchType, Session, SessionExt,
};
use crate::matchers::ImportInfo;
use crate::nameres;
use crate::primitive;
use crate::primitive::PrimKind;
use crate::typeinf;
use crate::util;
use rustc_ast::ast::{
    self, GenericBound, GenericBounds, GenericParamKind, LitKind, PatKind, TraitRef, TyKind,
    WherePredicate,
};
use rustc_ast_pretty::pprust;
use rustc_span::source_map;
use std::fmt;
use std::path::{Path as FilePath, PathBuf};
// we can only re-export types without thread-local interned string
pub use rustc_ast::ast::{BindingMode, Mutability};

/// The leaf of a `use` statement.
#[derive(Clone, Debug)]
pub struct PathAlias {
    /// the le
    
    pub(crate) fn replace_by_bounds(&mut self, gen: &GenericsArgs) {
        self.segments.iter_mut().for_each(|segment| {
            segment
                .generics
                .iter_mut()
                .for_each(|generics| match generics {
                    Ty::PathSearch(ref mut ps) => {
                        if let Some((_, param)) = gen.search_param_by_path(&ps.path) {
                            if let Some(resolved) = param.resolved() {
                                *generics = resolved.to_owned();
                            } else {
                                *generics = Ty::Match(param.clone().into_match());
                            }
                        } else {
                            ps.path.replace_by_bounds(gen);
                        }
                    }
                    _ => {}
                })
        })
    }