Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb committed Dec 20, 2024
1 parent 1e6ce6f commit a35c659
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion c2rust-analyze/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ impl<'a, 'tcx> AnalysisCtxt<'a, 'tcx> {
/// - let r1 = std::ptr::addr_of!(x.field);
/// - let r2 = &x.field;
/// - let r3 = &(*p).field;
/// The following will NOT satisfy that critera:
/// The following will NOT satisfy that criteria:
/// - let r1 = x.field;
/// - let r2 = x.field + y;
pub fn has_field_projection(&self, rv: &Rvalue<'tcx>) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion c2rust-refactor/src/analysis/ownership/constraint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ impl<'lty, 'tcx> ConstraintSet<'lty> {
for (i, &pi) in ps.iter().enumerate() {
// This check handles cycles. Suppose `a <= b <= c <= a` and `d <= e`. We'd
// like to replace `min(a, b, c, d, e)` with `min(a, d)`. Without this check,
// we would end up with `min()`, becuase `a` eliminates `b` and `c`, `b` and
// we would end up with `min()`, because `a` eliminates `b` and `c`, `b` and
// `c` eliminate `a`, and `d` and `e` remove each other. This check doesn't
// cause us to miss any valid removals because if `a <= b` and `b <= x` then
// also `a <= x`.
Expand Down
10 changes: 5 additions & 5 deletions c2rust-refactor/tests/misc/analysis_type_eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,28 @@ fn do_printf() {
}
}

struct Clonable1 {
struct Cloneable1 {
x: i32,
y: i32,
}

impl Clonable1 {
impl Cloneable1 {
fn get_x(&self) -> i32 {
self.x
}
}

impl Clone for Clonable1 {
impl Clone for Cloneable1 {
fn clone(&self) -> Self {
Clonable1 {
Cloneable1 {
x: self.x,
y: self.y,
}
}
}

#[derive(Clone)]
struct Clonable2 {
struct Cloneable2 {
x: i32,
y: i32,
}
Expand Down
2 changes: 1 addition & 1 deletion c2rust-transpile/src/c_ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ pub enum CTypeKind {
Half,
BFloat16,

// ARM Scalable Vector Extention types
// ARM Scalable Vector Extension types
// TODO: represent all the individual types in AArch64SVEACLETypes.def
UnhandledSveType,
}
Expand Down
2 changes: 1 addition & 1 deletion c2rust-transpile/src/translator/assembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ impl<'c> Translation<'c> {
// Extract expression
let in_expr = in_expr.map(|(i, operand)| (i, operand.expression));

// For inouts, change the dirspec to include 'in'
// For inputs, change the dirspec to include 'in'
if in_expr.is_some() {
dir_spec = dir_spec.with_in();
}
Expand Down

0 comments on commit a35c659

Please sign in to comment.