Rust: Autoformat.

This commit is contained in:
Geoffrey White
2025-10-31 17:30:04 +00:00
parent 34f75952d0
commit 8548c167be
3 changed files with 8 additions and 10 deletions

View File

@@ -34,24 +34,21 @@ class BuiltinType extends Struct {
/** /**
* A numerical type, such as `i64`, `usize`, `f32` or `f64`. * A numerical type, such as `i64`, `usize`, `f32` or `f64`.
*/ */
abstract private class NumericTypeImpl extends BuiltinType { abstract private class NumericTypeImpl extends BuiltinType { }
}
final class NumericType = NumericTypeImpl; final class NumericType = NumericTypeImpl;
/** /**
* An integral numerical type, such as `i64` or `usize`. * An integral numerical type, such as `i64` or `usize`.
*/ */
abstract private class IntegralTypeImpl extends NumericTypeImpl { abstract private class IntegralTypeImpl extends NumericTypeImpl { }
}
final class IntegralType = IntegralTypeImpl; final class IntegralType = IntegralTypeImpl;
/** /**
* A floating-point numerical type, such as `f32` or `f64`. * A floating-point numerical type, such as `f32` or `f64`.
*/ */
abstract private class FloatingPointTypeImpl extends NumericTypeImpl { abstract private class FloatingPointTypeImpl extends NumericTypeImpl { }
}
final class FloatingPointType = FloatingPointTypeImpl; final class FloatingPointType = FloatingPointTypeImpl;

View File

@@ -96,5 +96,6 @@ module RegexInjection {
* We don't include floating point types in this barrier, as `.` is a special character * We don't include floating point types in this barrier, as `.` is a special character
* in regular expressions. * in regular expressions.
*/ */
private class IntegralOrBooleanTypeBarrier extends Barrier instanceof Barriers::IntegralOrBooleanTypeBarrier { } private class IntegralOrBooleanTypeBarrier extends Barrier instanceof Barriers::IntegralOrBooleanTypeBarrier
{ }
} }

View File

@@ -3,11 +3,11 @@ import codeql.rust.frameworks.stdlib.Builtins
import codeql.rust.internal.Type import codeql.rust.internal.Type
string describe(BuiltinType t) { string describe(BuiltinType t) {
(t instanceof NumericType and result = "NumericType") t instanceof NumericType and result = "NumericType"
or or
(t instanceof IntegralType and result = "IntegralType") t instanceof IntegralType and result = "IntegralType"
or or
(t instanceof FloatingPointType and result = "FloatingPointType") t instanceof FloatingPointType and result = "FloatingPointType"
} }
from BuiltinType t from BuiltinType t