Skip to content

Commit

Permalink
bump: rust 1.49
Browse files Browse the repository at this point in the history
  • Loading branch information
baszalmstra committed Jan 1, 2021
1 parent e410bc5 commit c8ac6a7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion crates/mun_codegen/src/code_gen/symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ fn gen_get_info_fn<'ink>(
);
builder.build_store(
num_dependencies_addr,
context.context.i32_type().const_int(0 as u64, false),
context.context.i32_type().const_int(0u64, false),
);

// Construct the return statement of the function.
Expand Down
6 changes: 3 additions & 3 deletions crates/mun_hir/src/expr/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ impl ExprScopes {
&self.scopes[scope].entries
}

pub(crate) fn scope_chain<'a>(
&'a self,
pub(crate) fn scope_chain(
&'_ self,
scope: Option<LocalScopeId>,
) -> impl Iterator<Item = LocalScopeId> + 'a {
) -> impl Iterator<Item = LocalScopeId> + '_ {
std::iter::successors(scope, move |&scope| self.scopes[scope].parent)
}

Expand Down
3 changes: 1 addition & 2 deletions crates/mun_lld/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::ffi::CStr;
use std::{
ffi::CString,
iter::FromIterator,
os::raw::{c_char, c_int},
};

Expand Down Expand Up @@ -50,7 +49,7 @@ pub fn link(target: LldFlavor, args: &[String]) -> LldResult {
.iter()
.map(|arg| CString::new(arg.as_bytes()).unwrap())
.collect::<Vec<CString>>();
let args: Vec<*const c_char> = Vec::from_iter(c_args.iter().map(|arg| arg.as_ptr()));
let args: Vec<*const c_char> = c_args.iter().map(|arg| arg.as_ptr()).collect();

// Invoke LLD
let mut lld_result = unsafe { mun_lld_link(target, args.len() as c_int, args.as_ptr()) };
Expand Down
12 changes: 6 additions & 6 deletions crates/mun_syntax/src/parsing/lexer/classes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ pub fn is_whitespace(c: char) -> bool {
}

pub fn is_ident_start(c: char) -> bool {
(c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
('a'..='z').contains(&c)
|| ('A'..='Z').contains(&c)
|| c == '_'
|| (c > '\x7f' && UnicodeXID::is_xid_start(c))
}

pub fn is_ident_continue(c: char) -> bool {
(c >= 'a' && c <= 'z')
|| (c >= 'A' && c <= 'Z')
|| (c >= '0' && c <= '9')
('a'..='z').contains(&c)
|| ('A'..='Z').contains(&c)
|| ('0'..='9').contains(&c)
|| c == '_'
|| (c > '\x7f' && UnicodeXID::is_xid_continue(c))
}

pub fn is_dec_digit(c: char) -> bool {
'0' <= c && c <= '9'
('0'..='9').contains(&c)
}
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.48.0
1.49.0

0 comments on commit c8ac6a7

Please sign in to comment.