messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Write rust code for the following: Add an example of playing a WAV file.\n\nAddresses #458." }, { "role": "assistant", "content": "extern crate sdl2;\n\nuse sdl2::audio::{AudioCallback, AudioSpecDesired,AudioSpecWAV,AudioCVT};\n\n// NOTE: You probably want to invest...
rust
new_file
0
2
mit
9b590614612d73e06f59a799b5546338f4c7e49d
crumblingstatue/rust-sdl2,oldmanmike/rust-sdl2,Cobrand/rust-sdl2,Rust-SDL2/rust-sdl2,Rust-SDL2/rust-sdl2,AngryLawyer/rust-sdl2,bfops/rust-sdl2,wilsoniya/rust-sdl2,vadixidav/rust-sdl2,Rust-SDL2/rust-sdl2,Cobrand/rust-sdl2,Cobrand/rust-sdl2,inrustwetrust/rust-sdl2
examples/audio-wav.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test against possible undefined behavior" }, { "role": "assistant", "content": "#![cfg(feature = \"std\")]\n\nextern crate rand;\nextern crate libc;\n\nuse rand::{FromEntropy, SmallRng};\nuse rand::distributions::{Distribution,...
rust
new_file
0
2
apache-2.0
7b1e068f38297a17ae4ebc7b79d806a2ea2c4ea1
rust-lang/rand
tests/bool.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add simple select usage without a struct" }, { "role": "assistant", "content": "#[macro_use]\nextern crate rustorm_codegen;\nextern crate rustorm_dao as dao;\nextern crate rustorm_dao;\nextern crate rustorm;\nuse rustorm::TableName...
rust
new_file
0
2
mit
3e857645b537d53da6ed52f6d0e348afe7db0cd5
ivanceras/rustorm,ivanceras/rustorm
examples/simple_select.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add testcase for proper LLVM representation of SIMD types.\n\nTestcase to make sure that no 0-sized padding is inserted in structs and that structs are represented as expected by Neon intrinsics in LLVM." }, { "role": "assistant", ...
rust
new_file
3
0
apache-2.0
4a8202c4a68ec6161dbc31dcb5b0ec51d84c9d87
graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust
src/test/codegen/unpadded-simd.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test of impl formatting" }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COPYRIGHT....
rust
new_file
null
null
apache-2.0
bbeace61198ff7f41c01356beb9cfdfd2bb8a87d
jashank/rust,pshc/rust,zubron/rust,jroesch/rust,graydon/rust,zubron/rust,jroesch/rust,l0kod/rust,l0kod/rust,zubron/rust,GBGamer/rust,vhbit/rust,l0kod/rust,dwillmer/rust,dwillmer/rust,dwillmer/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,dwillmer/rust,pshc/rust,jroesch/rust,jroesch/rust,vhbit/rust,zubron/rus...
src/test/rustdoc/impl-parts.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 24" }, { "role": "assistant", "content": "#![feature(collections)]\n#[macro_use] extern crate libeuler;\n\nuse std::collections::HashMap;\nuse std::slice::SliceConcatExt;\n\n/// A permutation is an ordered a...
rust
new_file
0
5
mit
d67ab6aec6c4e719e87619153ed467c663e59cae
zmbush/euler,zmbush/euler
sol_0024/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add Rust code for circular-buffer\n\nIt passed all test cases" }, { "role": "assistant", "content": "use std::collections::VecDeque;\n\npub struct CircularBuffer<T> {\n buffer: VecDeque<T>,\n size: usize,\n}\n\n#[derive(Debug...
rust
new_file
1
2
bsd-2-clause
8ac000c5c52dc33879164e8c65e15b9efa261702
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/circular-buffer/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// pp-exact\nfn f() -> [int]/3 {\n let picard = 0;\n\n let data = 1;\n\n let worf = 2;\n\n\n let enterprise = [picard, data, worf]/_;\n\n\n\n return enterprise;\n}\n\n```\n\nApply this change: Fix a pprint test for fixed-length...
rust
edit
null
null
apache-2.0
684d945ab78d6779c198dcb4a340b2269b0fb8aa
TheNeikos/rust,kwantam/rust,gifnksm/rust,cllns/rust,dinfuehr/rust,dwillmer/rust,erickt/rust,LeoTestard/rust,victorvde/rust,andars/rust,kwantam/rust,jbclements/rust,sae-bom/rust,krzysz00/rust,stepancheg/rust-ide-rust,j16r/rust,TheNeikos/rust,ebfull/rust,richo/rust,rprichard/rust,mahkoh/rust,achanda/rand,reem/rust,P1star...
src/test/pretty/blank-lines.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for grade-school\n\nIt passed all testcases. It is better to use a sorted link list." }, { "role": "assistant", "content": "const MAX_GRADES: usize = 9;\n\n#[derive(Default)]\npub struct School {\n db: Vec<Vec<Stri...
rust
new_file
0
3
bsd-2-clause
c8df44b9bc7163553177c0fbf56374108c24b614
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/grade-school/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test use of impl Trait in an impl as the value for an associated type in an impl trait" }, { "role": "assistant", "content": "// check-pass\n\n#![feature(type_alias_impl_trait)]\n#![allow(dead_code)]\n\ntype Foo = impl Iterator<Ite...
rust
new_file
0
1
apache-2.0
dcfff23c279bd022664b704e0270ae4ff8a31606
graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-impl-trait.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for phone-number case\n\nI will clean up code later. Currently it works." }, { "role": "assistant", "content": "#![feature(ascii_ctype)]\nuse std::ascii::AsciiExt;\n\n\nfn check_countrycode(mut phone: Vec<u8>) -> Opti...
rust
new_file
2
2
bsd-2-clause
00a2d1865113cd4e8ac0a67bfa8f5628df74c542
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/phone-number/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 44" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\n\n/// Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers\n/// are:\n///\n/// 1, 5, ...
rust
new_file
0
7
mit
3453b235fe19ab92c6f9f81a7d94d6eb5d7a5c65
zmbush/euler,zmbush/euler
sol_0044/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 28" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\n\n/// Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is\n/// formed as follows:\n//...
rust
new_file
0
3
mit
23248f82010d157fb924bf15571fa1cae388f23f
zmbush/euler,zmbush/euler
sol_0028/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for nth-prime\n\nIt passed all testcases" }, { "role": "assistant", "content": "pub fn nth(index: u32) -> Result<u32, String> {\n if index == 0 {\n return Err(\"Invalid index\".to_string());\n }\n\n le...
rust
new_file
0
4
bsd-2-clause
a7e97c3722945eb6afa1448fd33d68c10c873d5a
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/nth-prime/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 53" }, { "role": "assistant", "content": "#![feature(core)]\n#[macro_use] extern crate libeuler;\n\nuse std::collections::HashMap;\nuse std::iter::range_inclusive;\n/// There are exactly ten ways of selectin...
rust
new_file
0
7
mit
c0cb1777dcfc28c2f3df8207d261b657d011a041
zmbush/euler,zmbush/euler
sol_0053/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test CU directory is the work_dir\n\nMake sure that we don't regress setting of the CU directory to the\nworking directory." }, { "role": "assistant", "content": "// compile-flags: -g --remap-path-prefix={{cwd}}=/cwd/ --remap-path-...
rust
new_file
0
0
apache-2.0
a0e8103ea3648240af84e6960b2c3ba0b2b12f67
aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/codegen/debug-compile-unit-path.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Read all header from a Fits file" }, { "role": "assistant", "content": "extern crate nom;\nextern crate fits_rs;\n\nuse std::env;\nuse std::fs::File;\nuse std::io::Read;\nuse std::str::FromStr;\nuse nom::IResult;\nuse fits_rs::pars...
rust
new_file
0
4
mit
8396b2f0412a0e447b756ddaa3551c3ac6cf0db7
fifth-postulate/fits-rs
src/bin/headers.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add macros to simplify reading from stdin in Rust" }, { "role": "assistant", "content": "macro_rules! read_line {\n ($v:ident) => {\n let mut temp = String::new();\n std::io::stdin().read_line(&mut temp).unwrap();\...
rust
new_file
2
0
mit
ab1c974231ea8f3824a9c8f0c12c39e4c0f3487e
caizixian/algorithm_exercise,caizixian/algorithm_exercise,caizixian/algorithm_exercise,caizixian/algorithm_exercise,caizixian/algorithm_exercise
rust_input_macro.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test of Display and Debug impls" }, { "role": "assistant", "content": "use anyhow::{bail, Context, Result};\n\nfn f() -> Result<()> {\n bail!(\"oh no!\");\n}\n\nfn g() -> Result<()> {\n f().context(\"f failed\")\n}\n\nfn ...
rust
new_file
0
1
apache-2.0
504107ef467877a640f5bb1ff985bfe29318eb92
dtolnay/anyhow
tests/test_fmt.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for source files feature" }, { "role": "assistant", "content": "// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COPY...
rust
new_file
0
0
apache-2.0
1b432a612f24581717dc9d5f2f13873d187bb5bd
graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust
src/test/rustdoc/source-file.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for luhn\n\nIt is ugly but works" }, { "role": "assistant", "content": "pub fn is_valid(id: &str) -> bool {\n // check the length\n if id.len() < 2 {\n return false;\n }\n\n let mut index: u32 = 0;\...
rust
new_file
0
8
bsd-2-clause
db443a09e43130663d476d672423715f1101e78c
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/luhn/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a point counting example" }, { "role": "assistant", "content": "//! Count the number of points in the file twice, once with sync-to-pps and once without.\n\nextern crate scanifc;\n\nuse scanifc::point3d::Stream;\n\nfn main() {\...
rust
new_file
0
1
mit
b91d29e844fb1ee73a148e1bef8fa563e7470e39
gadomski/rivlib-rs,gadomski/rivlib-rs,gadomski/rivlib-rs
scanifc/examples/count-points.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test of anyhow macro tagged dispatch" }, { "role": "assistant", "content": "use anyhow::anyhow;\nuse std::error::Error as StdError;\nuse std::fmt::{self, Display};\nuse std::io;\n\n#[derive(Debug)]\nenum TestError {\n Io(io:...
rust
new_file
0
2
apache-2.0
55d054427c3645bd1d974faba1ba08f00a272a51
dtolnay/anyhow
tests/test_source.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test demonstrating the limitations of our lfietime resolution" }, { "role": "assistant", "content": "trait Id {\n type Out;\n\n fn id(self) -> Self::Out;\n}\n\nimpl<'a> Id for &'a mut i32 {\n type Out = &'a mut i32;\...
rust
new_file
0
3
apache-2.0
90edc03eeaa94bdf21c35a6bbe9320d922b1f8a2
aidancully/rust,graydon/rust,GBGamer/rust,rust-lang/miri,graydon/rust,aidancully/rust,tsion/miri,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,rust-lang/miri,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,rust-lang/miri...
tests/run-pass/validation_lifetime_resolution.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Create a algebraic datatype code sample" }, { "role": "assistant", "content": "enum Tree {\n Empty,\n Leaf(i32),\n Node(Box<Tree>, Box<Tree>)\n}\n\nimpl std::fmt::Display for Tree {\n fn fmt(&self, f: &mut std::fmt::For...
rust
new_file
3
2
mit
5fd24585896131918d487db66a6c785d681e7e7e
fifth-postulate/learn-a-language-Rust,fifth-postulate/learn-a-language-Rust,fifth-postulate/learn-a-language-Rust
code-samples/algebraic-datatype.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Move along; nothing to see here..." }, { "role": "assistant", "content": "fn main() {\n\n // The Internet made me do it.\n\n obj cat() {\n fn ack() -> str {\n ret \"ack\";\n }\n fn meow() -> st...
rust
new_file
null
null
apache-2.0
bf84d20f7cfba43abb7c895f31b3da23c1fd4a9a
sarojaba/rust-doc-korean,rohitjoshi/rust,0x73/rust,TheNeikos/rust,quornian/rust,fabricedesre/rust,defuz/rust,nham/rust,jashank/rust,zaeleus/rust,SiegeLord/rust,rohitjoshi/rust,mdinger/rust,vhbit/rust,jbclements/rust,pshc/rust,AerialX/rust,rprichard/rust,hauleth/rust,pythonesque/rust,philyoon/rust,graydon/rust,victorvde...
src/test/run-pass/anon-obj-cats.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add test case for omitting dllimport during cross-lang LTO." }, { "role": "assistant", "content": "// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n//...
rust
new_file
0
0
apache-2.0
386e000c5f28dfac697ae145524bcc1c17759993
GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust
src/test/codegen/no-dllimport-w-cross-lang-lto.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add failing test for rosmsg derives" }, { "role": "assistant", "content": "// Long arrays as message fields cause a structure to be unable to automatically derive.\n//\n// Compilation of this test makes sure this is handled for tho...
rust
new_file
0
1
mit
6daac770a2b1fafeafd25e45c0f507456fc316e2
adnanademovic/rosrust
rosrust/tests/derive_array_test.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for unique boxes containing shared boxes\n\nIssue #409" }, { "role": "assistant", "content": "use std;\nimport std::sys::rustrt::refcount;\n\nfn main() {\n let i = ~@1;\n let j = ~@2;\n let rc1 = refcount(*i);\n...
rust
new_file
null
null
apache-2.0
3bb70359140062125405c6f592bd23dc34280e4b
michaelballantyne/rust-gpu,gifnksm/rust,aturon/rust,pczarn/rust,seanrivera/rust,l0kod/rust,shepmaster/rand,jroesch/rust,kimroen/rust,philyoon/rust,0x73/rust,michaelballantyne/rust-gpu,LeoTestard/rust,aturon/rust,barosl/rust,nham/rust,erickt/rust,cllns/rust,vhbit/rust,fabricedesre/rust,jbclements/rust,avdi/rust,pythones...
src/test/run-pass/unique-copy-box.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add a really basic example" }, { "role": "assistant", "content": "extern mod glfw;\nextern mod gl;\n\n#[start]\nfn start(argc: int, argv: **u8, crate_map: *u8) -> int {\n // Run GLFW on the main thread\n std::rt::start_on_mai...
rust
new_file
null
null
apache-2.0
bf334ee68f26b5bb5c63d06bc84a978f6130ee82
nicokoch/gl-rs,tomaka/gl-rs,jimarnold/gl-rs,skligys/gl-rs,tomaka/gl-rs,bjz/gl-rs,skligys/gl-rs,jimarnold/gl-rs,neon64/gl-rs,nicokoch/gl-rs,bjz/gl-rs,neon64/gl-rs
examples/ptr_example.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for clock case\n\nIt passed all testcases" }, { "role": "assistant", "content": "#[derive(Debug, PartialEq)]\npub struct Clock {\n hour: i32,\n minute: i32,\n}\n\nimpl Clock {\n #[inline]\n fn normalize(ho...
rust
new_file
0
3
bsd-2-clause
af6cd08c4faefa7717cf1c1375bd40d0b2f5fb67
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/clock/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test case for Self:: links" }, { "role": "assistant", "content": "#![crate_name = \"foo\"]\n// @has foo/enum.E1.html '//a/@href' '../foo/enum.E1.html#variant.A'\n\n/// [Self::A::b]\npub enum E1 {\n A { b: usize }\n}\n\n// @h...
rust
new_file
0
0
apache-2.0
fa64c272c8253c9df01fa4c28e34095735411e0e
aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust
src/test/rustdoc/intra-link-self-cache.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test case for calling generic functions taking alias args with box types" }, { "role": "assistant", "content": "// xfail-boot\n// xfail-stage0\n\nfn id[T](&T t) -> T {\n ret t;\n}\n\nfn main() {\n auto expected = @100;\n a...
rust
new_file
null
null
apache-2.0
0abccc6370a6f943f9f41e6baec444dd3de2182a
cllns/rust,bombless/rust,pelmers/rust,aturon/rust,dinfuehr/rust,fabricedesre/rust,mvdnes/rust,michaelballantyne/rust-gpu,0x73/rust,pczarn/rust,aidancully/rust,sae-bom/rust,sarojaba/rust-doc-korean,ejjeong/rust,mihneadb/rust,kmcallister/rust,ktossell/rust,P1start/rust,ktossell/rust,aidancully/rust,ebfull/rust,kmcalliste...
src/test/run-pass/generic-alias-box.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Test case for new `derive(PartialOrd)` expansion." }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://ru...
rust
new_file
2
1
apache-2.0
c44d40e77f4dabbfff95a715006523b73918a7c4
rohitjoshi/rust,reem/rust,KokaKiwi/rust,robertg/rust,aneeshusa/rust,TheNeikos/rust,jashank/rust,sae-bom/rust,jashank/rust,reem/rust,miniupnp/rust,avdi/rust,kwantam/rust,ruud-v-a/rust,nwin/rust,KokaKiwi/rust,philyoon/rust,jroesch/rust,GBGamer/rust,graydon/rust,ejjeong/rust,kwantam/rust,omasanori/rust,zachwick/rust,XMPPw...
src/test/run-pass/issue-15523.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test that all structs are actually empty" }, { "role": "assistant", "content": "extern crate llvm_safe;\n\nuse std::mem;\n\nuse llvm_safe::llvm::{BasicBlock, Label, Builder, PositionedBuilder, Constant, Context, Function, FunctionL...
rust
new_file
0
1
mit
233972d3b5222e3c7c7cce1ec4b6f15ab348dbcc
gereeter/llvm-safe,gereeter/compiler
tests/all_empty.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add weird return types TAIT test" }, { "role": "assistant", "content": "// edition:2018\n// check-pass\n\n#![feature(type_alias_impl_trait)]\n#![allow(dead_code)]\n\nuse std::future::Future;\nuse std::fmt::Debug;\n\ntype Foo = impl...
rust
new_file
0
1
apache-2.0
6ac223582f1d6f47c6eccf969613c50c80bd45ea
aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust
src/test/ui/type-alias-impl-trait/weird-return-types.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for rna-transcription\n\nIt passes all tests" }, { "role": "assistant", "content": "#[derive(Debug, PartialEq)]\npub struct RibonucleicAcid(String);\n\nimpl RibonucleicAcid {\n pub fn new(serial: &str) -> Ribonucle...
rust
new_file
0
3
bsd-2-clause
d5e170ad7496b7eb157b89e817ec1cdc8432f7ac
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/rna-transcription/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a super simple example with a moving rectangle" }, { "role": "assistant", "content": "extern crate ggez;\nuse ggez::conf;\nuse ggez::event;\nuse ggez::{GameResult, Context};\nuse ggez::graphics;\nuse ggez::graphics::{Color, Dra...
rust
new_file
0
2
mit
a60463811696434ed888b00cb8baa34496c0cca5
sjaustirni/ggez,kampffrosch94/ggez,ggez/ggez
examples/super_simple.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add example for parse and eval R code from string" }, { "role": "assistant", "content": "extern crate libc;\nextern crate libr;\nuse std::ptr;\nuse std::env;\nuse std::ffi::{CStr, CString};\n\nuse libr::ffi::internals::*;\nuse libr...
rust
new_file
0
2
mit
983acca366425ff7fd1dd4d6d65dfc213c3264a1
zitsen/libr.rs,zitsen/libr.rs
examples/03-embedded-parse-eval.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add regression test for ICE in constant blocks" }, { "role": "assistant", "content": "// Copyright 2016 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-...
rust
new_file
0
1
apache-2.0
94a055263eb96bf7f692854a0d16ade2f65d3b27
GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust
src/test/compile-fail/issue32829.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an idealistic test for optimize attribute\n\nAlas it does not currently work, because of limitations in compiletest…" }, { "role": "assistant", "content": "// revisions: NO-OPT SIZE-OPT SPEED-OPT\n// [NO-OPT]compile-flags: -Cop...
rust
new_file
0
1
apache-2.0
dcf5482cdacd166268f9672f34697dd1da05ceea
aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/codegen/optimize-attr-1.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a binary for the example\n\nThis makes `cargo run --example rust-issue-30123` run an example!" }, { "role": "assistant", "content": "extern crate multirust;\nextern crate rust_bisect;\nextern crate rust_install;\n\nuse std::env...
rust
new_file
0
1
mit
331d1e95dfad89beb3297a41549031905790db51
kamalmarhubi/rust-bisect,kamalmarhubi/rust-bisect
examples/rust-issue-30123.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for eval order for a+=b\n\nYes, the order of evaluation *does* change depending on the types of\nthe operands. Cursed, I know.\n\nI've elected to place this test into `expr/compound-assignment` creating\nboth the `expr` directory and ...
rust
new_file
0
2
apache-2.0
b6f9705804dd590ef9fa2842bae59ec7d9130f10
graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust
src/test/ui/expr/compound-assignment/eval-order.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add meh solution for problem 19" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\n\n\n\n// You are given the following information, but you may prefer to do some research for yourself.\n//\n// 1 Jan 1900 ...
rust
new_file
0
4
mit
dc9dc2fd9e9618b7ad0eb541b07cf7528d9b6f6b
zmbush/euler,zmbush/euler
sol_0019/main.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse std;\n\nfn f() {\n}\n\nimport std::io::println; //~ ERROR view items must be declared at the top\n\nfn main() {\n}\n\n\n```\n\nApply this change: test: Use a mod that exists in view-item-at-top" }, { "role": "assistant", "c...
rust
edit
null
null
apache-2.0
ffe74b7a3b7647019af2a0962a3dcd8db72a4952
sae-bom/rust,hauleth/rust,quornian/rust,kimroen/rust,graydon/rust,omasanori/rust,pshc/rust,kimroen/rust,rprichard/rust,rprichard/rust,rprichard/rust,servo/rust,aepsil0n/rust,emk/rust,defuz/rust,avdi/rust,omasanori/rust,pythonesque/rust,vhbit/rust,stepancheg/rust-ide-rust,quornian/rust,pczarn/rust,miniupnp/rust,pelmers/...
src/test/compile-fail/view-items-at-top.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add a benchmark test for buffer tokens" }, { "role": "assistant", "content": "#![feature(test)]\n\nextern crate test;\nextern crate scribe;\n\nuse test::Bencher;\nuse scribe::Workspace;\nuse std::path::PathBuf;\n\n#[bench]\nfn benc...
rust
new_file
0
2
mit
c0459d12c48048cfb44010dbd088701a201645ca
jmacdonald/scribe
benches/buffer_tokens.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for {impl,declare}_lint_pass macros" }, { "role": "assistant", "content": "// compile-flags: -Z unstable-options\n// check-pass\n\n#![feature(rustc_private)]\n\nextern crate rustc_session;\n\nuse rustc_session::lint::{Lint...
rust
new_file
0
1
apache-2.0
b12489248084f1ea33008e9b77ad2bbd41ee0f7f
graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust
src/test/ui-fulldeps/lint-pass-macros.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add new minimal test for current blocker on bootstrapping." }, { "role": "assistant", "content": "// xfail-stage0\n\ntag colour { red; green; }\n\nobj foo[T]() {\n fn meth(&T x) {\n }\n}\n\nfn main() {\n foo[colour]().meth(red);...
rust
new_file
null
null
apache-2.0
83829906274f643a75623f1f32f3f04ecbaeb5e5
mahkoh/rust,mihneadb/rust,philyoon/rust,AerialX/rust,pshc/rust,michaelballantyne/rust-gpu,XMPPwocky/rust,AerialX/rust-rt-minimal,rprichard/rust,bombless/rust-docs-chinese,GBGamer/rust,ebfull/rust,krzysz00/rust,0x73/rust,pczarn/rust,jbclements/rust,AerialX/rust,philyoon/rust,dwillmer/rust,KokaKiwi/rust,seanrivera/rust,m...
src/test/run-pass/tag-and-generic-obj.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add bench server example with settings usage." }, { "role": "assistant", "content": "\n/// WebSocket server used for testing the bench example.\nextern crate ws;\n\nuse ws::{Builder, Settings, Sender};\n\nfn main () {\n Builder:...
rust
new_file
0
1
mit
7a0de0a798a75570569afd67389bceedeb8e8efc
housleyjk/ws-rs
examples/bench-server.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test that `core::assert!` is valid" }, { "role": "assistant", "content": "// compile-flags: --crate-type=lib\n// check-pass\n// issue #55482\n#![no_std]\n\nmacro_rules! foo {\n ($e:expr) => {\n $crate::core::assert!($e);\...
rust
new_file
0
1
apache-2.0
5afb95a6ca94071a67fb4ab74a1636ea7dfaaa5d
aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust
src/test/ui/no-std-macros.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add a compile-fail test for attribute/syntax parsing\n\nI don't currently know how to deal with syntax extensions that appear betweeen\nan attribute and an item, so this test captures the error that occurs.\n\nIssue #487" }, { "r...
rust
new_file
null
null
apache-2.0
14c5900a701bf5d08f9512cbac52a8bf7dc8f4ef
j16r/rust,jbclements/rust,Ryman/rust,waynenilsen/rand,reem/rust,graydon/rust,graydon/rust,KokaKiwi/rust,aneeshusa/rust,aturon/rust,vhbit/rust,barosl/rust,AerialX/rust,jbclements/rust,emk/rust,fabricedesre/rust,dinfuehr/rust,SiegeLord/rust,pelmers/rust,AerialX/rust,untitaker/rust,rohitjoshi/rust,servo/rust,ebfull/rust,e...
src/test/compile-fail/ext-after-attrib.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![feature(phase)]\n#[phase(plugin)]\nextern crate regex_macros;\nextern crate regex;\n\nuse std::collections::HashMap;\n\nmod lexer;\nmod parser;\n\nstruct Liquid {\n text: String,\n content: HashMap<String, String>\n}\n\nimpl Liquid {...
rust
edit
2
1
mit
7c5526bee4c9bae95800a18aaf6cc9e55562fd5a
cobalt-org/liquid-rust,kaj/liquid-rust,tcsc/liquid-rust,Albibek/liquid-rust
src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test of common PartialEq cases" }, { "role": "assistant", "content": "use serde_bytes::{Bytes, ByteBuf};\n\nfn _bytes_eq_slice(bytes: &Bytes, slice: &[u8]) -> bool {\n bytes == slice\n}\n\nfn _bytebuf_eq_vec(bytebuf: ByteBuf...
rust
new_file
0
1
apache-2.0
983cb32b40bbf15be8977dbfdca9d4e2691e8e56
serde-rs/bytes
tests/test_partialeq.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test that tests typestate checking inside of fn exprs." }, { "role": "assistant", "content": "// error-pattern:Unsatisfied precondition\n// xfail-stage0\n\nfn main() {\n // Typestate should work even in a lambda. we should...
rust
new_file
null
null
apache-2.0
4499ebe858c9e1cf61e12f6735d88a49b56bfd13
gifnksm/rust,victorvde/rust,ejjeong/rust,cllns/rust,mitsuhiko/rust,quornian/rust,jroesch/rust,kmcallister/rust,aidancully/rust,pshc/rust,philyoon/rust,untitaker/rust,zubron/rust,graydon/rust,rprichard/rust,AerialX/rust,mdinger/rust,SiegeLord/rust,zaeleus/rust,sae-bom/rust,Ryman/rust,jashank/rust,KokaKiwi/rust,jbclement...
src/test/compile-fail/fn-expr-type-state.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add a run-pass-valgrind test for vecdeque issue" }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust...
rust
new_file
0
1
apache-2.0
81bac74c2ddc6c39f3628a36966f4a56a1282d02
graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust
src/test/run-pass-valgrind/issue-44800.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add unit tests for new lint" }, { "role": "assistant", "content": "#![warn(clippy::for_loops_over_options)]\n\nfn main() {\n let x = vec![Some(1), Some(2), Some(3)];\n for n in x {\n if let Some(n) = n {\n p...
rust
new_file
5
8
apache-2.0
949b12589112cecad9566305444527ec0738d521
aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust
tests/ui/for_loops_over_options.rs
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write rust code for the following: Add test for sidebar link generation" }, { "role": "assistant", "content": "// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/C...
rust
new_file
0
1
apache-2.0
c746ecfa0190548f78afe62d4d8e4140ac4e4621
aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/rustdoc/sidebar-link-generation.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![crate_name = \"http\"]\n\n#![comment = \"Rust HTTP server\"]\n#![license = \"MIT/ASL2\"]\n#![crate_type = \"dylib\"]\n#![crate_type = \"rlib\"]\n\n#![doc(html_root_url = \"http://www.rust-ci.org/chris-morgan/rust-http/doc/\")]\n\n#![deny(n...
rust
edit
0
0
apache-2.0
273e4dbae118434631bf0ac1aaec6d28c8c356be
servo/rust-http,Shraddha512/rust-http,Shraddha512/rust-http,Shraddha512/rust-http,servo/rust-http,servo/rust-http,Shraddha512/rust-http,servo/rust-http,Shraddha512/rust-http
src/http/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for unknown attribute lint" }, { "role": "assistant", "content": "// Copyright 2013 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/CO...
rust
new_file
0
0
apache-2.0
b4ad3363f3ce5facdaac7384892319914f119177
carols10cents/rust,kwantam/rust,mitsuhiko/rust,cllns/rust,avdi/rust,pshc/rust,ejjeong/rust,bombless/rust,mitsuhiko/rust,aneeshusa/rust,graydon/rust,emk/rust,vhbit/rust,michaelballantyne/rust-gpu,richo/rust,graydon/rust,vhbit/rust,gifnksm/rust,graydon/rust,servo/rust,nwin/rust,pelmers/rust,l0kod/rust,0x73/rust,graydon/r...
src/test/compile-fail/lint-unknown-attr.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a frame data example" }, { "role": "assistant", "content": "use std::env;\n\nuse getopts::Options;\nuse pdb::FallibleIterator;\n\nfn print_usage(program: &str, opts: Options) {\n let brief = format!(\"Usage: {} input.pdb\", ...
rust
new_file
0
10
apache-2.0
b8542fb1fd48414f752c6bfaf6d4cc095cbe99d7
willglynn/pdb,willglynn/pdb
examples/pdb_framedata.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for missing stability checker" }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org...
rust
new_file
2
1
apache-2.0
4aa661ab3608551edab18584b958d281f8e4c094
avdi/rust,andars/rust,omasanori/rust,AerialX/rust-rt-minimal,dwillmer/rust,aidancully/rust,untitaker/rust,dwillmer/rust,philyoon/rust,krzysz00/rust,l0kod/rust,graydon/rust,zubron/rust,cllns/rust,ejjeong/rust,jashank/rust,XMPPwocky/rust,TheNeikos/rust,jroesch/rust,graydon/rust,ejjeong/rust,ruud-v-a/rust,AerialX/rust-rt-...
src/test/compile-fail/missing-stability.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for mismatched types when comparing functions" }, { "role": "assistant", "content": "// xfail-stage0\n// error-pattern:expected fn() but found fn(int)\n\nfn main() {\n fn f() {}\n fn g(int i) {}\n auto x = f == g;\n}"...
rust
new_file
null
null
apache-2.0
51d07830baddf3bbcee7352986050721abdca131
j16r/rust,aepsil0n/rust,krzysz00/rust,pelmers/rust,zachwick/rust,miniupnp/rust,michaelballantyne/rust-gpu,rprichard/rust,l0kod/rust,barosl/rust,michaelballantyne/rust-gpu,pelmers/rust,j16r/rust,sae-bom/rust,mihneadb/rust,mvdnes/rust,sae-bom/rust,mihneadb/rust,seanrivera/rust,reem/rust,gifnksm/rust,stepancheg/rust-ide-r...
src/test/compile-fail/fn-compare-mismatch.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 30" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\n\n/// Surprisingly there are only three numbers that can be written as the sum of fourth powers of\n/// their digits:\n///\n/// ...
rust
new_file
0
3
mit
fdf45564a388bd31a8a0161ce77047d8f10e49c1
zmbush/euler,zmbush/euler
sol_0030/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add a crust function stress test" }, { "role": "assistant", "content": "// This creates a bunch of yielding tasks that run concurrently\n// while holding onto C stacks\n\nnative mod rustrt {\n fn rust_dbg_call(cb: *u8,\n ...
rust
new_file
null
null
apache-2.0
9f95ccb4269f2bb795c56d0fa7692cb7705c608e
krzysz00/rust,Ryman/rust,j16r/rust,0x73/rust,jashank/rust,KokaKiwi/rust,jroesch/rust,jbclements/rust,ruud-v-a/rust,ebfull/rust,cllns/rust,kmcallister/rust,reem/rust,mdinger/rust,sarojaba/rust-doc-korean,mitsuhiko/rust,carols10cents/rust,TheNeikos/rust,richo/rust,gifnksm/rust,miniupnp/rust,sae-bom/rust,jbclements/rust,0...
src/test/run-pass/crust-stress.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add an example to read password" }, { "role": "assistant", "content": "use std::borrow::Cow::{self, Borrowed, Owned};\n\nuse rustyline::completion::Completer;\nuse rustyline::config::Configurer;\nuse rustyline::highlight::Highlight...
rust
new_file
0
3
mit
f1cfa35b7c13524bd610d28ec12d8d8ef2b90ab7
kkawakam/rustyline
examples/read_password.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add ui test of handwritten Drop for shared struct" }, { "role": "assistant", "content": "#[cxx::bridge]\nmod ffi {\n struct Shared {\n fd: i32,\n }\n}\n\nimpl Drop for ffi::Shared {\n fn drop(&mut self) {\n p...
rust
new_file
0
1
apache-2.0
a91012640275e3e186a43a2efeb0fa090492d060
dtolnay/cxx,dtolnay/cxx,dtolnay/cxx,dtolnay/cxx
tests/ui/drop_shared.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test to ensure unadjusted stays unstable" }, { "role": "assistant", "content": "// Copyright 2016 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-la...
rust
new_file
0
1
apache-2.0
d166ee96649bddf88f8496733562c49b986d4ef1
aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,graydon/rust,GBGamer/rust
src/test/compile-fail/unadjusted-unstable.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test ASCII ctype methods in a const context" }, { "role": "assistant", "content": "// run-pass\n\n#![feature(const_ascii_ctype_on_intrinsics)]\n\nmacro_rules! suite {\n ( $( $fn:ident => [$a:ident, $A:ident, $nine:ident, $dot:id...
rust
new_file
1
1
apache-2.0
ea958422da4f90b7158e007d5c3226c41d0a5f57
aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust
src/test/ui/consts/ascii_ctype.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// Copyright 2012 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COPYRIGHT.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n//...
rust
edit
3
1
apache-2.0
28885635108c6def3c2503cbcaeba90fbd011f90
aturon/rust,dwillmer/rust,seanrivera/rust,rohitjoshi/rust,l0kod/rust,mahkoh/rust,jbclements/rust,jashank/rust,0x73/rust,servo/rust,arthurprs/rand,cllns/rust,barosl/rust,nham/rust,victorvde/rust,KokaKiwi/rust,untitaker/rust,mahkoh/rust,nwin/rust,philyoon/rust,pczarn/rust,mdinger/rust,nwin/rust,defuz/rust,kimroen/rust,py...
src/test/compile-fail/regions-in-structs.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Move inner deflate function as well" }, { "role": "assistant", "content": "use std::mem;\nuse crate::{MZResult, MZFlush, MZError, MZStatus};\nuse crate::deflate::core::{TDEFLStatus, TDEFLFlush, CompressorOxide, compress};\n\npub fn...
rust
new_file
0
13
mit
0563540217bfa8c7bb6daa8926591effb8c28e91
Frommi/miniz_oxide,Frommi/miniz_oxide,Frommi/miniz_oxide,Frommi/miniz_oxide
miniz_oxide/src/deflate/state.rs
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Write rust code for the following: Add ui test for writing anyhow instead of bail\n\nCurrently fails:\n\n Expected test case to fail to compile, but it succeeded." }, { "role": "assistant", "content": "#![deny(unused_must_use)]\n\nuse anyhow::anyhow;\n\nfn main()...
rust
new_file
0
2
apache-2.0
06826d1d79d9eaef36bb84baec23f6d23329fb8b
dtolnay/anyhow
tests/ui/must-use.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![cfg(any(target_arch=\"x86\", target_arch=\"x86_64\"))]\n\n#![feature(const_fn)]\n#![feature(asm)]\n#![feature(associated_consts)]\n#![no_std]\n#![cfg_attr(test, allow(unused_features))]\n\n#[macro_use]\nextern crate bitflags;\n\n#[macro_us...
rust
edit
6
0
mit
7234146529386a0d59817055c847b5e906ab605c
phil-opp/rust-x86_64,rexlunae/redox,rexlunae/redox,gz/rust-x86,gz/rust-x86,rexlunae/redox
src/lib.rs
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Write rust code for the following: Add const generics tests for supertraits + dyn traits." }, { "role": "assistant", "content": "// check-pass\n// revisions: full min\n\n#![cfg_attr(full, feature(const_generics))]\n#![cfg_attr(full, allow(incomplete_features))]\n#![...
rust
new_file
11
1
apache-2.0
9e60f4511e39d012d5a21c10c55d706ec1e75e53
aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust
src/test/ui/const-generics/dyn-supertraits.rs
rejected_lint
Too many lint violations: 11
true
[ { "role": "user", "content": "Write rust code for the following: Add test for cross crate newtype struct in match pattern." }, { "role": "assistant", "content": "// Copyright 2013 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// h...
rust
new_file
null
null
apache-2.0
10f290ef68870e54e6b5bcc75e953210a26b46e9
ejjeong/rust,j16r/rust,hauleth/rust,pczarn/rust,jashank/rust,barosl/rust,l0kod/rust,aepsil0n/rust,retep998/rand,l0kod/rust,omasanori/rust,P1start/rust,stepancheg/rust-ide-rust,AerialX/rust-rt-minimal,SiegeLord/rust,servo/rust,hauleth/rust,kimroen/rust,j16r/rust,carols10cents/rust,michaelballantyne/rust-gpu,jbclements/r...
src/test/run-pass/cross-crate-newtype-struct-pat.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for minesweeper case\n\nIt passsed all testcases" }, { "role": "assistant", "content": "#[inline]\nfn neighbors(x: usize, y: usize, width: usize, height: usize) -> Vec<(usize, usize)> {\n let mut result = Vec::new(...
rust
new_file
0
13
bsd-2-clause
f2cafbef78223a16abf242830fc8182fe6be7779
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/minesweeper/src/lib.rs
rejected_complexity
Cyclomatic complexity too high: 13
true
[ { "role": "user", "content": "Write rust code for the following: Test that associated types are not required as type parameters\n\nCloses #18173" }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this dis...
rust
new_file
3
1
apache-2.0
84d6dcb351f34443a1b98803cc797ad902f900ad
jashank/rust,robertg/rust,gifnksm/rust,seanrivera/rust,zachwick/rust,TheNeikos/rust,GBGamer/rust,jroesch/rust,graydon/rust,l0kod/rust,cllns/rust,graydon/rust,cllns/rust,aepsil0n/rust,jroesch/rust,GBGamer/rust,graydon/rust,mvdnes/rust,l0kod/rust,jashank/rust,robertg/rust,GBGamer/rust,reem/rust,dwillmer/rust,jashank/rust...
src/test/run-pass/issue18173.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add example for embedded named R function call." }, { "role": "assistant", "content": "extern crate libc;\nextern crate libr;\nuse libc::c_int;\nuse std::ptr;\nuse std::env;\nuse std::ffi::{CStr, CString};\n\nuse libr::ffi::interna...
rust
new_file
0
2
mit
b98da0b8fa020555f9f0c96471c88d850a6095b4
zitsen/libr.rs,zitsen/libr.rs
examples/02-embedded-named-call.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add ATM example from paper" }, { "role": "assistant", "content": "#[macro_use] extern crate session_types;\nuse session_types::*;\nuse std::thread::spawn;\n\ntype Id = String;\ntype Atm = Recv<Id, Choose<Rec<AtmInner>, Eps>>;\n\nty...
rust
new_file
0
3
mit
2088cf3de6debf6324da5fbe2f772a5643547e97
Munksgaard/session-types
examples/atm.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: incr.comp.: Add test case for dependency graph of type aliases." }, { "role": "assistant", "content": "// Copyright 2016 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at...
rust
new_file
1
1
apache-2.0
f320004a1b17d14f231410dc8238e425751539f0
GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust
src/test/compile-fail/dep-graph-type-alias.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solutions for day 11." }, { "role": "assistant", "content": "extern crate aoc;\n\nfn increment(s: &mut [u8]) {\n let mut i = s.len() - 1;\n\n while s[i] == b'z' {\n if i == 0 {\n panic!(\"can't increment...
rust
new_file
0
2
isc
b0248b44e2bd3e43075b1db1c4e51c69a179f14f
tsion/aoc
src/bin/day11.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse super::*;\nuse redox::*;\n\nimpl Editor {\n pub fn exec(&mut self, Inst(n, cmd): Inst) {\n use super::Mode::*;\n use super::PrimitiveMode::*;\n use super::CommandMode::*;\n match self.cursor().mode {\n ...
rust
edit
0
3
mit
e5299c9a2fec3a0e826f53374884523c17927803
Lacaranian/redox,rexlunae/redox,Lacaranian/redox,Lacaranian/redox,rexlunae/redox,Lacaranian/redox,rexlunae/redox,Lacaranian/redox
filesystem/apps/sodium/exec.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add integration test checking false positive rate and also includes a simple check for no false negatives." }, { "role": "assistant", "content": "extern crate cuckoofilter;\nuse cuckoofilter::CuckooFilter;\nuse std::collections::ha...
rust
new_file
0
6
mit
971051c1361fe3eaa103742fff6a6254185b55f4
seiflotfy/rust-cuckoofilter,seiflotfy/rust-cuckoofilter
tests/false_positive_rate.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for new implementations section title" }, { "role": "assistant", "content": "#![crate_name = \"foo\"]\n\npub struct Struc;\n\n// @has foo/struct.Struc.html\n// @has - '//*[@id=\"main\"]/h2[@id=\"implementations\"]' \"Imple...
rust
new_file
0
0
apache-2.0
4ade6eb2a27d0973a9912d609e8e46dd4bde04fb
graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust
src/test/rustdoc/struct-implementations-title.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Create an example for recursive Levenshtein" }, { "role": "assistant", "content": "extern crate code;\n\nuse code::levenshtein;\n\nfn main() {\n let u = \"kangaroo\";\n let v = \"koala\";\n\n let distance = levenshtein::re...
rust
new_file
0
1
mit
7987b06ab86866c668d4ae9b50c587700387e758
darwins-challenge/fly-me-to-the-moon
code/examples/recursive_levenshtein.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for unused field in union" }, { "role": "assistant", "content": "// Copyright 2016 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COP...
rust
new_file
0
1
apache-2.0
046c7f23680f9a8f24209be4097656f91ade0bbb
aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust
src/test/compile-fail/union/union-lint-dead-code.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test drop order for (destructuring) assignments" }, { "role": "assistant", "content": "// run-pass\n\n//! Test that let bindings and destructuring assignments have consistent drop orders\n\n#![feature(destructuring_assignment)]\n#!...
rust
new_file
1
1
apache-2.0
1094f97da0bc3ce63130eac88adc997c68ce59cd
aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/ui/destructuring-assignment/drop-order.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse std::{io, fs};\n\nmacro_rules! readln {\n () => {\n {\n let mut line = String::new();\n match io::stdin().read_line(&mut line) {\n Ok(n) => Some(line.trim().to_string()),\n Err...
rust
edit
5
7
mit
702de1f9c771c5c5477de77c4a586bd898f1fbfb
Lacaranian/redox,rexlunae/redox,Lacaranian/redox,Lacaranian/redox,Lacaranian/redox,rexlunae/redox,rexlunae/redox,Lacaranian/redox
filesystem/apps/test/test.rs
rejected_lint
Too many lint violations: 5
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for roman-numerals case\n\nIt passes all testcases" }, { "role": "assistant", "content": "#[derive(Debug)]\npub struct Roman {\n value: u32,\n}\n\nimpl From<u32> for Roman {\n #[inline]\n fn from(v: u32) -> R...
rust
new_file
1
2
bsd-2-clause
1b6b2a98d651816e04621eb1fd8b797c7ead8bf1
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/roman-numerals/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for acronym case\n\nIt passes all tests" }, { "role": "assistant", "content": "pub fn abbreviate<S>(name: S) -> String where S: Into<String> {\n let mut next_capital = true;\n let mut prev_lowercase = false;\n\n...
rust
new_file
0
11
bsd-2-clause
28609a303e11437f8d4db8fd729e9ae0dbd74113
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/acronym/src/lib.rs
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n//! Implements traits from Diesel, allowing identifiers to be used as database fields.\n\nuse std::{convert::TryFrom, error::Error as StdError, io::Write};\n\nuse diesel::{\n backend::Backend,\n deserialize::{FromSql, Result as Deserial...
rust
edit
0
2
mit
3141f3e9a1ef18c000493885124687c92dd4c6c3
ruma/ruma,ruma/ruma-identifiers
src/diesel_integration.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add wildcard test for const_if_match\n\nCloses https://github.com/rust-lang/rust/issues/66758" }, { "role": "assistant", "content": "// check-pass\n\n#![feature(const_if_match)]\n\nenum E {\n A,\n B,\n C\n}\n\nconst fn f(e...
rust
new_file
1
2
apache-2.0
37f440fd9a3d6c79647549bf559d2c19712b83d9
graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust
src/test/ui/consts/control-flow/single-arm-match-wild.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add tests for Ident::new and Ident::parse" }, { "role": "assistant", "content": "// Copyright 2018 Syn Developers\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n// http://www.apache.org/licenses/LICENSE-...
rust
new_file
0
1
apache-2.0
d741aa849b2e6ec0894c09aa0c453c8facbedb11
dtolnay/syn
tests/test_ident.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for armstrong-numbers\n\nIt passed all tests" }, { "role": "assistant", "content": "pub fn is_armstrong_number(num: u32) -> bool {\n let mut result = num;\n let mut numbers = Vec::new();\n\n while result > 0 ...
rust
new_file
0
2
bsd-2-clause
e67520a40de3c6afd1ff2903ba360c5bd6912618
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/armstrong-numbers/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add auto trait leakage TAIT test" }, { "role": "assistant", "content": "// check-pass\n\n#![feature(type_alias_impl_trait)]\n#![allow(dead_code)]\n\nmod m {\n type Foo = impl std::fmt::Debug;\n\n pub fn foo() -> Foo {\n ...
rust
new_file
0
1
apache-2.0
5ac46d7bd88cf992d108d14913b599903140ce9d
graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust
src/test/ui/type-alias-impl-trait/auto-trait-leakage.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test case for exported macros vs incremental compilation." }, { "role": "assistant", "content": "// Copyright 2016 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n...
rust
new_file
0
0
apache-2.0
52d250efabed644a15c797bfcc747a4113d2433d
GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust
src/test/compile-fail/incr_comp_with_macro_export.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Check in a forgotten new file" }, { "role": "assistant", "content": "import syntax::ast::*;\nimport syntax::visit;\nimport driver::session::session;\n\ntype ctx = {in_loop: bool, can_ret: bool};\n\nfn check_crate(sess: session, cra...
rust
new_file
null
null
apache-2.0
b89a5af2ab3273b1d38981646e01df8a158e324f
victorvde/rust,jashank/rust,TheNeikos/rust,l0kod/rust,kmcallister/rust,mihneadb/rust,rohitjoshi/rust,mihneadb/rust,servo/rust,untitaker/rust,cllns/rust,barosl/rust,dwillmer/rust,ktossell/rust,sae-bom/rust,0x73/rust,nham/rust,kimroen/rust,victorvde/rust,jashank/rust,ktossell/rust,stepancheg/rust-ide-rust,mahkoh/rust,rpr...
src/rustc/middle/check_loop.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add benchmarks for statement cache." }, { "role": "assistant", "content": "#![feature(test)]\nextern crate test;\n\nextern crate rusqlite;\n\nuse rusqlite::Connection;\nuse rusqlite::cache::StatementCache;\nuse test::Bencher;\n\n#[...
rust
new_file
0
2
apache-2.0
9b4fdc29ee7550ebe2a498f36f6a197853274261
mikelodder7/rusqlcipher,mikelodder7/rusqlcipher,jgallagher/rusqlite,gwenn/rusqlite,xinghun92/rusqlite,jgallagher/rusqlite,jgallagher/rusqlite,xinghun92/rusqlite,xinghun92/rusqlite,gwenn/rusqlite,mikelodder7/rusqlcipher,gwenn/rusqlite
benches/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for atbash-cipher\n\nIt passed all testcase" }, { "role": "assistant", "content": "#![feature(ascii_ctype)]\nuse std::ascii::AsciiExt;\n\npub fn encode(message: &str) -> String {\n let mut index = 0;\n message\n...
rust
new_file
2
4
bsd-2-clause
ada78c4fbcccb1aa4aa4c0209df640149e1f9036
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/atbash-cipher/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test that fn preconditions get typechecked" }, { "role": "assistant", "content": "// Tests that the typechecker checks constraints\n// error-pattern:mismatched types: expected uint but found u8\nuse std;\nimport std::uint;\n\nfn en...
rust
new_file
null
null
apache-2.0
d37e8cfc6723f0f2dbefdb686a7e220062c1374c
reem/rust,dwillmer/rust,rprichard/rust,zachwick/rust,untitaker/rust,mihneadb/rust,pelmers/rust,SiegeLord/rust,cllns/rust,erickt/rust,ruud-v-a/rust,ebfull/rand,omasanori/rust,0x73/rust,retep998/rand,LeoTestard/rust,huonw/rand,Ryman/rust,0x73/rust,sae-bom/rust,stepancheg/rust-ide-rust,aturon/rust,jbclements/rust,AerialX/...
src/test/compile-fail/nonsense-constraints.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: test(vm): Add a test to check that marshalled references cannot escape" }, { "role": "assistant", "content": "extern crate embed_lang;\nuse embed_lang::new_vm;\nuse embed_lang::vm::vm::Value;\nuse embed_lang::vm::api::{VMType, Geta...
rust
new_file
0
1
mit
05d4e36ff562e04e66a91801a98e02b247780adb
Marwes/embed_lang,Marwes/gluon,gluon-lang/gluon,Marwes/gluon,gluon-lang/gluon,Marwes/embed_lang
tests/compile-fail/store-ref.rs
accepted
null
true