We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is wrong code:
#![feature(conservative_impl_trait)] fn foo(filename: &str) -> impl Iterator<Item=&str> { use std::fs::File; use std::io::{BufReader, BufRead}; BufReader::new(File::open(filename).unwrap()).lines() } fn main() {}
The compiler gives:
error: internal compiler error: src\librustc_typeck\check\mod.rs:626: escaping regions in predicate Obligation(predicate=Binder(ProjectionPredicate(ProjectionTy { substs: Slice([_]), item_def_id: DefId { krate: CrateNum(2), node: DefIndex(1588) => core/571a388::iter[0]::iterator[0]::Iterator[0]::Item[0] } }, &str)),depth=0) --> ...\test.rs:2:27 | 2 | fn foo(filename: &str) -> impl Iterator<Item=&str> { | ^^^^^^^^^^^^^^^^^^^^^^^^ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports note: rustc 1.21.0-nightly (469a6f9bd 2017-08-22) running on x86_64-pc-windows-gnu note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:436:8 stack backtrace: 0: mingw_set_invalid_parameter_handler ...
The text was updated successfully, but these errors were encountered:
Duplicate of #42479...
Sorry, something went wrong.
No branches or pull requests
This is wrong code:
The compiler gives:
The text was updated successfully, but these errors were encountered: