mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-10 10:02:38 +03:00
morphic clippy
This commit is contained in:
parent
642271d730
commit
eaf62a1bf8
4
vendor/morphic_lib/src/ir.rs
vendored
4
vendor/morphic_lib/src/ir.rs
vendored
@ -283,9 +283,7 @@ impl Graph {
|
||||
///
|
||||
/// IF an SCC 'A' can jump to an SCC 'B', then 'A' is guaranteed to appear *before* 'B' in the
|
||||
/// returned iterator.
|
||||
pub(crate) fn iter_sccs<'a>(
|
||||
&'a self,
|
||||
) -> impl Iterator<Item = Slice<'a, SccKind, BlockId>> + 'a {
|
||||
pub(crate) fn iter_sccs(&self) -> impl Iterator<Item = Slice<'_, SccKind, BlockId>> + '_ {
|
||||
self.rev_sccs
|
||||
.count()
|
||||
.iter()
|
||||
|
24
vendor/morphic_lib/src/preprocess.rs
vendored
24
vendor/morphic_lib/src/preprocess.rs
vendored
@ -88,40 +88,40 @@ impl Error {
|
||||
err
|
||||
}
|
||||
|
||||
fn annotate_type_def<'a, E: Into<Self>>(
|
||||
nc: &'a NameCache,
|
||||
fn annotate_type_def<E: Into<Self>>(
|
||||
nc: &NameCache,
|
||||
def_id: NamedTypeId,
|
||||
) -> impl FnOnce(E) -> Self + 'a {
|
||||
) -> impl FnOnce(E) -> Self + '_ {
|
||||
move |err| {
|
||||
let (mod_, name) = &nc.named_types[def_id];
|
||||
Error::annotate_mod_def(err, mod_.clone(), DefName::Type(name.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
fn annotate_func_def<'a, E: Into<Self>>(
|
||||
nc: &'a NameCache,
|
||||
fn annotate_func_def<E: Into<Self>>(
|
||||
nc: &NameCache,
|
||||
def_id: FuncId,
|
||||
) -> impl FnOnce(E) -> Self + 'a {
|
||||
) -> impl FnOnce(E) -> Self + '_ {
|
||||
move |err| {
|
||||
let (mod_, name) = &nc.funcs[def_id];
|
||||
Error::annotate_mod_def(err, mod_.clone(), DefName::Func(name.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
fn annotate_const_def<'a, E: Into<Self>>(
|
||||
nc: &'a NameCache,
|
||||
fn annotate_const_def<E: Into<Self>>(
|
||||
nc: &NameCache,
|
||||
def_id: ConstId,
|
||||
) -> impl FnOnce(E) -> Self + 'a {
|
||||
) -> impl FnOnce(E) -> Self + '_ {
|
||||
move |err| {
|
||||
let (mod_, name) = &nc.consts[def_id];
|
||||
Error::annotate_mod_def(err, mod_.clone(), DefName::Const(name.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
fn annotate_entry_point<'a, E: Into<Self>>(
|
||||
nc: &'a NameCache,
|
||||
fn annotate_entry_point<E: Into<Self>>(
|
||||
nc: &NameCache,
|
||||
def_id: EntryPointId,
|
||||
) -> impl FnOnce(E) -> Self + 'a {
|
||||
) -> impl FnOnce(E) -> Self + '_ {
|
||||
move |err| {
|
||||
let mut err = err.into();
|
||||
if err.def.is_none() {
|
||||
|
Loading…
Reference in New Issue
Block a user