You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use core::iterator::{UnfoldrIterator};pubfnuint_range(start:uint,end:uint,step:int) -> UnfoldrIterator<uint,(uint,int)>{fnnext(st:&mut(uint,int)) -> Option<(uint,int)>{None}returnUnfoldrIterator::new(next,(start, step));}
$ rustc foldr.rs
error: internal compiler error: ty::Region#subst(): Reference to self region when given substs with no self region: substs(self_r=None, self_ty=None, tps=[<V3>,<V4>])
rustc seems to fail to suggest 'self region of UnfoldrIterator<'self>,
but I don't know the appropriate region name for this case.
The text was updated successfully, but these errors were encountered:
foldr.rs:11:11: 11:53 error: mismatched types: expected `std::iterator::UnfoldrIterator<,uint,(uint,int)>` but found `std::iterator::UnfoldrIterator<,(uint,int),(uint,int)>` (expected uint but found tuple)
foldr.rs:11 return UnfoldrIterator::new(next, (start, step));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
if fn next changed like below, it can be compiled without ICE
…=flip1995
Reinstate test for forbid(clippy::restriction)
In [this commit](rust-lang/rust-clippy@5747c15) coming from rust-lang/rust (rust-lang#6126) the test for `#![forbid(clippy::restriction)]` was removed because some restriction lints were being allowed after the forbid.
This change reinstates the test for `forbid` by using a separate file.
changelog: none
r? `@flip1995`
The following code causes ICE.
rustc
seems to fail to suggest'self
region ofUnfoldrIterator<'self>
,but I don't know the appropriate region name for this case.
The text was updated successfully, but these errors were encountered: