jiebi/CodeConvo huggingface dataset:
Change:
The following code causes infinite recursion in rustc: version: , and also today's The recursion seems to be between various lines of . Note that the following code compiles (note Box instead of Vec): but if you add the crash happens again
Seems to be a dupe of .
I believe this is a dupe of , since is representable and instantiable (both with and with ), but causes infinite type generation.
Indeed, closing as a dupe of . Thanks

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
I have a C program using a rust library that calls the debug! macro. Here is the setup: system: OS X Mavericks 10.9.4 bar.h test.c I'm able to compile it using but it crashes at runtime: I don't think the problem is specific to the macro, because I've seen the exact same error in other situations. However this is the simplest example I've found. Note that I've been able to run other C programs using Rust libraries successfully (for example if I replace with in the example, then everything is fine). Maybe I'm missing a step somewhere, but it looks like a bug to me.
Investigating a bit more, it looks like the assertion fails in because the queue has not been initialized. So I solved my problem by manually initializing the runtime: Of course it makes sense now, but is this is the recommended way to do it? It also means many rust libraries will require some kind of function to be called (which is fine, I guess).
As I see it, the solution is to compile with and provide your own .
I see - thanks for your reply! I tried using originally but my project is using things like which don't seem to be available outside of std.
You need to use if you want to provide a Rust library with a normal C API. You're running into explicitly undefined behaviour if you aren't initializing the runtime on every thread before using libstd.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Rust's does not work on iOS or on the Android bot at the moment. It should_ work on Android but the bot is too old (). I am not able to test whether the current version of iOS has support / emulation for this now.
This was done some time ago.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Save this program as When you try to compile this program with rustc , you'll get an interesting (and long) error message: rustc 0.12.0
The 30 minute guide is being re-done in , so while this is an error, it's already going away shortly.
Closed since was merged.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Arch Linux, x86_64, Code: I didn't expect this to compile successfully, but when I tried I hit an error which asked me nicely to report it as a compiler bug :smile:
Reduced test case:
Taking a look
It seems that overlap checking is not finding the blanket impl of for at all...
I have a fix, will submit a PR after lunch.

Discussion:
// FIXME -- it seems like this method actually pushes // duplicate impls onto the list <del> ty::populate_implementations_for_type_if_necessary(self.tcx, trait_def_id); </del> <ins> ty::populate_implementations_for_trait_if_necessary(self.tcx, trait_def_id); </ins> let mut impls = Vec::new(); self.push_impls_of_trait(trait_def_id, &mut impls);

extern crate trait_impl_conflict; use trait_impl_conflict::Foo; <del> impl<A> Foo for A { //~ ERROR E0117 </del> <ins> impl<A> Foo for A { //~^ ERROR E0117 //~^^ ERROR E0119 </ins> } fn main() {
Change:
or similarly The compiler correctly tracks the kind in other contexts. This properly compiles, for example:
Dupe of

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Encoding an enum field with the pretty encoder results in an ExpectedError when decoding. In emitenumvariant of the pretty encoder, "variants" and "fields" need to be to behave the same way as the normal encoder.
Do you have a simple test case?
Taking a look
Closed by
Thank you for fixing this!

Discussion:
if cnt == 0 { escape_str(self.writer, name) } else { <ins> try!(write!(self.writer, "{{n")); </ins> self.curr_indent += self.indent; <del> try!(write!(self.writer, "[n")); </del> try!(spaces(self.writer, self.curr_indent)); <ins> try!(write!(self.writer, ""variant": ")); </ins> try!(escape_str(self.writer, name)); try!(write!(self.writer, ",n")); <ins> try!(spaces(self.writer, self.curr_indent)); try!(write!(self.writer, ""fields": [n")); self.curr_indent += self.indent; </ins> try!(f(self)); self.curr_indent -= self.indent; try!(write!(self.writer, "n")); try!(spaces(self.writer, self.curr_indent)); <del> write!(self.writer, "]") </del> <ins> self.curr_indent -= self.indent; try!(write!(self.writer, "]n")); try!(spaces(self.writer, self.curr_indent)); write!(self.writer, "}}") </ins> } }

let mut encoder = PrettyEncoder::new(writer); animal.encode(&mut encoder).unwrap(); }), <del> " [n   "Frog",n   "Henry",n   349n ]".to_string() </del> <ins> "{n   "variant": "Frog",n   "fields": [n     "Henry",n     349n   ]n }".to_string() </ins> ); }
Change:
jm/mnmnn ;uuhhlllll[;;j..;mn;
Opened by mistake?
Nominating
I apologize, baby at keyboard Daniel On 09/28/2014 06:23 PM, Keegan McAllister wrote:
Our youngest Rust contributor yet? :D

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
When a process exits due to a signal, and that process was launched by a shell, the shell typically treats the exit status of the process to be 128 + the signal number. This is true for bash, fish, and zsh (I haven't tested other shells). Based on this, it would be convenient for to have a method that replicates this behavior, in order to make it easier for programs that don't want to have to care about the distinction between a signal and a normal exit.
I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized. This issue has been moved to the RFCs repo: rust-lang/rfcs

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
I've seen this happen on a linux bot too.
this ticket is almost a year old, is this still happening?
I haven't seen it.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Compilation backtrace Version Seems to be very similar to and , but the difference is trying to send the value over a channel (removing this gives a "cannot move a value of type [u8]: the size of [u8] cannot be statically determined)
Just to update after the 0.12 release. I tried compiling the above example and am getting the same result (so this issue is still relevant).
Reduced test case: Something about the closure lets it get past type checking when it shouldn't.
This looks simple, I'll hopefully have a PR shortly.
Closed by

Discussion:
<ins> // Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms. // Test that moves of unsized values within closures are caught // and rejected. fn main() { (|| box *[0u].as_slice())(); //~^ ERROR cannot move a value of type [uint] } </ins>
Change:
Quoting the Rust Guide: This has two separate problems. First, C has no value named ; C has instead. Second, and more importantly, is not a valid value for a variable of type in C, because has pointer type (typically ). Making a direct analogy to C here requires Rust concepts not yet explained at this point in the guide (pointers). Two possible alternatives: either generalize the explanation a bit with less specific references to C and Rust syntax ("For example, any C string can be NULL, making it invalid to access as a string; a Rust string cannot be null and is always a valid string."). or make an analogy to another language that uses boxed types by default, such as Java.
Just change it from C to C++, since is usually a valid value of type there. ;)
This has been on my list for a while, :+1:. I think the comparison is bad, and would prefer to just re-write this paragraph.=

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Quoting the Rust Guide: This has two separate problems. First, C has no value named ; C has instead. Second, and more importantly, is not a valid value for a variable of type in C, because has pointer type (typically ). Making a direct analogy to C here requires Rust concepts not yet explained at this point in the guide (pointers). Two possible alternatives: either generalize the explanation a bit with less specific references to C and Rust syntax ("For example, any C string can be NULL, making it invalid to access as a string; a Rust string cannot be null and is always a valid string."). or make an analogy to another language that uses boxed types by default, such as Java.
Just change it from C to C++, since is usually a valid value of type there. ;)
This has been on my list for a while, :+1:. I think the comparison is bad, and would prefer to just re-write this paragraph.=

Discussion:
# } fn compute_area(shape: &Shape) -> f64 { match *shape { <del> Circle(_, radius) => 2.0 * std::f64::consts::PI * radius * radius, </del> <ins> Circle(_, radius) => std::f64::consts::PI * radius * radius, </ins> Rectangle(_, ref size) => size.w * size.h } }
Change:
From the first example in 14.5: All three branches of the match should use the same syntax (with braces and semicolon, or without). This likely occurs because the subsequent example adds a "return;" to the Equal case.
Agreed.

Discussion:
# } fn compute_area(shape: &Shape) -> f64 { match *shape { <del> Circle(_, radius) => 2.0 * std::f64::consts::PI * radius * radius, </del> <ins> Circle(_, radius) => std::f64::consts::PI * radius * radius, </ins> Rectangle(_, ref size) => size.w * size.h } }
Change:
Quoting the Rust References and Lifetimes Guide: Without arguing over the merits of pi versus tau, a Rust guide is not the place for introducing a less common mathematical notation that most people will not have seen. Doubly so because this is one of the specific cases where tau is less clear than pi; the equivalent code with pi would not need the extra factor of 0.5. And triply so because this should be using a constant from the standard library, like . All three make this an unnecessary distraction in the middle of a Rust tutorial guide.
This guide is being re-written, and I can assure you, there will be no Tau advocacy in it. That said, in the meantime I would accept a patch to fix this.=

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Quoting the Rust References and Lifetimes Guide: Without arguing over the merits of pi versus tau, a Rust guide is not the place for introducing a less common mathematical notation that most people will not have seen. Doubly so because this is one of the specific cases where tau is less clear than pi; the equivalent code with pi would not need the extra factor of 0.5. And triply so because this should be using a constant from the standard library, like . All three make this an unnecessary distraction in the middle of a Rust tutorial guide.
This guide is being re-written, and I can assure you, there will be no Tau advocacy in it. That said, in the meantime I would accept a patch to fix this.=

Discussion:
# } fn compute_area(shape: &Shape) -> f64 { match *shape { <del> Circle(_, radius) => 2.0 * std::f64::consts::PI * radius * radius, </del> <ins> Circle(_, radius) => std::f64::consts::PI * radius * radius, </ins> Rectangle(_, ref size) => size.w * size.h } }
Change:
Currently it is: This does not compile: Required modifications:
As the guide says, this enum is provided by Rust, and so you're not supposed to define it.
For what it's worth, I stumbled upon this issue as well while learning Rust. I tried an example with my own Enum and the error given by the compiler lead me here.
same here, although this works:

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
Landing was blocked by linking failures in run-pass-fulldeps tests, which were caused by the newly diagnostic description.
This is a very old issue, and the original reporter has deleted their account, so giving a close.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
These are currently included in the binary tarballs, but not actually installed. They need to be part of the installation to comply with the licenses. Probably put them in . Make sure the Mac .pkg and Windows .exe installers do too.
For the windows installation we might also put that 'third-party' directory that deals with the mingw components into this doc directory.
I believe we do this now, so closing.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
As of today October 2nd, the Linux nightly is 2014-09-29. The last three builds have failed: Today’s build failed at : CC
I've unblocked the bot and scheudled a new build.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.
Change:
doesn't come with a variant, but this seems like fairly important functionality for interacting with C code. There's , but not shipping with support for this is sort of a curious omission that belies Rust's appropriateness for slotting into C systems.
Also that thing I linked is super old :v
Didn't realize searching through issues doesn't list PRs anymore. Whoops! Guess I might as well leave this open until the PR merges, thoug.
Really we should expose something that returns a pointer to , if that's possible. C can do it...
moving to now that this is an external crate.

Discussion:
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] <del> The <<_installation,Installation>> section contains details on configuration for some of the editors. </del> <ins> The <<installation,Installation>> section contains details on configuration for some of the editors. </ins> In general `rust-analyzer` is configured via LSP messages, which means that it's up to the editor to decide on the exact format and location of configuration files. Some clients, such as <<vs-code,VS Code>> or <<coc-rust-analyzer,COC plugin in Vim>> provide `rust-analyzer` specific configuration UIs. Others may require you to know a bit more about the interaction with `rust-analyzer`.