mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 06:58:50 +00:00
Bump Rust to 1.59.0
This commit is contained in:
@@ -77,7 +77,7 @@ cat tests/test_reduced.c
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Ubuntu 20.04
|
# Ubuntu 20.04
|
||||||
sudo apt install -y make cmake python3 csmith libcsmith-dev creduce
|
sudo apt install -y build-essential clang make cmake python3 csmith libcsmith-dev creduce
|
||||||
```
|
```
|
||||||
|
|
||||||
### Run
|
### Run
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.57.0
|
1.59.0
|
||||||
|
|||||||
@@ -272,8 +272,7 @@ impl WriteString for RType {
|
|||||||
"w"
|
"w"
|
||||||
} else {
|
} else {
|
||||||
"l"
|
"l"
|
||||||
}
|
},
|
||||||
.to_string(),
|
|
||||||
if *is_signed { "" } else { "u" },
|
if *is_signed { "" } else { "u" },
|
||||||
float_data_size.write_string()
|
float_data_size.write_string()
|
||||||
)
|
)
|
||||||
@@ -292,8 +291,7 @@ impl WriteString for RType {
|
|||||||
"w"
|
"w"
|
||||||
} else {
|
} else {
|
||||||
"l"
|
"l"
|
||||||
}
|
},
|
||||||
.to_string(),
|
|
||||||
if *is_signed { "" } else { "u" }
|
if *is_signed { "" } else { "u" }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -881,6 +881,7 @@ impl Dtype {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
pub fn set_const(self, is_const: bool) -> Self {
|
pub fn set_const(self, is_const: bool) -> Self {
|
||||||
match self {
|
match self {
|
||||||
Self::Unit { .. } => Self::Unit { is_const },
|
Self::Unit { .. } => Self::Unit { is_const },
|
||||||
@@ -998,6 +999,7 @@ impl Dtype {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
pub fn set_signed(self, is_signed: bool) -> Self {
|
pub fn set_signed(self, is_signed: bool) -> Self {
|
||||||
match self {
|
match self {
|
||||||
Self::Int {
|
Self::Int {
|
||||||
|
|||||||
@@ -1037,12 +1037,11 @@ impl Byte {
|
|||||||
let padding = std::cmp::max(inner_size, inner_align) - inner_size;
|
let padding = std::cmp::max(inner_size, inner_align) - inner_size;
|
||||||
values
|
values
|
||||||
.iter()
|
.iter()
|
||||||
.map(|v| {
|
.flat_map(|v| {
|
||||||
let mut result = Self::value_to_bytes(v, structs);
|
let mut result = Self::value_to_bytes(v, structs);
|
||||||
result.extend(iter::repeat(Byte::Undef).take(padding));
|
result.extend(iter::repeat(Byte::Undef).take(padding));
|
||||||
result
|
result
|
||||||
})
|
})
|
||||||
.flatten()
|
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
Value::Struct { name, fields } => {
|
Value::Struct { name, fields } => {
|
||||||
|
|||||||
@@ -740,6 +740,7 @@ impl Constant {
|
|||||||
matches!(self, Self::Undef { .. })
|
matches!(self, Self::Undef { .. })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
pub fn typecast(self, target_dtype: Dtype) -> Self {
|
pub fn typecast(self, target_dtype: Dtype) -> Self {
|
||||||
if self.dtype() == target_dtype {
|
if self.dtype() == target_dtype {
|
||||||
return self;
|
return self;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ impl WriteLine for TranslationUnit {
|
|||||||
} else {
|
} else {
|
||||||
"%anon"
|
"%anon"
|
||||||
},
|
},
|
||||||
f.deref().to_string()
|
f.deref()
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
|
|||||||
Reference in New Issue
Block a user