Skip to content

Commit b8306ab

Browse files
authored
Merge pull request #183 from nikomatsakis/fix-warnings
Fix warnings
2 parents 15ce6cf + 56c16d0 commit b8306ab

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

crates/formality-core/src/collections.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,6 @@ macro_rules! seq {
5858

5959
}
6060

61-
pub trait VecExt<T>: Sized {
62-
fn with_pushed(self, other: T) -> Self;
63-
}
64-
65-
impl<T: Ord + Clone> VecExt<T> for Vec<T> {
66-
fn with_pushed(mut self, other: T) -> Self {
67-
self.push(other);
68-
self
69-
}
70-
}
71-
7261
pub trait SetExt<T>: Sized {
7362
fn split_first(self) -> Option<(T, Set<T>)>;
7463

crates/formality-core/src/parse/parser/left_recursion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl StackEntry {
9797
let scope: *const () = erase_type(scope);
9898
let start_text: *const str = start_text;
9999
let type_id = TypeId::of::<T>();
100-
scope == self.scope && start_text == self.start_text && self.type_id == type_id
100+
scope == self.scope && std::ptr::eq(start_text, self.start_text) && self.type_id == type_id
101101
}
102102

103103
/// True if a call to parse a value of type `T` with the given scope scope/text
@@ -152,7 +152,7 @@ impl StackEntry {
152152
let Some(current_state) = &self.current_state else {
153153
panic!("observed a stack frame with no current state (forgot to call `recuse`?");
154154
};
155-
if start_text != current_state.current_text {
155+
if !std::ptr::eq(start_text, current_state.current_text) {
156156
return None;
157157
}
158158

File renamed without changes.

0 commit comments

Comments
 (0)