Fixed trivially_copy_pass_by_ref warnings

This commit is contained in:
Aaron Power
2018-07-25 16:12:39 +01:00
committed by Dan Gohman
parent 299898d494
commit 952a086f32
4 changed files with 20 additions and 20 deletions

View File

@@ -26,8 +26,8 @@ impl Default for ValueLoc {
impl ValueLoc {
/// Is this an assigned location? (That is, not `Unassigned`).
pub fn is_assigned(&self) -> bool {
match *self {
pub fn is_assigned(self) -> bool {
match self {
ValueLoc::Unassigned => false,
_ => true,
}
@@ -111,24 +111,24 @@ impl Default for ArgumentLoc {
impl ArgumentLoc {
/// Is this an assigned location? (That is, not `Unassigned`).
pub fn is_assigned(&self) -> bool {
match *self {
pub fn is_assigned(self) -> bool {
match self {
ArgumentLoc::Unassigned => false,
_ => true,
}
}
/// Is this a register location?
pub fn is_reg(&self) -> bool {
match *self {
pub fn is_reg(self) -> bool {
match self {
ArgumentLoc::Reg(_) => true,
_ => false,
}
}
/// Is this a stack location?
pub fn is_stack(&self) -> bool {
match *self {
pub fn is_stack(self) -> bool {
match self {
ArgumentLoc::Stack(_) => true,
_ => false,
}