Skip to content

Commit 8c97777

Browse files
authored
chore: Bump dependency versions, apply clippy and fmt (#1282)
1 parent 1a1ab0e commit 8c97777

File tree

8 files changed

+663
-656
lines changed

8 files changed

+663
-656
lines changed

Cargo.lock

Lines changed: 650 additions & 643 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/plc_ast/src/visitor.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ use crate::literals::AstLiteral;
99
/// Macro that calls the visitor's `visit` method for every AstNode in the passed iterator `iter`.
1010
macro_rules! visit_all_nodes {
1111
($visitor:expr, $iter:expr) => {
12-
for node in $iter {
13-
$visitor.visit(node);
12+
// Note: The `allow` is needed to suppress warnings about `while let Some(...)` warnings
13+
// because `visit_all_nodes!` is used for both Option and Non-Option types
14+
#[allow(warnings)]
15+
{
16+
for node in $iter {
17+
$visitor.visit(node);
18+
}
1419
}
1520
};
1621
}

src/codegen/generators/expression_generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,11 +1087,11 @@ impl<'ink, 'b> ExpressionCodeGenerator<'ink, 'b> {
10871087
}
10881088
}
10891089

1090+
// TODO: will be deleted once methods work properly (like functions)
10901091
/// generates a new instance of a function called `function_name` and returns a PointerValue to it
10911092
///
10921093
/// - `function_name` the name of the function as registered in the index
10931094
/// - `context` the statement used to report a possible Diagnostic on
1094-
/// TODO: will be deleted once methods work properly (like functions)
10951095
fn allocate_function_struct_instance(
10961096
&self,
10971097
function_name: &str,

src/index.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,8 +868,7 @@ impl Index {
868868
///
869869
/// imports all global_variables, types and implementations
870870
/// # Arguments
871-
/// - `other` the other index. The elements are drained from the given index and moved
872-
/// into the current one
871+
/// - `other` the other index. The elements are drained from the given index and moved into the current one
873872
pub fn import(&mut self, mut other: Index) {
874873
//global variables
875874
for (name, e) in other.global_variables.drain(..) {

src/tests/adr/reference_expressions_adr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::test_utils::tests::parse_and_preprocess;
1717
/// - Casting a value
1818
/// - Dereferencing a pointer
1919
/// - accessing the Address of a variable
20-
20+
///
2121
/// A flat reference is treated as a Qualified-Reference with no qualifier.
2222
/// This means that a flat reference (a) and a qualified reference (a.b)
2323
/// are represented using the same AST-Structure. One has no qualifier (None),

src/validation/recursive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl RecursiveValidator {
135135
/// Returns the data type of `entry` distinguishing between two cases:
136136
/// 1. If the entry is any type but an array its datatype is returned (as usual)
137137
/// 2. If the entry is an array their inner type name is returned. For example calling the
138-
/// [`index::VariableIndexEntry::get_type_name`] method on the following code snippet
138+
/// [`index::VariableIndexEntry::get_type_name`] method on the following code snippet
139139
/// ```ST
140140
/// TYPE A : STRUCT
141141
/// b : ARRAY[0..1] OF B;

tests/correctness/strings.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,6 @@ fn initialization_of_string_arrays() {
315315
assert_eq!(main_type.z, "ten chars!\0".as_bytes());
316316
}
317317

318-
#[repr(C, align(1))]
319-
#[derive(Debug)]
320-
struct Wrapper<T> {
321-
inner: T,
322-
}
323-
324318
/// .
325319
///
326320
/// # Safety

xtask/src/reporter.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub enum ReporterType {
3535

3636
#[derive(Serialize)]
3737
pub struct BenchmarkReport {
38+
#[allow(dead_code)]
3839
#[serde(skip_serializing)]
3940
pub id: u64,
4041
/// Host information, see [`Host`].
@@ -67,6 +68,7 @@ impl Serialize for DurationWrapper {
6768

6869
#[derive(Serialize, Debug)]
6970
pub struct Host {
71+
#[allow(dead_code)]
7072
#[serde(skip_serializing)]
7173
pub id: u64,
7274
pub os: String,

0 commit comments

Comments
 (0)