fix typos

This commit is contained in:
stanlagermin 2023-12-21 14:55:52 +07:00
parent 46d539a0b6
commit 31b4868ed0
16 changed files with 17 additions and 17 deletions

View File

@ -84,7 +84,7 @@ impl SourceMap {
Some(LineCol { source_file, line, col })
}
/// Retrives the location (source file, line, col) on the given span.
/// Retrieves the location (source file, line, col) on the given span.
pub fn span_to_location(&self, sp: Span) -> Option<SpanLocation> {
let lo = self.find_line_col(sp.lo)?;
let hi = self.find_line_col(sp.hi)?;

View File

@ -27,7 +27,7 @@ use serde::{
use std::fmt;
/// The AST contains a few tuple-like enum variants that contain spans.
/// #[derive(Serialize, Deserialize)] outputs these fields as anonmyous
/// #[derive(Serialize, Deserialize)] outputs these fields as anonymous
/// mappings, which makes them difficult to remove from the JSON AST.
/// This function provides a custom serialization that maps the keyword
/// `span` to the span information.

View File

@ -46,7 +46,7 @@ pub struct Backtraced {
pub error: bool,
#[derivative(PartialEq = "ignore")]
#[derivative(Hash = "ignore")]
/// The backtrace representing where the error occured in Leo.
/// The backtrace representing where the error occurred in Leo.
pub backtrace: Backtrace,
}

View File

@ -31,10 +31,10 @@ pub use self::macros::*;
pub mod traits;
pub use self::traits::*;
// Right now for cleanliness of calling error functions we say each argument implments one of the follow types rather than giving a specific type.
// Right now for cleanliness of calling error functions we say each argument implements one of the follow types rather than giving a specific type.
// This allows us to just pass many types rather doing conversions cleaning up the code.
// The args can be made cleaneronce https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable.
// Either of why would allows to generate a type alias for these trait implmenting types.
// Either of why would allows to generate a type alias for these trait implementing types.
// pub(crate) type DisplayArg = impl std::fmt::Display;
// pub(crate) type DebugArg = impl std::fmt::Debug;
// pub(crate) type ErrorArg = impl std::error::Error;

View File

@ -195,7 +195,7 @@ create_messages!(
help: None,
}
/// For when the package failed to initalize.
/// For when the package failed to initialize.
@backtraced
failed_to_initialize_package {
args: (package: impl Display, path: impl Debug),

View File

@ -28,5 +28,5 @@ the low 16 bits are zero and counts zero otherwise. Then `b3` uses a mask `y &
otherwise. The masks for `b2`, `b1`, and `b0` can count four, two, and
one 0-bits similarly.
The varables `bz, b4, .., b0` are all independent, and their values are added up
The variables `bz, b4, .., b0` are all independent, and their values are added up
for the result.

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i128 {
let a: i128 = -170141183460469231731687303715884105727i128;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i128 {
let a: i128 = -170141183460469231731687303715884105728i128;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i16 {
let a: i16 = -32767i16;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i16 {
let a: i16 = -32768i16;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i32 {
let a: i32 = -2147483647i32;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i32 {
let a: i32 = -2147483648i32;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i64 {
let a: i64 = -9223372036854775807i64;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i64 {
let a: i64 = -9223372036854775808i64;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i8 {
let a: i8 = -127i8;

View File

@ -4,7 +4,7 @@ expectation: Pass
*/
program test.aleo {
// TODO: This test passes, but constant propogation should detect an overflow.
// TODO: This test passes, but constant propagation should detect an overflow.
transition main(y: bool) -> i8 {
let a: i8 = -128i8;