Skip to content

Commit

Permalink
remove extra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
micahscopes committed Nov 30, 2024
1 parent 502fc6a commit 4b6db68
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 45 deletions.
4 changes: 0 additions & 4 deletions crates/hir-analysis/src/name_resolution/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,4 @@ impl<'db> DiagnosticVoucher<'db> for NameResDiag<'db> {

CompleteDiagnostic::new(self.severity(), message, sub_diags, vec![], error_code)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher<'_>> {
// Box::new(self.clone())
// }
}
20 changes: 0 additions & 20 deletions crates/hir-analysis/src/ty/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -518,10 +518,6 @@ impl<'db> DiagnosticVoucher<'db> for TyLowerDiag<'db> {

CompleteDiagnostic::new(severity, message, sub_diags, vec![], error_code)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher> {
// Box::new(self.clone())
// }
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -1578,10 +1574,6 @@ impl<'db> DiagnosticVoucher<'db> for BodyDiag<'db> {

CompleteDiagnostic::new(severity, message, sub_diags, vec![], error_code)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher<'db> + '_> {
// Box::new(self.clone())
// }
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -1680,10 +1672,6 @@ impl<'db> DiagnosticVoucher<'db> for TraitLowerDiag<'db> {

CompleteDiagnostic::new(severity, message, sub_diags, vec![], error_code)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher> {
// Box::new(self.clone())
// }
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -1898,10 +1886,6 @@ impl<'db> DiagnosticVoucher<'db> for TraitConstraintDiag<'db> {

CompleteDiagnostic::new(severity, message, sub_diags, vec![], error_code)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher> {
// Box::new(self.clone())
// }
}

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -2378,8 +2362,4 @@ impl<'db> DiagnosticVoucher<'db> for ImplDiag<'db> {

CompleteDiagnostic::new(severity, message, sub_diags, vec![], error_code)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher> {
// Box::new(self.clone())
// }
}
9 changes: 0 additions & 9 deletions crates/hir/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ pub trait DiagnosticVoucher<'db>: Send {
fn error_code(&self) -> GlobalErrorCode;
/// Makes a [`CompleteDiagnostic`].
fn to_complete(&self, db: &'db dyn SpannedHirDb) -> CompleteDiagnostic;
// fn clone_box(&self) -> Box<&'db dyn DiagnosticVoucher>;
}

impl<'db> DiagnosticVoucher<'db> for CompleteDiagnostic {
Expand All @@ -35,10 +34,6 @@ impl<'db> DiagnosticVoucher<'db> for CompleteDiagnostic {
fn to_complete(&self, _db: &dyn SpannedHirDb) -> CompleteDiagnostic {
self.clone()
}

// fn clone_box(&self) -> Box<&'db dyn DiagnosticVoucher> {
// Box::new(&self.clone())
// }
}

impl<'db> DiagnosticVoucher<'db> for Box<dyn DiagnosticVoucher<'db> + 'db> {
Expand All @@ -49,8 +44,4 @@ impl<'db> DiagnosticVoucher<'db> for Box<dyn DiagnosticVoucher<'db> + 'db> {
fn to_complete(&self, db: &'db dyn SpannedHirDb) -> CompleteDiagnostic {
self.as_ref().to_complete(db)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher> {
// self.as_ref().clone_box()
// }
}
4 changes: 0 additions & 4 deletions crates/hir/src/lower/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,4 @@ impl<'db> DiagnosticVoucher<'db> for ParserError {
error_code,
)
}

// fn clone_box(&self) -> Box<dyn DiagnosticVoucher> {
// Box::new(self.clone())
// }
}
2 changes: 1 addition & 1 deletion crates/language-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fe-language-server"
version = "0.23.0"
version = "0.26.0"
edition = "2021"
authors = ["The Fe Developers <snakecharmers@ethereum.org>"]
license = "Apache-2.0"
Expand Down
1 change: 0 additions & 1 deletion crates/library/std/src/math.fe
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

pub fn min(_ x: u256, _ y: u256) -> u256 {
if x < y {
return x
Expand Down
12 changes: 6 additions & 6 deletions crates/test-files/fixtures/features/numeric_sizes.fe
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const U128_MAX: u128 = 340282366920938463463374607431768211455

const I256_MIN: i256 = -57896044618658097711785492504343953926634992332820282019728792003956564819968
const I256_MAX: i256 = 57896044618658097711785492504343953926634992332820282019728792003956564819967
const u256_MIN: u256 = 0
const u256_MAX: u256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935
const U256_MIN: u256 = 0
const U256_MAX: u256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935


contract Foo {
Expand All @@ -38,7 +38,7 @@ contract Foo {
assert u32::min() == U32_MIN
assert u64::min() == U64_MIN
assert u128::min() == U128_MIN
assert u256::min() == u256_MIN
assert u256::min() == U256_MIN
// TODO: Investigate why these can't be compared against their const values
assert i8::min() == get_i8_const_min()
assert i16::min() == get_i16_const_min()
Expand All @@ -52,7 +52,7 @@ contract Foo {
assert u32::max() == U32_MAX
assert u64::max() == U64_MAX
assert u128::max() == U128_MAX
assert u256::max() == u256_MAX
assert u256::max() == U256_MAX

assert i8::max() == I8_MAX
assert i16::max() == I16_MAX
Expand Down Expand Up @@ -106,7 +106,7 @@ contract Foo {
}

pub fn get_u256_const_min() -> u256 {
return u256_MIN
return U256_MIN
}

pub fn get_i8_min() -> i8 {
Expand Down Expand Up @@ -202,7 +202,7 @@ contract Foo {
}

pub fn get_u256_const_max() -> u256 {
return u256_MAX
return U256_MAX
}

pub fn get_i8_max() -> i8 {
Expand Down

0 comments on commit 4b6db68

Please sign in to comment.