Use more Self keywords instead of repeating the type name.
This commit is contained in:
@@ -74,8 +74,8 @@ pub struct InsertBuilder<'f, IIB: InstInserterBase<'f>> {
|
||||
impl<'f, IIB: InstInserterBase<'f>> InsertBuilder<'f, IIB> {
|
||||
/// Create a new builder which inserts instructions at `pos`.
|
||||
/// The `dfg` and `pos.layout` references should be from the same `Function`.
|
||||
pub fn new(inserter: IIB) -> InsertBuilder<'f, IIB> {
|
||||
InsertBuilder {
|
||||
pub fn new(inserter: IIB) -> Self {
|
||||
Self {
|
||||
inserter,
|
||||
unused: PhantomData,
|
||||
}
|
||||
@@ -185,8 +185,8 @@ pub struct ReplaceBuilder<'f> {
|
||||
|
||||
impl<'f> ReplaceBuilder<'f> {
|
||||
/// Create a `ReplaceBuilder` that will overwrite `inst`.
|
||||
pub fn new(dfg: &'f mut DataFlowGraph, inst: Inst) -> ReplaceBuilder {
|
||||
ReplaceBuilder { dfg, inst }
|
||||
pub fn new(dfg: &'f mut DataFlowGraph, inst: Inst) -> Self {
|
||||
Self { dfg, inst }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user