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: Test an assoc. type in struct member def inside fn" }, { "role": "assistant", "content": "// check-pass\n// compile-flags: -Zsave-analysis\n\ntrait Trait { type Assoc; }\n\nfn main() {\n struct Data<T: Trait> {\n x: T::As...
rust
new_file
3
1
apache-2.0
429fc9d7b714feebeb78893f9b92b7bdab3b8b93
graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/ui/save-analysis/issue-64659.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an XFAILed test for treating alts as expressions" }, { "role": "assistant", "content": "// xfail-boot\n// xfail-stage0\n// -*- rust -*-\n\n// Tests for using alt as an expression\n\nfn test() {\n let bool res = alt (true) {\n ...
rust
new_file
null
null
apache-2.0
efb738153c7248601a9a1b294b0ad8fd9c27023c
kimroen/rust,LeoTestard/rust,0x73/rust,jashank/rust,erickt/rust,robertg/rust,aneeshusa/rust,kimroen/rust,LeoTestard/rust,erickt/rust,hauleth/rust,kwantam/rust,zachwick/rust,dwillmer/rust,quornian/rust,kwantam/rust,j16r/rust,bombless/rust,fabricedesre/rust,barosl/rust,zachwick/rust,ktossell/rust,pczarn/rust,seanrivera/r...
src/test/run-pass/expr-alt.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add test for overflowing pow\n\nThis would catch regressions of issue #28012." }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distr...
rust
new_file
0
1
apache-2.0
a593a211fe71e82b3f87dd16fb25831fb8a00442
GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust
src/test/run-fail/overflowing-pow.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for generic iface methods\n\nIssue #1227" }, { "role": "assistant", "content": "iface to_str {\n fn to_str() -> str;\n}\nimpl of to_str for int {\n fn to_str() -> str { int::str(self) }\n}\nimpl of to_str for str {\n...
rust
new_file
null
null
apache-2.0
b02a77d6b471fe76e8c88ea8462a5251f7744ca3
aturon/rust,sarojaba/rust-doc-korean,richo/rust,jbclements/rust,P1start/rust,stepancheg/rust-ide-rust,sae-bom/rust,mitsuhiko/rust,bombless/rust,XMPPwocky/rust,jashank/rust,ruud-v-a/rust,j16r/rust,AerialX/rust-rt-minimal,andars/rust,kmcallister/rust,ebfull/rust,nwin/rust,untitaker/rust,reem/rust,kimroen/rust,AerialX/rus...
src/test/run-pass/iface-generic.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add a driver for builtin LED" }, { "role": "assistant", "content": "use sysctl;\nuse gpio;\n\npub const RED: u32 = gpio::PIN1;\npub const BLUE: u32 = gpio::PIN2;\npub const GREEN: u32 = gpio::PIN3;\n\n\npub fn led_init()\n{\n sy...
rust
new_file
2
2
bsd-3-clause
eb381d5befc613d52e8635bf1b5b7e70311dfe74
nuft/rust-demo-cortex-m4,antoinealb/rust-demo-cortex-m4,antoinealb/rust-demo-cortex-m4,SillyFreak/rust-demo-cortex-m4,SillyFreak/rust-demo-cortex-m4,nuft/rust-demo-cortex-m4
led_driver.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Create an executable that produces the no background image" }, { "role": "assistant", "content": "extern crate simple_csv;\nextern crate png;\n\nuse std::env;\nuse std::fs::File;\nuse std::io::{BufWriter, BufReader};\nuse std::str:...
rust
new_file
0
2
mit
1c40099381e5ac592db37120617365fc54f21d80
fifth-postulate/finding-the-planets,fifth-postulate/finding-the-planets,fifth-postulate/finding-the-planets
rust-showcase/src/bin/image_nobg.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Move CtlFlags to its own file" }, { "role": "assistant", "content": "// ctl_flags.rs\n\nuse super::consts::*;\n\n// Represents control flags of a sysctl\nbitflags! {\n pub struct CtlFlags : libc::c_uint {\n /// Allow read...
rust
new_file
0
1
mit
5b0fbd6ffdbcb3f9dbb9ff509b1ec04c6549aa5e
johalun/sysctl-rs
src/ctl_flags.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for extra::rl.\n\nThis test has to be run by a human, to check inputs etc. Fortunately, it\nwon't bitrot (syntactically, or type-check-ly; it might bitrot\nsemantically), as it is designed so that the test runner compiles it with\n`...
rust
new_file
null
null
apache-2.0
491ce71453499f61eeb24d891b28a07ea9ae532b
AerialX/rust,krzysz00/rust,servo/rust,untitaker/rust,aidancully/rust,ruud-v-a/rust,robertg/rust,pshc/rust,kimroen/rust,0x73/rust,Ryman/rust,miniupnp/rust,SiegeLord/rust,victorvde/rust,XMPPwocky/rust,mahkoh/rust,aepsil0n/rust,barosl/rust,fabricedesre/rust,GBGamer/rust,defuz/rust,zaeleus/rust,untitaker/rust,l0kod/rust,sa...
src/test/run-pass/rl-human-test.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Implement Entry type (path and index pairing)." }, { "role": "assistant", "content": "use matching;\nuse std::path::PathBuf;\nuse std::collections::hash_map::HashMap;\n\npub struct Entry {\n pub path: PathBuf,\n pub index: Ha...
rust
new_file
1
1
mit
1cd1af6fb5aa43caa5659d9823685e3f38285f8a
jmacdonald/bloodhound
src/entry.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 39" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\n\n/// If p is the perimeter of a right angle triangle with integral length sides, {a,b,c}, there are\n/// exactly three solution...
rust
new_file
0
4
mit
e2f12972a74c1b9b1bbec42c8ecded6b22bb878d
zmbush/euler,zmbush/euler
sol_0039/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add another test for blocks as expressions" }, { "role": "assistant", "content": "// xfail-boot\n// -*- rust -*-\n\n// Tests for standalone blocks as expressions\n\nfn test_basic() {\n let bool res = { true };\n check (res);\n}\n...
rust
new_file
null
null
apache-2.0
c27b72e323d1aabb0eeb9939feb5584bc28ba9e9
j16r/rust,miniupnp/rust,emk/rust,krzysz00/rust,kwantam/rust,robertg/rust,kmcallister/rust,jashank/rust,jbclements/rust,j16r/rust,dinfuehr/rust,GrahamDennis/rand,robertg/rust,hauleth/rust,rohitjoshi/rust,jroesch/rust,defuz/rust,avdi/rust,erickt/rust,miniupnp/rust,aidancully/rust,quornian/rust,zachwick/rust,GBGamer/rust,...
src/test/run-pass/expr-block.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add an example to encode" }, { "role": "assistant", "content": "extern crate base58;\n\nuse base58::encode_base58;\n\nfn main() {\n let encoded = encode_base58(String::from_str(\"Lorem ipsum dolor sit amet, consectetur adipisicing...
rust
new_file
0
1
apache-2.0
13a273dc373f85512db669f4252f5cdf31c60cd3
olivierperez/rust-Base58,olivierperez/rust-Base58
examples/example_encode.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Solve Area of a Circle in rust" }, { "role": "assistant", "content": "use std::io;\n\nfn main() {\n let mut input_n = String::new();\n\n if let Err(_e) = io::stdin().read_line(&mut input_n){}\n\n let n: f64 = input_n.trim(...
rust
new_file
0
2
mit
48760ef06dd39481673f01f646350d1252cb1e25
deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playground,deniscostadsc/playgr...
solutions/uri/1002/1002.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a simple integration test" }, { "role": "assistant", "content": "extern crate specinfra;\n\nuse specinfra::backend;\n\n#[test]\n#[cfg(target_os=\"macos\")]\nfn it_works() {\n let b = backend::direct::Direct::new();\n let ...
rust
new_file
0
1
mit
e829ad47724f59dfe69e86dc96d2bf15bff78cd0
libspecinfra/specinfra,libspecinfra/specinfra
tests/file.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test case for wasm non-clash." }, { "role": "assistant", "content": "// check-pass\n#![crate_type = \"lib\"]\n\n#[cfg(target_arch = \"wasm32\")]\nmod wasm_non_clash {\n mod a {\n #[link(wasm_import_module = \"a\")]\n ...
rust
new_file
0
0
apache-2.0
6318db1c5a06a08a6b4063b25a63df3c328a5bd7
graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust
src/test/ui/lint/clashing-extern-fn-wasm.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for ocr-numbers.\n\nIt passed all testcases" }, { "role": "assistant", "content": "#![feature(str_checked_slicing)]\n\nconst DIGITS: [&str; 10] = [\n \" _ | ||_| \", // 0\n \" | | \", // 1\n \" _ _|...
rust
new_file
1
0
bsd-2-clause
4f40da271850c71a40f51b390c5b329810dd12c1
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/ocr-numbers/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test to exercise InvalidUndefBytes" }, { "role": "assistant", "content": "// error-pattern: reading uninitialized memory\n\nuse std::alloc::{alloc, dealloc, Layout};\nuse std::slice::from_raw_parts;\n\nfn main() {\n let layo...
rust
new_file
2
1
apache-2.0
7f92eab3c477f321a55f53b6e04ac8ca2cd04ebf
rust-lang/miri,rust-lang/miri,rust-lang/miri,rust-lang/miri
tests/compile-fail/undefined_buffer.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add a test case for the \"self\" region in enums" }, { "role": "assistant", "content": "enum int_wrapper {\n int_wrapper_ctor(&int)\n}\n\nfn main() {\n unsafe {\n let x = 3;\n let y = int_wrapper_ctor(&x);...
rust
new_file
null
null
apache-2.0
83ed4f4bc4c53b2f660ab8f174d25d7118f9dae0
robertg/rust,vhbit/rust,michaelballantyne/rust-gpu,aturon/rust,ruud-v-a/rust,aidancully/rust,krzysz00/rust,carols10cents/rust,TheNeikos/rust,kwantam/rust,ktossell/rust,emk/rust,mahkoh/rust,mitsuhiko/rust,dinfuehr/rust,vhbit/rust,aidancully/rust,quornian/rust,nham/rust,l0kod/rust,jbclements/rust,zaeleus/rust,mahkoh/rust...
src/test/run-pass/regions-self-in-enums.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```rust\n// 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/COPYRIGHT.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n//...
rust
edit
null
null
apache-2.0
2c589df6a2f6095eef4fea4ac8f31b2436cf2cb5
mahkoh/rust,XMPPwocky/rust,omasanori/rust,sae-bom/rust,gifnksm/rust,AerialX/rust-rt-minimal,untitaker/rust,dinfuehr/rust,untitaker/rust,emk/rust,aneeshusa/rust,zubron/rust,ktossell/rust,philyoon/rust,mihneadb/rust,XMPPwocky/rust,gifnksm/rust,dwillmer/rust,l0kod/rust,richo/rust,zachwick/rust,quornian/rust,rohitjoshi/rus...
src/test/compile-fail/pat-range-bad-dots.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add a benchmark for cross-task kernel memory region synchronization\n\nVectors are allocated from the kernel's memory region, which has some heinous\nsynchronization. This is a stress test of vector allocation in many tasks." }, { "rol...
rust
new_file
null
null
apache-2.0
dabf1be2267439d61029b9b9353f4ae2008a3662
erickt/rust,jroesch/rust,jroesch/rust,sae-bom/rust,gifnksm/rust,mahkoh/rust,kmcallister/rust,emk/rust,sarojaba/rust-doc-korean,rprichard/rust,reem/rust,untitaker/rust,Ryman/rust,victorvde/rust,michaelballantyne/rust-gpu,kimroen/rust,j16r/rust,waynenilsen/rand,untitaker/rust,cllns/rust,jbclements/rust,jroesch/rust,pytho...
src/test/bench/task-perf-vector-party.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for crypto-square project\n\nIt passed all test cases. This is not equivalent to the golang one." }, { "role": "assistant", "content": "#![feature(ascii_ctype)]\nuse std::ascii::AsciiExt;\n\nfn matrix(length: usize) -...
rust
new_file
2
7
bsd-2-clause
7d8eae7a9b8e869ed821a1e3e2a47df603711f46
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/crypto-square/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 46" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\nextern crate num;\n\nuse libeuler::SieveOfAtkin;\nuse num::integer::Integer;\n\n/// It was proposed by Christian Goldbach that e...
rust
new_file
0
3
mit
b7f754fc9b2d1cb428cffb7ccfc4171f67ece447
zmbush/euler,zmbush/euler
sol_0046/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test for associated types ICE\n\ncloses #19121" }, { "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-...
rust
new_file
1
1
apache-2.0
98c4d4b7f45cfdf39f5fcd84aaf0c49c5b17dc25
miniupnp/rust,TheNeikos/rust,reem/rust,l0kod/rust,aidancully/rust,aepsil0n/rust,KokaKiwi/rust,jashank/rust,dinfuehr/rust,carols10cents/rust,sae-bom/rust,hauleth/rust,zachwick/rust,KokaKiwi/rust,vhbit/rust,mdinger/rust,miniupnp/rust,TheNeikos/rust,KokaKiwi/rust,graydon/rust,bombless/rust,ruud-v-a/rust,vhbit/rust,cllns/r...
src/test/compile-fail/issue-19121.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add compile-fail test for when the inferred and actual result types differ." }, { "role": "assistant", "content": "extern crate uom;\n\nuse uom::si::f32::*;\n\nfn main() {\n let _: Velocity = Length::new(1.0, uom::si::length::me...
rust
new_file
0
1
apache-2.0
3df7eb79611ed85e75a9edddd5f56832e63f7840
iliekturtles/uom
tests/compile-fail/mismatched-result.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test of unsupported elided lifetime in extern Rust sig" }, { "role": "assistant", "content": "use std::marker::PhantomData;\n\n#[cxx::bridge]\nmod ffi {\n extern \"Rust\" {\n type T;\n\n fn f(t: &T) -> &str;\n ...
rust
new_file
0
1
apache-2.0
464d3fc0ac90ad0a2f4b47f3da269c23c591271e
dtolnay/cxx,dtolnay/cxx,dtolnay/cxx,dtolnay/cxx
tests/ui/unsupported_elided.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for path with interpolated leading component" }, { "role": "assistant", "content": "use proc_macro2::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree};\nuse std::iter::FromIterator;\nuse syn::{Expr, T...
rust
new_file
1
3
apache-2.0
1283daca8e37d327ecd49a73aa2e7e5da285a09c
dtolnay/syn
tests/test_path.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test case for conditional drop" }, { "role": "assistant", "content": "// Copyright 2017 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
2
3
apache-2.0
12bbcd3c294a96ea915048a9bd525ee9074390f1
aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust
src/test/run-pass/generator/conditional-drop.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a basic test for line programs" }, { "role": "assistant", "content": "use pdb::{PDB, FallibleIterator, Rva};\n\n#[test]\nfn test_module_lines() {\n let file = std::fs::File::open(\"fixtures/self/foo.pdb\").expect(\"opening f...
rust
new_file
0
1
apache-2.0
176d2209817b59c6f9af4329c2b2f7854d191f73
willglynn/pdb,willglynn/pdb
tests/pdb_lines.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add regression test for SimplifyBranchSame miscompilation" }, { "role": "assistant", "content": "// Regression test for SimplifyBranchSame miscompilation.\n// run-pass\n\nmacro_rules! m {\n ($a:expr, $b:expr, $c:block) => {\n ...
rust
new_file
2
1
apache-2.0
f271957d89c8d694bd6b8963e4c21278e1cc0354
aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust
src/test/ui/mir/simplify-branch-same.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for safe intrinsics" }, { "role": "assistant", "content": "#![feature(intrinsics)]\n#![feature(no_core)]\n\n#![no_core]\n#![crate_name = \"foo\"]\n\nextern \"rust-intrinsic\" {\n // @has 'foo/fn.abort.html'\n // @has...
rust
new_file
1
0
apache-2.0
f6830403b3ba09ab8e3b07845061b5fbd30e249d
graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/rustdoc/safe-intrinsic.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test that &* of a dangling (and even unaligned) ptr is okay" }, { "role": "assistant", "content": "fn main() {\n let x = 2usize as *const u32;\n let _y = unsafe { &*x as *const u32 };\n\n let x = 0usize as *const u32;\n ...
rust
new_file
3
1
apache-2.0
e5cc8aaf5b5e58f366a8ac83178e8526b17d9f11
GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,tsion/miri,rust-lang/miri,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,rust-lang/miri,graydon/rust,rust-lang/miri,rust-lang/miri,aidancully/ru...
tests/run-pass/ref-invalid-ptr.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for block expressions of generic types. XFAILed" }, { "role": "assistant", "content": "// xfail-boot\n// xfail-stage0\n// -*- rust -*-\n\n// Tests for standalone blocks as expressions with dynamic type sizes\n\ntype comp...
rust
new_file
null
null
apache-2.0
cf16f4f7e5bf5d37fc0e254e3c7ccdf0623c50d3
barosl/rust,untitaker/rust,defuz/rust,bombless/rust,kimroen/rust,huonw/rand,jroesch/rust,omasanori/rust,vhbit/rust,pczarn/rust,l0kod/rust,hauleth/rust,reem/rust,GBGamer/rust,carols10cents/rust,philyoon/rust,ejjeong/rust,pczarn/rust,avdi/rust,carols10cents/rust,pelmers/rust,reem/rust,zaeleus/rust,mvdnes/rust,michaelball...
src/test/run-pass/expr-block-generic.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for nucleotide-count case\n\nIt passed all tests" }, { "role": "assistant", "content": "use std::collections::HashMap;\n\npub fn nucleotide_counts(serial: &str) -> Result<HashMap<char, usize>, &str> {\n let counter...
rust
new_file
0
0
bsd-2-clause
f911fdde1d33b3a2bf887ef46c0143105e09964c
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/nucleotide-count/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for prime-factors\n\nIt passed all testcases." }, { "role": "assistant", "content": "#[inline]\nfn is_prime(n: u64) -> bool {\n if n <= 1 {\n return false;\n }\n\n if n <= 3 {\n return true;\n ...
rust
new_file
0
8
bsd-2-clause
d5e6134e339713c46f4ff8938290d5a12c6a8bc0
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/prime-factors/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![cfg(feature = \"cognito-sync\")]\n\nextern crate rusoto_core;\nextern crate rusoto_cognito_sync;\n\nuse rusoto_cognito_sync::{CognitoSync, CognitoSyncClient, ListIdentityPoolUsageRequest};\nuse rusoto_core::{DefaultCredentialsProvider, Reg...
rust
edit
0
1
mit
b7e92480cf2362919ef2f9a24eaacf63e5ba3cdb
mattico/rusoto,DualSpark/rust-aws,DualSpark/rust-aws,rusoto/rusoto,mattico/rusoto,SecurityInsanity/rusoto,DualSpark/rusoto,SecurityInsanity/rusoto,rusoto/rusoto,DualSpark/rust-aws,DualSpark/rusoto,rusoto/rusoto,mattico/rusoto,DualSpark/rusoto
integration_tests/tests/cognito-sync.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test that Hotwatch is send+sync" }, { "role": "assistant", "content": "fn require_send<T: Send>() {}\nfn require_sync<T: Sync>() {}\n\n#[test]\nfn hotwatch_send() {\n require_send::<hotwatch::Hotwatch>();\n}\n\n#[test]\nfn hotwa...
rust
new_file
0
1
mit
e6185750553baa3aef9e849424ff0825a53f031d
scottpleb/hotwatch,scottpleb/hotwatch
tests/send_sync.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add function call test, Update gdb and test docker image install gdb by ppa." }, { "role": "assistant", "content": "// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distri...
rust
new_file
2
1
apache-2.0
e6bbf7ef8d116c54d2e6160495d41ac54161e249
aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust
src/test/debuginfo/function-call.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for bytes!" }, { "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/COPYRIGHT.\n//\n...
rust
new_file
0
1
apache-2.0
ba9668ed06f255160ec7835e913e29850a3e2b20
aneeshusa/rust,pshc/rust,barosl/rust,XMPPwocky/rust,kimroen/rust,aidancully/rust,LeoTestard/rust,dinfuehr/rust,servo/rust,mitsuhiko/rust,richo/rust,ktossell/rust,fabricedesre/rust,barosl/rust,emk/rust,Ryman/rust,sarojaba/rust-doc-korean,victorvde/rust,zaeleus/rust,kmcallister/rust,bombless/rust,krzysz00/rust,emk/rust,q...
src/test/run-pass/syntax-extension-bytes.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add adapter example w/sync API" }, { "role": "assistant", "content": "// Demonstrates synchronous Search with an adapter chain, and\n// that the same adapters are used as in the async case.\n//\n// If you comment out the first elem...
rust
new_file
0
7
apache-2.0
fc09a8ac052f1989f95cc8246682fcad98577883
inejge/ldap3,inejge/ldap3
examples/search_adapted_paged_plus_sync.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add temporary file to investigate callbacks" }, { "role": "assistant", "content": "use russell_lab::Vector;\n\nstruct Processor<'a> {\n callback: Box<dyn FnMut(&mut Vector, &[f64]) + 'a>,\n}\n\nimpl<'a> Processor<'a> {\n fn s...
rust
new_file
0
1
mit
00e4ea1daeb934a8e91795b9ff73b73c7b570fa7
cpmech/gemlab,cpmech/gemlab
examples/temporary_on_callbacks.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// 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/COPYRIGHT.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n//...
rust
edit
0
1
apache-2.0
bad4869d28594da7daa1e9a3b7dffc958e1ecb2d
aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust
src/test/compile-fail/bad-format-args.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add const_fn in generics test" }, { "role": "assistant", "content": "// run-pass\n\n#![feature(min_const_generics)]\n\nconst fn identity<const T: u32>() -> u32 { T }\n\n#[derive(Eq, PartialEq, Debug)]\npub struct ConstU32<const U: ...
rust
new_file
1
1
apache-2.0
23c4a46efffebec56648d1b87204466acf1eb15f
aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/ui/const-generics/min_const_generics/const_fn_in_generics.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for Asset struct with interpolated path" }, { "role": "assistant", "content": "#[macro_use]\nextern crate rust_embed;\n\n/// Test doc comment\n#[derive(RustEmbed)]\n#[folder = \"$CARGO_MANFEST_ROOT/examples/public/\"]\nstr...
rust
new_file
0
4
mit
e327b2d278bc1e6b6e637cf3cf59300f8e7e8398
pyros2097/rust-embed
tests/interpolated_path.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add some unit tests for bert2" }, { "role": "assistant", "content": "extern crate ppbert;\nextern crate num;\n\nuse ppbert::parser;\nuse ppbert::bertterm::BertTerm;\nuse ppbert::error::Result;\n\nfn p(bytes: &[u8]) -> Result<Vec<Be...
rust
new_file
0
1
mit
c75c58d55a7ba80c72ce7f43b6d56772911f4ea4
gnuvince/ppbert,gnuvince/ppbert
tests/parser_bert2.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add codegen test that makes sure PGO instrumentation is emitted as expected." }, { "role": "assistant", "content": "// Test that `-Zpgo-gen` creates expected instrumentation artifacts in LLVM IR.\n\n// needs-profiler-support\n// co...
rust
new_file
0
1
apache-2.0
e2acaee8bb364197af2ab197f0f641e8f988ae04
aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust
src/test/codegen/pgo-instrumentation.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Print first interface name (proof of concept)" }, { "role": "assistant", "content": "extern crate libc;\n\nuse libc::{c_char, c_int, c_ushort, c_uint, c_void};\nuse std::c_str::CString;\n\nextern {\n fn printf(s: *const libc::c_...
rust
new_file
null
null
mit
2e91122ec064eb232228dbebfbec1a63f6df3c8e
schuster/rust-packet-sockets
src/lib.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add new testcase to show the nature of our exciting block-expr / trailing unop interaction." }, { "role": "assistant", "content": "/*\n *\n * When you write a block-expression thing followed by\n * a lone unary operator, you can ...
rust
new_file
null
null
apache-2.0
b7f043eeb785abefe472d34b7934bfda029aef5c
philyoon/rust,fabricedesre/rust,carols10cents/rust,sarojaba/rust-doc-korean,LeoTestard/rust,vhbit/rust,richo/rust,cllns/rust,nham/rust,untitaker/rust,AerialX/rust-rt-minimal,LeoTestard/rust,sarojaba/rust-doc-korean,nwin/rust,reem/rust,aneeshusa/rust,ebfull/rust,andars/rust,avdi/rust,zaeleus/rust,zaeleus/rust,emk/rust,e...
src/test/run-pass/block-expr-precedence.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: rustdoc: Add a test for should_fail in doctests\n\nCloses #23744" }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and a...
rust
new_file
0
1
apache-2.0
262527601e67714f3fa9d2e45738ba60023148d6
gifnksm/rust,omasanori/rust,vhbit/rust,carols10cents/rust,cllns/rust,philyoon/rust,mvdnes/rust,l0kod/rust,jroesch/rust,andars/rust,KokaKiwi/rust,avdi/rust,GBGamer/rust,dwillmer/rust,carols10cents/rust,nwin/rust,andars/rust,l0kod/rust,sae-bom/rust,TheNeikos/rust,kwantam/rust,pelmers/rust,robertg/rust,XMPPwocky/rust,ruud...
src/test/rustdoc/issue-23744.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add Sum effect, which adds two input streams into one output" }, { "role": "assistant", "content": "use super::effect::Effect;\nuse partial::Partial;\n\npub struct Sum;\n\npub struct SumProcessIter {\n partial : Partial,\n it...
rust
new_file
0
2
mit
6e2d6877202e598ec018f6e259d442c3de14dea2
Wallacoloo/libfriendship
src/effects/sum.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for try operator on Result" }, { "role": "assistant", "content": "// run-pass\n\n#![feature(try_trait_v2)]\n#![feature(const_trait_impl)]\n#![feature(const_try)]\n#![feature(const_convert)]\n\nfn main() {\n const fn foo...
rust
new_file
0
2
apache-2.0
991b375d87c1d171f3d36dd92d9543950eefcf47
aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust
src/test/ui/consts/try-operator.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for texture drawing" }, { "role": "assistant", "content": "#![feature(plugin)]\n#![feature(unboxed_closures)]\n\n#[plugin]\nextern crate glium_macros;\n\nextern crate glutin;\n\n#[macro_use]\nextern crate glium;\n\nuse std...
rust
new_file
1
3
apache-2.0
2c24b22e7affc6f8d0b664292276de1b71ed8236
christopheraugustus/glium,binsoftware/glium,TyOverby/glium,cpjreynolds/glium,msiglreith/glium,glium/glium,carbidegames/glium,acolley/glium,sdotz/glium,nicokoch/glium,tomaka/glium,caldwell/glium,bvssvni/glium,rozaliev/glium
tests/texture_draw.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add privately uninhabited dead code test" }, { "role": "assistant", "content": "// compile-pass\n\n#![deny(unreachable_code)]\n\nmod foo {\n enum Bar {}\n\n #[allow(dead_code)]\n pub struct Foo {\n value: Bar, // \"...
rust
new_file
0
1
apache-2.0
20415af14207cd4aae261de8ae7af81d4afdc21a
aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/ui/uninhabited/privately-uninhabited-dead-code.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Create an program to demonstrate random programs" }, { "role": "assistant", "content": "extern crate rand;\nextern crate nadezhda;\n\nuse nadezhda::grammar::Program;\n\ntrait Length {\n fn length(&self) -> i32;\n}\n\nimpl Length...
rust
new_file
0
2
mit
f0ce8c07d164aeb2225dad5f084ca77a7f011f97
darwins-challenge/nadezhda,darwins-challenge/nadezhda
examples/program_length.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse {Future, Poll, Async};\n\n/// A future which \"fuse\"s a future once it's been resolved.\n///\n/// Normally futures can behave unpredictable once they're used after a future\n/// has been resolved, but `Fuse` is always defined to return `...
rust
edit
3
2
apache-2.0
c4313d8e98fc100d5f7729adaec1af4262607355
alexcrichton/futures-rs,Idolf/futures-rs
src/future/fuse.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add missing test for unreachable! macro" }, { "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.or...
rust
new_file
0
1
apache-2.0
1e55cae78350c4d58508afeeec99373254e33336
pshc/rust,bombless/rust,victorvde/rust,untitaker/rust,pczarn/rust,pshc/rust,zaeleus/rust,philyoon/rust,cllns/rust,gifnksm/rust,aneeshusa/rust,andars/rust,ruud-v-a/rust,nwin/rust,gifnksm/rust,dwillmer/rust,mahkoh/rust,pythonesque/rust,l0kod/rust,emk/rust,ktossell/rust,nwin/rust,AerialX/rust,stepancheg/rust-ide-rust,serv...
src/test/run-fail/unreachable-macro-fail.rs
rejected_duplicate
Near-duplicate of sample 120404
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for lucians-luscious-lasagna\n\nIt passed all tests" }, { "role": "assistant", "content": "pub fn expected_minutes_in_oven() -> i32 {\n 40\n}\n\npub fn remaining_minutes_in_oven(actual_minutes_in_oven: i32) -> i32 ...
rust
new_file
0
1
bsd-2-clause
8b19920ed5b12a326150e1b588cdb73b1d181457
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/lucians-luscious-lasagna/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// 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.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n//...
rust
edit
1
2
apache-2.0
f2e73d9d48dec8ae3103ba46a35586a2a5435a4f
GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust
src/test/compile-fail/method-suggestion-no-duplication.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for 'packet loss' decode calls\n\nTests 06643a44." }, { "role": "assistant", "content": "//! Test that supplying empty packets does forward error correction.\n\nextern crate opus;\nuse opus::*;\n\n#[test]\nfn blah() {\n ...
rust
new_file
0
1
apache-2.0
5600b95aa4b6f87b210a3d298d7535b076a1b5d6
SpaceManiac/opus-rs
tests/fec.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse super::SDTHeader;\n\n#[repr(packed)]\n#[derive(Clone, Copy, Debug, Default)]\npub struct DSDT {\n pub header: SDTHeader,\n pub data: &'static [u8]\n\n}\n\nimpl DSDT {\n pub fn new(header: *const SDTHeader) -> Option<Self> {\n ...
rust
edit
1
2
mit
76fa101d2d8c6542d5334828a4c50ef5eccecff1
Lacaranian/redox,rexlunae/redox,Lacaranian/redox,Lacaranian/redox,Lacaranian/redox,rexlunae/redox,rexlunae/redox,Lacaranian/redox
kernel/acpi/dsdt.rs
rejected_duplicate
Near-duplicate of sample 120341
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse core::ptr;\n\nuse super::SDTHeader;\n\n#[repr(packed)]\n#[derive(Clone, Copy, Debug, Default)]\npub struct SSDT {\n pub header: SDTHeader,\n pub data: &'static [u8]\n\n}\n\nimpl SSDT {\n pub fn new(header: *const SDTHeader) -> Op...
rust
edit
2
2
mit
8ad0c96b3ab0d4863904257d79531a66c50281f0
Lacaranian/redox,rexlunae/redox,rexlunae/redox,Lacaranian/redox,Lacaranian/redox,rexlunae/redox,Lacaranian/redox,Lacaranian/redox
kernel/acpi/ssdt.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nmod css;\nmod dom;\nmod html;\nmod style;\n\nfn main() {\n let root_node = html::parse(\"<div id='a' class='b'>Hello <em>there</em></div>\".to_string());\n println!(\"{}\\n\", root_node);\n\n let stylesheet = css::parse(\"div, *, spa...
rust
edit
1
3
mit
0bb9bc77f717a62a87555941cb609e2fc543a8dc
mbrubeck/robinson,beni55/robinson,SimonSapin/robinson,addyosmani/robinson
src/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add new test for object method numbering mismatches." }, { "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
new_file
0
2
apache-2.0
aaf3df3667b4f4b1481401474e4e69051fafa83b
seanrivera/rust,victorvde/rust,ejjeong/rust,carols10cents/rust,jroesch/rust,krzysz00/rust,aepsil0n/rust,GBGamer/rust,mahkoh/rust,robertg/rust,pshc/rust,l0kod/rust,ejjeong/rust,kwantam/rust,cllns/rust,KokaKiwi/rust,philyoon/rust,krzysz00/rust,gifnksm/rust,untitaker/rust,GBGamer/rust,ruud-v-a/rust,AerialX/rust-rt-minimal...
src/test/run-pass/object-method-numbering.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: examples: Make example for SureNode code\n\nAs the SureNode code is developed, keep this example of how it is used\nuntil it is fully integrated into the rest of the library." }, { "role": "assistant", "content": "/// Walking examp...
rust
new_file
1
11
mit
5fec5d09c5e714d72fb9e1b918cf2db74a166c39
d3zd3z/rsure
examples/walk.rs
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for a big enum" }, { "role": "assistant", "content": "#[macro_use]\nextern crate enum_map;\n#[macro_use]\nextern crate enum_map_derive;\n\n#[derive(EnumMap)]\nenum Example {\n A,\n B,\n C,\n D,\n E,\n F...
rust
new_file
0
1
apache-2.0
c97e73c67850ffc79558d0e833dc7c980e0fd994
xfix/enum-map
enum-map/tests/huge_enum.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add basic REPL shell for Forth" }, { "role": "assistant", "content": "extern crate forth;\n\nuse std::io;\nuse std::io::prelude::*;\nuse forth::Forth;\n\nfn main() {\n let mut forth = Forth::new();\n\n loop {\n print!(...
rust
new_file
0
2
mit
8670c8994e84035672996ca38e15001d795bc6be
attilahorvath/exercism-rust
forth/src/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an example that instantly removes the port it added." }, { "role": "assistant", "content": "use std::net::SocketAddrV4;\nuse std::env;\n\nextern crate igd;\n\nfn main() {\n match igd::search_gateway() {\n Err(ref err)...
rust
new_file
0
6
mit
9e7e54fccb5b7e2ea2a95d93f982570cd0ea9881
SBSTP/rust-igd,SBSTP/rust-igd
examples/add_remove.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Make a new common projects path function" }, { "role": "assistant", "content": "use args::Args;\n#[cfg(not(test))]\nuse dirs::home_dir;\nuse std::path::PathBuf;\n\npub static MUXED_FOLDER: &str = \".muxed\";\nstatic CONFIG_EXTENSIO...
rust
new_file
null
null
mit
3ae390a54cb42963f84ff5f0d3f9b28459b99b53
brianp/muxed,brianp/muxed
common/src/project_paths.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 60" }, { "role": "assistant", "content": "#![feature(core)]\n#[macro_use] extern crate libeuler;\n\nuse libeuler::prime::SieveOfAtkin;\n/// The primes 3, 7, 109, and 673, are quite remarkable. By taking any ...
rust
new_file
0
8
mit
ddbf4547e46620af91c8566dd4dcd84ff3deff7c
zmbush/euler,zmbush/euler
sol_0060/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add a test case for vec growth" }, { "role": "assistant", "content": "// xfail-stage0\n\nfn main() {\n auto v = vec(1);\n v += vec(2);\n v += vec(3);\n v += vec(4);\n v += vec(5);\n check (v.(0) == 1);\n ...
rust
new_file
null
null
apache-2.0
96d4577376f8bff0b3773d3cbc4fb1aa3abebcc8
kwantam/rust,andars/rust,bombless/rust,kwantam/rust,pelmers/rust,reem/rust,zaeleus/rust,sarojaba/rust-doc-korean,mahkoh/rust,mdinger/rust,nwin/rust,carols10cents/rust,michaelballantyne/rust-gpu,aturon/rust,nham/rust,victorvde/rust,aepsil0n/rust,GBGamer/rust,bombless/rust,zubron/rust,pelmers/rust,defuz/rust,sae-bom/rust...
src/test/run-pass/vec-growth.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: test: Add a test case for derived-tydescs-before-dynamic-allocas" }, { "role": "assistant", "content": "// xfail-stage0\n\ntag option[T] {\n some(T);\n none;\n}\n\ntype r[T] = rec(mutable (option[T])[] v);\n\nfn f[T]() -> T[]...
rust
new_file
null
null
apache-2.0
7bb6733f2c186e1728b21fd4a609716a63b8250e
gifnksm/rust,aneeshusa/rust,robertg/rust,zubron/rust,mitsuhiko/rust,jashank/rust,aturon/rust,AerialX/rust-rt-minimal,AerialX/rust-rt-minimal,barosl/rust,pczarn/rust,gifnksm/rust,SiegeLord/rust,mahkoh/rust,AerialX/rust,krzysz00/rust,philyoon/rust,fabricedesre/rust,P1start/rust,fabricedesre/rust,mdinger/rust,mvdnes/rust,...
src/test/run-pass/alloca-from-derived-tydesc.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Tests: Add code to generate Add docs" }, { "role": "assistant", "content": "#![allow(dead_code)]\n#[macro_use]\nextern crate derive_more;\n\n#[derive(Add)]\nstruct MyInts(i32, i32);\n\n#[derive(Add)]\nstruct Point2D {\n x: i32,\...
rust
new_file
0
0
mit
9c05768444c1dee79b0f1eca94c649bbfa591e66
JelteF/derive_more,JelteF/derive_more
tests/add.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add RNA test from Rosalind challenge" }, { "role": "assistant", "content": "pub fn dna_to_rna_str(dna: &str ) -> ~str {\n std::str::replace(dna,\"T\", \"U\")\n}\n\n\n\nfn main() {\n let dna = ~\"ACTG\";\n let rna = dna_to_...
rust
new_file
null
null
mit
c1e3ca0a3268704d11c2a10ceace2d56b45dffa9
Ygg01/rustlind
src/rna.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add solution for Exercise 6.4" }, { "role": "assistant", "content": "/// Exercise 6.4 Calculate the latest time that can be represented by the time_t data type.\n/// After it wraps around, what happens?\n\nextern crate libc;\n#[mac...
rust
new_file
0
1
mit
91ddd0dc7e0837d8712af38e6a03d19ec89425a9
philippkeller/apue-rust,philippkeller/apue-rust,philippkeller/apue-rust
src/bin/e06-04-time_t-wrap.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 ui test with pinned extern Rust type" }, { "role": "assistant", "content": "use std::marker::PhantomPinned;\n\n#[cxx::bridge]\nmod ffi {\n extern \"Rust\" {\n type Pinned;\n }\n}\n\npub struct Pinned {\n _pinned...
rust
new_file
0
1
apache-2.0
c90897fb2f8a716f6e75ac2c1b14b740f0d48d5e
dtolnay/cxx,dtolnay/cxx,dtolnay/cxx,dtolnay/cxx
tests/ui/rust_pinned.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for `impl Trait` in argument position" }, { "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-...
rust
new_file
1
1
apache-2.0
dc7eb0eae6e3916c246f7e58f4ec00cf250ab20d
graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust
src/test/rustdoc/universal-impl-trait.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for the feature gating of naked" }, { "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.o...
rust
new_file
0
1
apache-2.0
4869417b6187e16091bfd5e45e36c999c7d0b98f
graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust
src/test/compile-fail/gated-naked_functions.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: incr.comp.: Add test case for symbol visibility changes" }, { "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// htt...
rust
new_file
2
1
apache-2.0
90f0de8244c6d25eab841b0e24caff842ec90539
GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust
src/test/incremental/change_symbol_export_status.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test of missing unsafe on extern Rust sig" }, { "role": "assistant", "content": "#[cxx::bridge]\nmod ffi {\n extern \"Rust\" {\n fn f(x: i32);\n }\n}\n\nunsafe fn f(_x: i32) {}\n\nfn main() {}\n" } ]
rust
new_file
0
1
apache-2.0
5f8a70472a5b56dd1da968f94e42349e0dc5d765
dtolnay/cxx,dtolnay/cxx,dtolnay/cxx,dtolnay/cxx
tests/ui/missing_unsafe.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an example of custom potential usage" }, { "role": "assistant", "content": "//! Using a custom potential in simulations\nextern crate cymbalum;\nuse cymbalum::*;\n\n/// Let's define a new version of the LennardJones potential, ...
rust
new_file
0
1
bsd-2-clause
b75e48bd6dfbce0403e1953eb2b6bc27d6801fcb
g-bauer/lumol,antoinewdg/lumol,Luthaf/cymbalum,g-bauer/lumol,g-bauer/lumol,Luthaf/cymbalum,antoinewdg/lumol,antoinewdg/lumol
examples/custom-potential.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test demonstrating the issue." }, { "role": "assistant", "content": "// check-pass\n//\n// This tests checks that clashing_extern_declarations handles types that are recursive through a\n// pointer or ref argument. See #75512.\...
rust
new_file
21
0
apache-2.0
b0eb55a092506aa4cfe34969c56adfeca9616750
graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/ui/lint/clashing-extern-fn-recursion.rs
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![cfg(any(target_arch=\"x86\", target_arch=\"x86_64\"))]\n\n#![no_std]\n#![crate_name=\"cpu\"]\n#![crate_type=\"rlib\"]\n#![feature(no_std)]\n#![feature(asm)]\n#![feature(core)]\n#![feature(hash)]\n\n#[macro_use]\nextern crate core;\n#[macro...
rust
edit
0
0
mit
d1c52ac0c9d8d9f61c9b77261ed17f50f4d1eb96
phil-opp/rust-x86_64,gz/rust-x86,gz/rust-x86,RustOS-Fork-Holding-Ground/libcpu,rexlunae/redox,rexlunae/redox,rexlunae/redox,Tobba/libcpu
src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: [MIR] Add test for `box EXPR` dereferencing" }, { "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-lan...
rust
new_file
null
null
apache-2.0
9b81d03114b54d9dbc594d558c907f3c5efd53be
aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust
src/test/run-pass/mir_boxing.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: test: Add a test that logs are truncated with ellipses" }, { "role": "assistant", "content": "// Test that logs add `[...]` to truncated lines\n// error-pattern:[...]\n\nfn main() {\n fail \"\\\n aaaaaaaaaaaaaaaaaaaaaaa...
rust
new_file
null
null
apache-2.0
802a8c0f1942ecc1b7c810f1833344430d989ca1
SiegeLord/rust,dwillmer/rust,pythonesque/rust,omasanori/rust,mihneadb/rust,aturon/rust,nwin/rust,cllns/rust,mdinger/rust,jashank/rust,SiegeLord/rust,aneeshusa/rust,kwantam/rust,kimroen/rust,kimroen/rust,nham/rust,mdinger/rust,nham/rust,vhbit/rust,zubron/rust,barosl/rust,mvdnes/rust,mitsuhiko/rust,LeoTestard/rust,jbclem...
src/test/run-fail/rt-log-trunc.rs
rejected_code_smell
Internal duplication: ~871% of the file is inside repeated 12+ line blocks
null
[ { "role": "user", "content": "Write rust code for the following: Add test for wild fields" }, { "role": "assistant", "content": "#![feature(plugin)]\n#![plugin(clippy)]\n\n#![deny(unneeded_field_pattern)]\n#[allow(dead_code, unused)]\n\nstruct Foo {\n a: i32,\n b: i32,\n c: i32,\n}\n\nf...
rust
new_file
2
3
apache-2.0
4b9912c2b00a047c6c19aa62ba90bb7d252f07d4
aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust
tests/compile-fail/unneeded_field_pattern.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add run-pass test suggested by @joshtriplett" }, { "role": "assistant", "content": "// run-pass\n\nfn main() {\n\tlet x = 1;\n\n\t#[cfg(FALSE)]\n\tif false {\n\t\tx = 2;\n\t} else if true {\n\t\tx = 3;\n\t} else {\n\t\tx = 4;\n\t}\...
rust
new_file
0
3
apache-2.0
e11cdfdae48f8793c618834227114bcb5a6d57bd
aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust
src/test/ui/parser/if-attrs/gate-whole-expr.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add core data structures for Version and VersionReq" }, { "role": "assistant", "content": "#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]\npub struct Version {\n pub major: u64,\n pub minor: u64,\n pub patch: u64,\...
rust
new_file
0
0
apache-2.0
48898aa5cb0bb8a9aa941835b1d5a43527639e5a
rust-lang/semver
src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a run-pass test for recursive copyable stack closures." }, { "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// ...
rust
new_file
null
null
apache-2.0
54e01eb7e0ea74c01a797f56e2bf602c298a9769
pczarn/rust,bombless/rust,kmcallister/rust,avdi/rust,j16r/rust,ejjeong/rust,philyoon/rust,gifnksm/rust,l0kod/rust,l0kod/rust,Ryman/rust,Ryman/rust,carols10cents/rust,pelmers/rust,bombless/rust,AerialX/rust,quornian/rust,pczarn/rust,kwantam/rust,jbclements/rust,jroesch/rust,seanrivera/rust,GBGamer/rust,sae-bom/rust,kimr...
src/test/run-pass/closure-bounds-recursive-stack-closure.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add test accessing the module level int/float consts" }, { "role": "assistant", "content": "// run-pass\n\n// Make sure the module level constants are still there and accessible even after\n// the corresponding associated constants...
rust
new_file
3
1
apache-2.0
61fecfb82fe088af6d3a7832b72f298064398aff
graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust
src/test/ui/use-module-level-int-consts.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an unit test for Builder corresponding to IRBuilder in C++ API." }, { "role": "assistant", "content": "#![feature(libc)]\n\nextern crate libc;\nextern crate llvm;\n\nuse llvm::*;\nuse llvm::Attribute::*;\n\n#[test]\npub fn test...
rust
new_file
0
2
bsd-3-clause
9de94ccfe39b97c19981850fc4cd55f00c62daf4
hyunsik/llvm-rust
tests/builder.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#[allow(dead_code)]\n#[derive(Copy)]\nstruct Book {\n // `&'static str` is a reference to a string allocated in read only memory\n author: &'static str,\n title: &'static str,\n year: uint,\n}\n\n// This function takes a reference...
rust
edit
0
1
apache-2.0
96c557514bbf59c51ad6374c1b2fdac1cd0c0a60
realcr/rust-by-example,MatejLach/rust-by-example,youprofit/rust-by-example,sohan99/rust-by-example,narutosanjiv/rust-by-example,rwaldron/rust-by-example,rust-lang-cn/rust-by-example-cn,kteza1/rust-by-example,DenisKolodin/rust-by-example,chriskrycho/rust-by-example,dieface/rust-by-example,XadillaX/zh-rust-by-example,nod...
examples/borrow/mut/mut.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for word-count case\n\nIt passed all testcases" }, { "role": "assistant", "content": "#![feature(ascii_ctype)]\nuse std::ascii::AsciiExt;\nuse std::collections::HashMap;\n\npub fn word_count(text: &str) -> HashMap<Str...
rust
new_file
2
3
bsd-2-clause
2690e816e7d3ea7e731876b1f1d06a2bf31617bd
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/word-count/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test that function types are actually zero-sized." }, { "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://ru...
rust
new_file
0
1
apache-2.0
1b7fb177455dbe70a461a1ede724c346d3e8f49d
GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust
src/test/run-pass/fn-item-type-zero-sized.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add example code to get a project id (from its iid, the value shown in the URL)" }, { "role": "assistant", "content": "extern crate gitlab_api as gitlab;\n\nuse std::env;\n#[macro_use]\nextern crate log;\nextern crate env_logger;\n...
rust
new_file
0
7
apache-2.0
1fee45bb1833fc700ebfd93fe2366e03ebd9730f
nbigaouette/gitlab-api-rs,nbigaouette/gitlab-api-rs
examples/get_id_project.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse std::sync::Arc;\n\nuse {Future, Wake, Tokens};\n\n/// A future which \"fuse\"s an future once it's been resolved.\n///\n/// Normally futures can behave unpredictable once they're used after a future\n/// has been resolved, but `Fuse` is a...
rust
edit
3
2
apache-2.0
7939ea0b015b999f2ee85f07f6ac808dba788d73
Idolf/futures-rs,alexcrichton/futures-rs
src/fuse.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test unknown field in remote struct" }, { "role": "assistant", "content": "#[macro_use]\nextern crate serde_derive;\n\nmod remote {\n pub struct S {\n pub a: u8,\n }\n}\n\n#[derive(Serialize, Deserialize)]\n#[serde(rem...
rust
new_file
0
1
apache-2.0
6a6606cd64e04c47dc370218b59f6ada201e2b70
serde-rs/serde
test_suite/tests/compile-fail/remote/unknown_field.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a simple example to measuring performance of writing data" }, { "role": "assistant", "content": "extern crate da;\nextern crate env_logger;\nextern crate rand;\n\nuse std::path::Path;\n\nuse rand::{SeedableRng, XorShiftRng, Rng...
rust
new_file
0
2
apache-2.0
38cf26ab39e2339c1f669f93179aa6c295903ead
alekseysidorov/exonum,alekseysidorov/exonum,exonum/exonum,exonum/exonum,exonum/exonum,alekseysidorov/exonum,alekseysidorov/exonum,exonum/exonum
examples/merkle_map.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add benchmarks for measuring function call overhead" }, { "role": "assistant", "content": "#![feature(test)]\n\nextern crate test;\n\nextern crate gluon;\n\nuse gluon::{Compiler, new_vm};\nuse gluon::vm::api::FunctionRef;\n\n...
rust
new_file
0
2
mit
c76d443bf27e2d1e267de4e759f57c50c3c6f8ff
Marwes/gluon,Marwes/embed_lang,Marwes/gluon,Marwes/embed_lang,gluon-lang/gluon,gluon-lang/gluon
benches/function_call.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to Advent day 10" }, { "role": "assistant", "content": "// advent10.rs\n// look-and-say\n\nuse std::io;\n\nfn main() {\n // Part 1 and 2\n let mut input = String::new();\n\n io::stdin().read_line(&mut input)\n...
rust
new_file
3
4
mit
05142dd47d8ece63d911b844a48718d13500363f
davidsullins/AdventOfCodeRust
src/bin/advent10.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test of placement-in syntax, analogous to `new-box-syntax.rs`" }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and ...
rust
new_file
null
null
apache-2.0
505cd8a3cc9ddc89ff766a07cc90797421296d34
vhbit/rust,vhbit/rust,pshc/rust,vhbit/rust,zubron/rust,GBGamer/rust,jashank/rust,aidancully/rust,dwillmer/rust,pshc/rust,aidancully/rust,l0kod/rust,graydon/rust,graydon/rust,zubron/rust,aidancully/rust,jroesch/rust,pshc/rust,GBGamer/rust,jashank/rust,l0kod/rust,jroesch/rust,aidancully/rust,jashank/rust,graydon/rust,dwi...
src/test/run-pass/placement-in-syntax.rs
rejected_syntax
Syntax error detected by tree-sitter
false