-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Compiler cannot pretty print #12580
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
Seems like dup of #7754. ( |
This is indeed a dupe. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 25, 2022
internal: Move more things out of `CompletionContext::function_def` into more specific parts
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Apr 4, 2024
fix [`manual_unwrap_or_default`] suggestion ignoring side-effects fixes: rust-lang#12569 closes: rust-lang#12580 change applicability to `MaybeIncorrect` base on suggestion in [this zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/.60manual_unwrap_or_default.60.20suggestion.20removes.20comments) --- changelog: fix [`manual_unwrap_or_default`] suggestion ignoring side-effects, and adjust its applicability.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying "rustc --pretty typed example.rs > example.typed.rs" and the compiler gives up with "error: internal compiler error: node_id_to_type: no type for node
expr 1u (id=23)
"The input program is:
use std::io::BufferedReader;
use std::io::File;
use std::task::try;
fn main() {
let result = try (proc () {
println!("Reading pairs");
let pairs = read_int_pairs();
println!("Printing {} pairs", pairs.len());
for &(a,b) in pairs.iter() {
println!("{:4.4d}, {:4.4d}", a, b);
}
});
if result.is_err() {
println!("parsing failed");
}
}
fn read_int_pairs() -> ~[(int,int)] {
let mut pairs = ~[];
let path = Path::new(&"foo.txt");
let mut reader = BufferedReader::new(File::open(&path));
loop {
let line_err = reader.read_line ();
match line_err {
Ok (line) => {
let fields = line.words().to_owned_vec();
if fields.len () == 2 {
let i1_opt = from_str::(fields[0]);
let i2_opt = from_str::(fields[1]);
match (i1_opt, i2_opt) {
(Some(a), Some(b)) => pairs.push((a,b)),
_ => fail! ()
}
}
}
Err (err) => {
println!("error reading: {}", err);
break;
}
}
}
pairs
}
The text was updated successfully, but these errors were encountered: