-
Notifications
You must be signed in to change notification settings - Fork 13.3k
cat_expr Errd on "fold" #25076
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc me |
|
Minified: fn utopian_tree(cycles: u32) {
<_>::fold((cycles..), ||{}, ());
} We do write ty_err to node 11 ( |
triage: P-medium |
Whoops. There is indeed an error, which is indeed gets to report_selection_error, but when we do |
no_std version: #![feature(no_std,lang_items)]
#![no_std]
#![crate_type="rlib"]
#[lang="sized"] pub trait Sized {}
struct S;
trait InOut<T> { type Out; }
impl MIterator<u32> for S {}
trait MIterator<T> : Sized {
fn _fold<B, F: InOut<B, Out=B>>(self, init: B, f: F) -> B { loop {} }
}
fn bot<T>() -> T { loop {} }
fn utopian_tree() {
<S as MIterator<u32>>::_fold(S, bot(), ());
}
fn main() {} |
You don't even need the trait: struct S;
trait InOut<T> { type Out; }
fn do_fold<B, F: InOut<B, Out=B>>(init: B, f: F) { }
fn bot<T>() -> T { loop {} }
fn main() {
do_fold(bot(), ());
} |
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
May 6, 2015
arielb1
pushed a commit
to arielb1/rust
that referenced
this issue
May 6, 2015
bors
added a commit
that referenced
this issue
May 7, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello folks,
I'm dutifully reporting this as the compiler told me to so. The bug is the same reported already by #24504 and #22897, although it appeared on a different circumstance. I have this simple program (I'm a Rust newbie so It's very likely I'm doing things terribly wrong):
Expected outcome:
Actual outcome:
Meta
Shows up with latest beta as well:
The text was updated successfully, but these errors were encountered: