Skip to content

Commit 2e0959a

Browse files
committed
Minor bug fixes
1 parent 4694414 commit 2e0959a

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Diff for: src/look_ahead.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ where
5151

5252
// TODO: CLEANUP: Find better solution
5353
let contiguous = self.buffer.make_contiguous();
54-
&contiguous[..contiguous.len().max(count)]
54+
&contiguous[..contiguous.len().min(count)]
5555
}
5656

5757
pub fn peek_nth(&mut self, index: usize) -> Option<&I::Item> {

Diff for: src/parser/error.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub enum ParseErrorKind {
8080
got: usize,
8181
expected: usize,
8282
},
83-
ExpectedTypeParameterToBeType {
83+
ExpectedTypeParameterToBeAType {
8484
name: String,
8585
word_for_nth: String,
8686
},
@@ -200,7 +200,7 @@ impl Display for ParseErrorKind {
200200
name, got, expected
201201
)?;
202202
}
203-
ParseErrorKind::ExpectedTypeParameterToBeType { name, word_for_nth } => {
203+
ParseErrorKind::ExpectedTypeParameterToBeAType { name, word_for_nth } => {
204204
write!(
205205
f,
206206
"Expected {} type parameter to '{}' to be a type",

Diff for: src/parser/parse_type.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl<'a, I: Inflow<Token>> Parser<'a, I> {
101101
Ok(TypeKind::Pointer(Box::new(inner)))
102102
} else {
103103
Err(ParseError {
104-
kind: ParseErrorKind::ExpectedTypeParameterToBeType {
104+
kind: ParseErrorKind::ExpectedTypeParameterToBeAType {
105105
name: identifier,
106106
word_for_nth: "first".into(),
107107
},

Diff for: src/pragma_section/run.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl PragmaSection {
3030
excute_result: false,
3131
use_pic: None,
3232
allow_experimental_pragma_features: false,
33-
target: Target::HOST,
33+
target: Target::default(),
3434
infrastructure: None,
3535
},
3636
target: base_compiler.target,

0 commit comments

Comments
 (0)