aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_db/src/helpers
diff options
context:
space:
mode:
authorlbrande <[email protected]>2021-02-22 15:23:42 +0000
committerLukas Wirth <[email protected]>2021-02-24 10:58:37 +0000
commit9db970ee082e315cfa04db163fe2e0268b618531 (patch)
tree9fef7832ba257eba27566653987b90ca089018de /crates/ide_db/src/helpers
parentf7a4a87de2840789e12722afc7df9f4db2db013c (diff)
De Morgan's Law assist now correctly inverts <, <=, >, >=.
Diffstat (limited to 'crates/ide_db/src/helpers')
-rw-r--r--crates/ide_db/src/helpers/famous_defs_fixture.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ide_db/src/helpers/famous_defs_fixture.rs b/crates/ide_db/src/helpers/famous_defs_fixture.rs
index 5e88de64d..bb4e9666b 100644
--- a/crates/ide_db/src/helpers/famous_defs_fixture.rs
+++ b/crates/ide_db/src/helpers/famous_defs_fixture.rs
@@ -1,5 +1,15 @@
1//- /libcore.rs crate:core 1//- /libcore.rs crate:core
2//! Signatures of traits, types and functions from the core lib for use in tests. 2//! Signatures of traits, types and functions from the core lib for use in tests.
3pub mod cmp {
4
5 pub trait Ord {
6 fn cmp(&self, other: &Self) -> Ordering;
7 fn max(self, other: Self) -> Self;
8 fn min(self, other: Self) -> Self;
9 fn clamp(self, min: Self, max: Self) -> Self;
10 }
11}
12
3pub mod convert { 13pub mod convert {
4 pub trait From<T> { 14 pub trait From<T> {
5 fn from(t: T) -> Self; 15 fn from(t: T) -> Self;
@@ -109,6 +119,7 @@ pub mod option {
109 119
110pub mod prelude { 120pub mod prelude {
111 pub use crate::{ 121 pub use crate::{
122 cmp::Ord,
112 convert::From, 123 convert::From,
113 default::Default, 124 default::Default,
114 iter::{IntoIterator, Iterator}, 125 iter::{IntoIterator, Iterator},