Use more Self keywords instead of repeating the type name.

This commit is contained in:
Dan Gohman
2018-10-05 16:40:50 -07:00
parent 9a1e966156
commit 17a9631981
16 changed files with 40 additions and 58 deletions

View File

@@ -580,8 +580,8 @@ pub struct FuncCursor<'f> {
impl<'f> FuncCursor<'f> {
/// Create a new `FuncCursor` pointing nowhere.
pub fn new(func: &'f mut ir::Function) -> FuncCursor<'f> {
FuncCursor {
pub fn new(func: &'f mut ir::Function) -> Self {
Self {
pos: CursorPosition::Nowhere,
srcloc: Default::default(),
func,
@@ -662,8 +662,8 @@ pub struct EncCursor<'f> {
impl<'f> EncCursor<'f> {
/// Create a new `EncCursor` pointing nowhere.
pub fn new(func: &'f mut ir::Function, isa: &'f TargetIsa) -> EncCursor<'f> {
EncCursor {
pub fn new(func: &'f mut ir::Function, isa: &'f TargetIsa) -> Self {
Self {
pos: CursorPosition::Nowhere,
srcloc: Default::default(),
built_inst: None,