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: rustc: Add a test case for previous commit" }, { "role": "assistant", "content": "tag opt[T] {\n none;\n}\n\nfn main() {\n auto x = none[int];\n alt (x) {\n case (none[int]) { log \"hello world\"; }\n }\n}\n\n" ...
rust
new_file
null
null
apache-2.0
55ab187c9cbffc3b938b40032c6031202c3d8f50
kwantam/rust,zubron/rust,mdinger/rust,SiegeLord/rust,jbclements/rust,nwin/rust,j16r/rust,carols10cents/rust,michaelballantyne/rust-gpu,kimroen/rust,hauleth/rust,TheNeikos/rust,pshc/rust,AerialX/rust-rt-minimal,pczarn/rust,carols10cents/rust,l0kod/rust,mihneadb/rust,barosl/rust,jbclements/rust,sarojaba/rust-doc-korean,k...
src/test/run-pass/simple-alt-generic-tag.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: test: Add test for LHS expression check" }, { "role": "assistant", "content": "// Copyright 2012-2013 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
cab00457fefb89444cd4b7a4e601dc6d200e0c86
victorvde/rust,vhbit/rust,bombless/rust,seanrivera/rust,nham/rust,emk/rust,pczarn/rust,emk/rust,erickt/rust,mvdnes/rust,cllns/rust,mdinger/rust,zubron/rust,jashank/rust,philyoon/rust,KokaKiwi/rust,jbclements/rust,GBGamer/rust,mdinger/rust,AerialX/rust-rt-minimal,ejjeong/rust,kwantam/rust,AerialX/rust,graydon/rust,stepa...
src/test/compile-fail/bad-expr-lhs.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: testsuite: Test that init and forget are both unsafe" }, { "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
new_file
0
1
apache-2.0
ca18ed8f64daa12138352541f7d8ccfc593b2970
aidancully/rust,ruud-v-a/rust,GBGamer/rust,pythonesque/rust,krzysz00/rust,sae-bom/rust,0x73/rust,KokaKiwi/rust,jbclements/rust,pshc/rust,mitsuhiko/rust,P1start/rust,robertg/rust,fabricedesre/rust,hauleth/rust,AerialX/rust,zachwick/rust,aturon/rust,reem/rust,zubron/rust,jroesch/rust,sarojaba/rust-doc-korean,erickt/rust,...
src/test/compile-fail/forget-init-unsafe.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rather slow solution to problem 25" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\nextern crate num;\n\nuse num::traits::Zero;\nuse num::traits::One;\nuse num::bigint::BigUint;\nuse std::mem::replace...
rust
new_file
0
3
mit
cd3654be1ae8fad150022a2aac8e3713c683a883
zmbush/euler,zmbush/euler
sol_0025/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Create an example for node executing instructions" }, { "role": "assistant", "content": "extern crate tis_100_superoptimizer;\n\nuse tis_100_superoptimizer::TIS_100::{Node,Instruction,Source,Destination};\n\nfn main() {\n let no...
rust
new_file
0
1
mit
47be5e14d6847a3ab5ce77a7ba97fc069bae99ef
dvberkel/TIS-100.superoptimizer,dvberkel/TIS-100.superoptimizer,dvberkel/TIS-100.superoptimizer,dvberkel/TIS-100.superoptimizer
examples/node_instructions.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 69" }, { "role": "assistant", "content": "#[macro_use] extern crate libeuler;\n\nuse libeuler::prime::SieveOfAtkin;\n/// Euler's Totient function, φ(n) [sometimes called the phi function], is used to determi...
rust
new_file
0
1
mit
c2749ca9da541e26b95a0234f2be5af0bea1222e
zmbush/euler,zmbush/euler
sol_0069/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for std._vec.init_elt, and an XFAILed test for std._vec.init_fn." }, { "role": "assistant", "content": "use std;\n\nfn test_init_elt() {\n let vec[uint] v = std._vec.init_elt[uint](uint(5), uint(3));\n check (std._vec....
rust
new_file
null
null
apache-2.0
c866672a994267c165bef960d90b0fa8f9677b22
pczarn/rust,mdinger/rust,dinfuehr/rust,mdinger/rust,sarojaba/rust-doc-korean,nham/rust,mitsuhiko/rust,fabricedesre/rust,dinfuehr/rust,mvdnes/rust,P1start/rust,bombless/rust,miniupnp/rust,mdinger/rust,richo/rust,miniupnp/rust,LeoTestard/rust,ruud-v-a/rust,nham/rust,j16r/rust,ejjeong/rust,pshc/rust,barosl/rust,l0kod/rust...
src/test/run-pass/vec-lib.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add regression test for old NLL ICE" }, { "role": "assistant", "content": "// check-pass\n\n#![crate_type = \"lib\"]\n\n// In an older version, when NLL was still a feature, the following previously did not compile\n// #![feature(n...
rust
new_file
0
1
apache-2.0
749295cfbfd408cde8a0c07e021387013fb8b65c
graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust
src/test/ui/issues/issue-51770.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n//! This is the main lib.rs file for Xt Core\n\n// This file is part of Xt.\n\n// This is the Xt text editor; it edits text.\n// Copyright (C) 2016-2017 The Xt Developers\n\n// This program is free software: you can redistribute it and/or\n/...
rust
edit
1
0
apache-2.0
5e5b9dbca60f3ea82209e1f1465e13e258ed759a
shymega/slacs,shymega/slacs
src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: process: Add regression test for signal starvation" }, { "role": "assistant", "content": "#![cfg(unix)]\n\nextern crate futures;\nextern crate tokio_process;\n\nuse futures::{Future, IntoFuture, Stream, stream};\nuse std::process::...
rust
new_file
0
2
mit
d3b2efc815619a14c0b927d4e58c58db3014b46f
tokio-rs/tokio,tokio-rs/tokio
tests/issue_42.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a single function to get the length of a chunk, based on his index, and a few simple unit tests" }, { "role": "assistant", "content": "use std::cmp::min;\n\nuse Byte;\n\n/// Represents a range between two Byte types\n#[derive(D...
rust
new_file
3
3
mit
0bdd566034ed70860f89c942413c26671cd14beb
derniercri/snatch
src/download.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add Breadth-First Search using The Rust Programming Language" }, { "role": "assistant", "content": "use std::io::stdin;\nuse std::collections::VecDeque;\n\n// DFS receives a graph and the start point\nfn bfs(graph: &mut Vec<Vec<usi...
rust
new_file
7
4
cc0-1.0
a16ebe9b0502595d23e7cda9e2139222330a4936
ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs...
graph/Rust/BFS.rs
rejected_lint
Too many lint violations: 7
true
[ { "role": "user", "content": "Write rust code for the following: Add a simple encoding example" }, { "role": "assistant", "content": "// Encode the same tiny blank frame 30 times\nuse rav1e::*;\n\nfn main() {\n let mut cfg = Config::default();\n\n cfg.enc.width = 64;\n cfg.enc.height = 96;\n\...
rust
new_file
0
7
bsd-2-clause
9551038647e2ae10a5b606bb630dd4f5e1641f9e
xiph/rav1e,xiph/rav1e
examples/simple_encoding.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\npub mod wireframe;\npub mod filled;\npub mod textured;\n\n/// Do perspective calculation on a point, return (x, y).\nfn perpective(x: f32, y: f32, z: f32) -> (f32, f32) {\n (x/z, y/z)\n}\n\n/// Turn floating point coordinates to something ...
rust
edit
1
1
mit
502a03e2c6bbcaf23892443a464e5caa423b8855
ca1ek/tetrahedrane
src/renderers/mod.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// Derive the `fmt::Debug` implementation for `Structure`. `Structure`\n// is a structure which contains a single `i32`.\n#[derive(Debug)]\nstruct Structure(i32);\n\n// Put a `Structure` inside of the structure `Deep`. Make it printable\n// a...
rust
edit
3
1
apache-2.0
00ca0fd94c5eb83eafdec8a32b9ec62160a9c03b
DenisKolodin/rust-by-example,nodakai/rust-by-example,sohan99/rust-by-example,DenisKolodin/rust-by-example,beni55/rust-by-example,aakloxu/rust-by-example-cn,jinyuanxie/rust-by-example-cn,MatejLach/rust-by-example,realcr/rust-by-example,dieface/rust-by-example,zhjh1209/rust-by-example,zhjh1209/rust-by-example,rwaldron/ru...
examples/print/print_debug/debug.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for the new raw writing API\n\nThis is mostly to ensure we don't break anything drastically." }, { "role": "assistant", "content": "//! Tests for the raw write logging functionality.\nextern crate fern;\nextern crate log...
rust
new_file
3
3
mit
608371bef3d3a6e068386aa4c9a2e7e4d9b38ead
daboross/fern-rs
tests/write_logging.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add tests for sw_vers parsing" }, { "role": "assistant", "content": "extern crate regex;\n#[path=\"../src/sw_vers.rs\"]\nmod sw_vers;\n#[path=\"../src/utils.rs\"]\nmod utils;\n\nfn file() -> String {\n\"\nProductName:\tMac OS...
rust
new_file
0
1
mit
6b1639607e02fb68039734dc15ec48d25d94e09e
schultyy/os_type
tests/sw_vers_test.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// xfail-boot\n// xfail-stage0\nuse std;\nimport std._str;\n\nfn test(str actual, str expected) {\n log actual;\n log expected;\n check (_str.eq(actual, expected));\n}\n\nfn main() {\n test(#fmt(\"hello %d friends and %s things\", 10, \"f...
rust
edit
null
null
apache-2.0
44aed626bf56b72af4934768e9fa31ad4439935a
mitsuhiko/rust,LeoTestard/rust,vhbit/rust,rohitjoshi/rust,barosl/rust,kmcallister/rust,l0kod/rust,andars/rust,kimroen/rust,dinfuehr/rust,defuz/rust,fabricedesre/rust,0x73/rust,GBGamer/rust,seanrivera/rust,j16r/rust,robertg/rust,SiegeLord/rust,ktossell/rust,GBGamer/rust,AerialX/rust,ejjeong/rust,kimroen/rust,zachwick/ru...
src/test/run-pass/syntax-extension-fmt.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```rust\nuse num;\n\npub trait Color: Clone + PartialEq {\n type Tag;\n type ChannelsTuple;\n\n fn num_channels() -> u32;\n fn from_tuple(values: Self::ChannelsTuple) -> Self;\n fn to_tuple(self) -> Self::ChannelsTuple;\n}\n\npub trait ...
rust
edit
1
1
mit
b9f0831d1839db86beab44e0dcd29ee5fcc028a2
tylerreisinger/rust-color
src/color.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// xfail-test #2587\n// error-pattern: copying a noncopyable value\n\nstruct r {\n let i:int;\n new(i:int) {self.i = i;}\n}\n\nimpl r : Drop {\n fn finalize() {}\n}\n\nfn main() {\n // This can't make sense as it would copy the classe...
rust
edit
null
null
apache-2.0
b9b21b26146b053f24cc868e20aa96ef729a36c2
l0kod/rust,zaeleus/rust,Ryman/rust,barosl/rust,0x73/rust,fabricedesre/rust,dinfuehr/rust,ejjeong/rust,vhbit/rust,aturon/rust,erickt/rust,sarojaba/rust-doc-korean,carols10cents/rust,zubron/rust,gifnksm/rust,rprichard/rust,barosl/rust,seanrivera/rust,retep998/rand,j16r/rust,ruud-v-a/rust,zachwick/rust,richo/rust,jbclemen...
src/test/compile-fail/vec-res-add.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add initial basic benchmark for header setters" }, { "role": "assistant", "content": "#![feature(test)]\n\nextern crate rips_packets;\nextern crate test;\n\nuse rips_packets::ethernet::{MutEthernetPacket, ether_types};\nuse rips_pa...
rust
new_file
0
2
apache-2.0
a3311caaba8d4bd168eed4c4ed668258f6e22877
faern/rips
rips-packets/benches/packet_headers.rs
accepted
null
true
[ { "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
0
1
apache-2.0
148b5e4e108fbcdb033eabc76536f65deb181d4f
aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust
src/librustc_back/target/i686_linux_android.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for the osc decoder" }, { "role": "assistant", "content": "extern crate rosc;\n\nuse rosc::{types, errors, decoder, utils};\n\n#[test]\nfn test_decode() {\n let raw_addr = \"/some/valid/address/4\";\n let addr = pa...
rust
new_file
0
3
apache-2.0
3ea17c12495c318b0273ff3513d8409f00cea8c1
klingtnet/rosc
tests/decoder_test.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for vstore, which already works" }, { "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...
rust
new_file
null
null
apache-2.0
bbb1202528cf14de4f6b3a4f01c22ab19d64d8e7
jroesch/rust,bombless/rust,aneeshusa/rust,aepsil0n/rust,graydon/rust,jbclements/rust,sae-bom/rust,graydon/rust,AerialX/rust-rt-minimal,ejjeong/rust,reem/rust,aidancully/rust,ktossell/rust,nham/rust,Ryman/rust,pelmers/rust,omasanori/rust,zaeleus/rust,mdinger/rust,stepancheg/rust-ide-rust,waynenilsen/rand,TheNeikos/rust,...
src/test/run-pass/const-enum-vec-ptr.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for isbn-verifier\n\nIt passed all test cases" }, { "role": "assistant", "content": "#![feature(ascii_ctype)]\n\npub fn is_valid_isbn(isbn: &str) -> bool {\n let mut iter = isbn.chars().peekable();\n\n if let So...
rust
new_file
0
0
bsd-2-clause
0569d81f3435b4d6defa156674996e1d863554dd
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/isbn-verifier/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add a test case for linearize_ty_params() and shapes" }, { "role": "assistant", "content": "// xfail-test\n\n// Tests that shapes respect linearize_ty_params().\n\ntag option<T> {\n none;\n some(T);\n}\n\ntype smallintm...
rust
new_file
null
null
apache-2.0
10ea78777262befef997bf61e7c21db0aa6792e7
jroesch/rust,aneeshusa/rust,kimroen/rust,SiegeLord/rust,miniupnp/rust,erickt/rust,LeoTestard/rust,dwillmer/rust,carols10cents/rust,mahkoh/rust,KokaKiwi/rust,dwillmer/rust,zubron/rust,aepsil0n/rust,hauleth/rust,fabricedesre/rust,cllns/rust,AerialX/rust,AerialX/rust-rt-minimal,GBGamer/rust,krzysz00/rust,sarojaba/rust-doc...
src/test/run-pass/log-linearized.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for say\n\nIt passed all testcases." }, { "role": "assistant", "content": "const TEN: u64 = 10;\nconst HUNDRED: u64 = 100;\nconst THOUSAND: u64 = 1000;\n\nfn ntable(number: u64) -> &'static str {\n match number {\n...
rust
new_file
0
5
bsd-2-clause
bbde820f7d22866718048c04d1c5ced3de6f0c04
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/say/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// 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// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n//...
rust
edit
1
0
apache-2.0
3744d828513092d1ed64c4c6f8cd2536f7a5ff0d
AerialX/rust-rt-minimal,graydon/rust,erickt/rust,l0kod/rust,mihneadb/rust,cllns/rust,mihneadb/rust,miniupnp/rust,dinfuehr/rust,pelmers/rust,graydon/rust,emk/rust,zachwick/rust,richo/rust,gifnksm/rust,zubron/rust,ebfull/rust,defuz/rust,ejjeong/rust,philyoon/rust,rohitjoshi/rust,AerialX/rust,stepancheg/rust-ide-rust,ebfu...
src/test/compile-fail/lex-unknown-str-escape.rs
rejected_duplicate
Near-duplicate of sample 120289
true
[ { "role": "user", "content": "Write rust code for the following: Add file to section 2 of examples" }, { "role": "assistant", "content": "use std::mem;\n\n// This function borrows a slice\nfn analyze_slice(slice: &[i32]) {\n println!(\"first element: {}\", slice[0]);\n println!(\"slice has...
rust
new_file
0
1
mit
bdbd9b931daa9cb8ee87c64bb89ca02a2054148a
jnwarp/learn-rust
examples/2-3-arrays.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test for incorrect remote type deserializing" }, { "role": "assistant", "content": "#[macro_use]\nextern crate serde_derive;\n\nmod remote {\n pub struct S(pub u16);\n}\n\n#[derive(Deserialize)] //~ ERROR: mismatched types\n#[se...
rust
new_file
0
1
apache-2.0
ad5bf04c4e983f7663ae58e3728e93610b3ce3f3
serde-rs/serde
test_suite/tests/compile-fail/remote/wrong_de.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add tests for wrapping integers\n\nSigned-off-by: Matthias Beyer <<EMAIL>>" }, { "role": "assistant", "content": "extern crate config;\n\nuse config::*;\n\n#[test]\nfn wrapping_u16() {\n let c = Config::builder()\n .add_s...
rust
new_file
0
1
apache-2.0
f5f529512e4d896995689fa85b91fdf8a5eb1730
mehcode/config-rs
tests/integer_range.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\nstruct Foo;\nstruct Bar;\n\n#[deriving(Show)]\nstruct FooBar;\n\n#[deriving(Show)]\nstruct BarFoo;\n\n// The `Add<T, U>` trait needs two generic parameters:\n// * T is the type of the RHS summand, and\n// * U is the type of the sum\n// This b...
rust
edit
0
1
apache-2.0
a41e8be8c6e0712ab5c1115c53a8cdcf8d53b52a
brunotag/rust-by-example,rwaldron/rust-by-example,colinvh/rust-by-example,shaleh/rust-by-example,DenisKolodin/rust-by-example,zhjh1209/rust-by-example,rust-lang-cn/rust-by-example-cn,XadillaX/zh-rust-by-example,mdinger/rust-by-example,rustcc/rust-by-example,nodakai/rust-by-example,youprofit/rust-by-example,realcr/rust-...
examples/ops/operator.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Implement a test for the Drop trait on a generic struct. a=test-only" }, { "role": "assistant", "content": "struct S<T> {\n x: T\n}\n\nimpl<T> S<T> : core::ops::Drop {\n fn finalize() {\n io::println(\"bye\");\n ...
rust
new_file
null
null
apache-2.0
b9f9ab8f7775039e02cbe38c270c81e893da8e2b
AerialX/rust-rt-minimal,ebfull/rand,zachwick/rust,mihneadb/rust,jbclements/rust,erickt/rust,victorvde/rust,0x73/rust,servo/rust,victorvde/rust,pczarn/rust,ebfull/rust,defuz/rust,TheNeikos/rust,barosl/rust,XMPPwocky/rust,mvdnes/rust,reem/rust,l0kod/rust,robertg/rust,bhickey/rand,AerialX/rust,richo/rust,nham/rust,aneeshu...
src/test/run-pass/drop-trait-generic.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add regression test for duplicate items in overlapping impls. Note that a regression test already exists for *non*overlapping impls." }, { "role": "assistant", "content": "// Copyright 2016 The Rust Project Developers. See the COPY...
rust
new_file
0
1
apache-2.0
4b4c6fd43402a22ce2978de4ec98f61540e09ea5
graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust
src/test/compile-fail/inherent-overlap.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: examples: Add support for a simple CTAP example\n\nSigned-off-by: Alistair Francis <<EMAIL>>" }, { "role": "assistant", "content": "#![no_std]\n/// This is a very basic CTAP example\n/// This example only calls the CTAP driver call...
rust
new_file
0
14
apache-2.0
b41f354ada9a5cdbcaec904e32dda2659383a1d7
tock/libtock-rs
examples/ctap.rs
rejected_complexity
Cyclomatic complexity too high: 14
true
[ { "role": "user", "content": "Write rust code for the following: Add an example to render without Renderer" }, { "role": "assistant", "content": "extern crate sdl2;\n\nuse sdl2::pixels::Color;\nuse sdl2::event::Event;\nuse sdl2::keyboard::Keycode;\nuse sdl2::video::Window;\nuse sdl2::rect::Rect;...
rust
new_file
0
4
mit
650051c504486b836af4263807681a729d9db202
Rust-SDL2/rust-sdl2,Rust-SDL2/rust-sdl2,AngryLawyer/rust-sdl2,Cobrand/rust-sdl2,Cobrand/rust-sdl2,Cobrand/rust-sdl2,Rust-SDL2/rust-sdl2
examples/no-renderer.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an xfailed test for bogus vector addition of typarams" }, { "role": "assistant", "content": "// xfail-test\n// expected error: mismatched kinds\n\nresource r(i: @mutable int) {\n *i = *i + 1;\n}\n\nfn f<@T>(i: [T], j: [T]) {...
rust
new_file
null
null
apache-2.0
4bffa5e13a5a103a3ced7e868bd2eb673755a7e6
graydon/rust,quornian/rust,hauleth/rust,jbclements/rust,jroesch/rust,barosl/rust,defuz/rust,huonw/rand,aneeshusa/rust,dwillmer/rust,erickt/rust,retep998/rand,kmcallister/rust,stepancheg/rust-ide-rust,michaelballantyne/rust-gpu,miniupnp/rust,j16r/rust,stepancheg/rust-ide-rust,vhbit/rust,mihneadb/rust,pythonesque/rust,ma...
src/test/compile-fail/unique-vec-res.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "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
null
null
apache-2.0
e7f08822147c495592bef83eeb835640a6342a2a
ruud-v-a/rust,SiegeLord/rust,emk/rust,philyoon/rust,erickt/rust,philyoon/rust,ejjeong/rust,pelmers/rust,AerialX/rust,philyoon/rust,rohitjoshi/rust,pshc/rust,barosl/rust,ebfull/rust,nham/rust,rprichard/rust,XMPPwocky/rust,reem/rust,miniupnp/rust,GBGamer/rust,0x73/rust,Ryman/rust,zubron/rust,0x73/rust,jbclements/rust,ste...
src/test/run-pass/c-stack-returning-int64.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add example of connection using TLS" }, { "role": "assistant", "content": "use ldap3::LdapConn;\n\nconst LDAPS_SERVER: &str = \"ldaps://directory.example.com:636\";\nconst LDAP_SERVICE_USER_DN: &str = \"CN=ldapuser,CN=Users,DC=exam...
rust
new_file
0
1
apache-2.0
091c24397ce41724843e2b60fda42d00290112a6
inejge/rust-ldap,inejge/ldap3,inejge/ldap3
examples/connect_tls.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add compile-fail test to assert HasDual is sealed" }, { "role": "assistant", "content": "extern crate session_types;\n\nuse session_types::HasDual;\n\nstruct CustomProto;\n\nimpl HasDual for CustomProto { //~ ERROR the trait bound ...
rust
new_file
0
1
mit
59315533a7cc0d095a3cd48815b67deaee7c2864
Munksgaard/session-types
tests/compile-fail/cannot-impl-hasdual.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add example with the code in tutorial 01" }, { "role": "assistant", "content": "#[macro_use]\nextern crate glium;\nextern crate glutin;\n\nfn main() {\n use glium::{DisplayBuild, Surface};\n let display = glutin::WindowBuilde...
rust
new_file
0
2
apache-2.0
0d46b8e389d1345637e85084667068ec253dc0cc
acolley/glium,nicokoch/glium,rozaliev/glium,glium/glium,christopheraugustus/glium,carbidegames/glium,bvssvni/glium,binsoftware/glium,cpjreynolds/glium,caldwell/glium,tomaka/glium,sdotz/glium,TyOverby/glium
examples/tutorial-01.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add regression test for write_primval bug." }, { "role": "assistant", "content": "// PrimVals in Miri are represented with 8 bytes (u64) and at the time of writing, the `-x`\n// will sign extend into the entire 8 bytes. Then, if yo...
rust
new_file
0
1
apache-2.0
142d971c821717f37e2e45abbc556d1059745145
rust-lang/miri,rust-lang/miri,rust-lang/miri,GBGamer/rust,rust-lang/miri,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,tsion/miri,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,aid...
tests/run-pass/too-large-primval-write-problem.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add a test that function argument patterns take in the expected type. r=test-only" }, { "role": "assistant", "content": "fn main() {\n let f: fn((int,int)) = |(x, y)| {\n assert x == 1;\n assert y == 2;\n ...
rust
new_file
null
null
apache-2.0
9678abedecfb1b57158dcd5d1ebba9914a089dc5
defuz/rust,graydon/rust,nwin/rust,barosl/rust,GBGamer/rust,kimroen/rust,erickt/rust,rohitjoshi/rust,zachwick/rust,carols10cents/rust,aepsil0n/rust,miniupnp/rust,aepsil0n/rust,TheNeikos/rust,LeoTestard/rust,aepsil0n/rust,XMPPwocky/rust,ebfull/rust,zubron/rust,pshc/rust,aepsil0n/rust,stepancheg/rust-ide-rust,aneeshusa/ru...
src/test/run-pass/fn-pattern-expected-type.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add rust code for isogram case\n\nIt passed all test cases" }, { "role": "assistant", "content": "#![feature(ascii_ctype)]\n\npub fn check(words: &str) -> bool {\n let mut mask = 0u32;\n\n for c in words.chars() {\n if...
rust
new_file
0
4
bsd-2-clause
aea21489d6d4d09479bc1090523dbaba66681e18
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/isogram/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a regression test for use of unexported fully-qualified paths\n\nAn unexported foo.baz can't be resolved from inside foo when called as foo.baz\ninstead of just baz. This behavior may want to change eventually." }, { "role": "assis...
rust
new_file
null
null
apache-2.0
f25e6783657cde34e25aa8ba105cd43fe9bda787
LeoTestard/rust,jashank/rust,mihneadb/rust,gifnksm/rust,nham/rust,reem/rust,bombless/rust,mihneadb/rust,emk/rust,zubron/rust,pelmers/rust,zaeleus/rust,gifnksm/rust,sarojaba/rust-doc-korean,sarojaba/rust-doc-korean,P1start/rust,emk/rust,pythonesque/rust,GBGamer/rust,cllns/rust,TheNeikos/rust,seanrivera/rust,victorvde/ru...
src/test/compile-fail/export-fully-qualified.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: examples: Add example for storing file feature" }, { "role": "assistant", "content": "extern crate fruently;\nuse std::env;\nuse fruently::fluent::Fluent;\nuse fruently::retry_conf::RetryConf;\nuse std::collections::HashMap;\nuse f...
rust
new_file
0
2
mit
869c3f69b9d6b28488969c66f69b05f4c0c7c882
cosmo0920/fruently,cosmo0920/fruently
examples/store_file.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add concrete test for square array" }, { "role": "assistant", "content": "extern crate fitsio;\n\nuse fitsio::FitsFile;\n\n#[test]\nfn test_square_array() {\n let filename = \"../testdata/square_array.fits\";\n let mut f = Fi...
rust
new_file
0
1
apache-2.0
2ea3d3c8a6b00dfd0fd78f78e6691192cfc2c159
mindriot101/rust-fitsio,mindriot101/rust-fitsio,mindriot101/rust-fitsio,mindriot101/rust-cfitsio,mindriot101/rust-fitsio,mindriot101/rust-cfitsio,mindriot101/rust-fitsio
fitsio/tests/test_square_array.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![cfg(feature = \"s3\")]\n\nextern crate env_logger;\n#[macro_use]\nextern crate log;\nextern crate time;\n\n#[macro_use]\nextern crate rusoto;\n\nuse rusoto::{DefaultCredentialsProvider, Region};\nuse rusoto::s3::{S3Error, S3Helper};\n\n#[t...
rust
edit
0
2
mit
9236f15a67f32404b5e74ab2b532ec5accb59cbe
DualSpark/rusoto,indiv0/rusoto,DualSpark/rusoto,DualSpark/rust-aws,DualSpark/rusoto,ford-prefect/rusoto,rusoto/rusoto,DualSpark/rust-aws,rusoto/rusoto,mattico/rusoto,noggleboggle/rusoto,rusoto/rusoto,mthjones/rusoto,SecurityInsanity/rusoto,mthjones/rusoto,SecurityInsanity/rusoto,DualSpark/rust-aws,mattico/rusoto,cmsd2/...
tests/s3.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test that multiple wrappers created from a handle share a ref count" }, { "role": "assistant", "content": "/* Copyright 2015 Jordan Miner\n *\n * Licensed under the MIT license <LICENSE or\n * http://opensource.org/licenses/MIT>. T...
rust
new_file
0
2
mit
891ddceb0ac554910dd53611dd29602ed3266c36
jminer/clear-coat
tests/deduplication.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
1
apache-2.0
b450aff18689ea0d0695b4f5a59bb360ae549f87
GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/compile-fail/issue-23173.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add compile-fail test for invalid cfg predicate in attribute\n\nRefs #31495" }, { "role": "assistant", "content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distrib...
rust
new_file
0
1
apache-2.0
601e04534f4f8117f4d121bdd9bfb5ed100c72e6
aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust
src/test/compile-fail/cfg-attr-invalid-predicate.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![feature(custom_attribute, box_syntax)]\n#![allow(dead_code, unused_attributes)]\n\n#[miri_run]\nfn rc_cell() -> i32 {\n use std::rc::Rc;\n use std::cell::Cell;\n let r = Rc::new(Cell::new(42));\n let x = r.get();\n r.set(x +...
rust
edit
0
1
apache-2.0
7568a0b5b1f722e83a46135aa53cb7056b6fd908
graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,rust-lang/miri,rust-lang/miri,aidancully/rust,aidancully/rust,rust-lang/miri,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,rust-lang/miri,GBGamer/rust,tsion/miri,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/ru...
test/std.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add tests for checking for extraneous leading newlines (or lack thereof)\n\nCouldn't find a better place to put this (the \"valid\" and \"invalid\"\ntests are just for parser) so I made a new test module" }, { "role": "assistant", ...
rust
new_file
0
1
apache-2.0
89384b1e0cd9b567060d74fb4554cd1de84352d0
alexcrichton/toml-rs,GuillaumeGomez/toml-rs
tests/formatting.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for errors unifying an integer variable with a float variable" }, { "role": "assistant", "content": "// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distributi...
rust
new_file
0
1
apache-2.0
cac995444b69cb1453bc2be1fd5de27f110c0e01
mdinger/rust,mdinger/rust,mvdnes/rust,kimroen/rust,hauleth/rust,victorvde/rust,pshc/rust,andars/rust,l0kod/rust,carols10cents/rust,ejjeong/rust,dinfuehr/rust,dwillmer/rust,carols10cents/rust,kimroen/rust,mahkoh/rust,GBGamer/rust,GBGamer/rust,philyoon/rust,barosl/rust,miniupnp/rust,aidancully/rust,ktossell/rust,hauleth/...
src/test/compile-fail/integral-variable-unification-error.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add tests for ensuring docblock headings." }, { "role": "assistant", "content": "#![crate_name = \"foo\"]\n\n// @has foo/trait.Read.html\n// @has - '//h2' 'Trait examples'\n/// # Trait examples\npub trait Read {\n // @has - '//h...
rust
new_file
1
1
apache-2.0
08a4f24f6873bff2845e1e52f2785a8a903ac133
aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust
src/test/rustdoc/issue-89309-heading-levels.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add piping code for Commands\n\nThis does piping properly, but it is not integrated with the rest of\nthe application." }, { "role": "assistant", "content": "use std::process::{Stdio, Command, Child};\nuse std::os::unix::io::{FromR...
rust
new_file
0
5
mit
e764ffb2778b756b66143f20e91954ec847adbbe
bheesham/ion,skylerberg/ion,jwbowen/ion,redox-os/ion,redox-os/ion,redox-os/ion,jwbowen/ion,bheesham/ion
src/pipe.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add counting up with line clearing example" }, { "role": "assistant", "content": "use std::io::timer;\nuse std::io::stdio;\n\nfn main() {\n stdio::print(\"Loading...\");\n stdio::flush();\n timer::sleep(1000);\n for num in rang...
rust
new_file
0
2
mit
e7dc119366ab6ff04abdf3d3deb5efa82a8a2c8f
lord/emoji-shell
shell.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for 'std' crate being public" }, { "role": "assistant", "content": "// The 'std' crates should always be implicitly public,\n// without having to pass any compiler arguments\n\n// run-pass\n\n#![feature(public_private_depe...
rust
new_file
1
1
apache-2.0
bc2221f7b6778de779113f1b9021477cf313010b
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/ui/privacy/pub-priv-dep/std-pub.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n#![feature(core)]\n#![feature(io)]\n#![feature(std_misc)]\n#![feature(step_by)]\n#![feature(test)]\n\nextern crate byteorder;\nextern crate flate2;\nextern crate nbt;\nextern crate \"rustc-serialize\" as rustc_serialize;\nextern crate test;\n...
rust
edit
2
0
mit
eba74f50d98ef060a51ab97b254e80e40ee61329
toqueteos/hematite_server,PistonDevelopers/hematite_server,fenhl/hematite_server
src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Duplicate test for type conversion with unsigned int\n\nThis patch duplicates the test that was done with indexmap here with the\nnormal HashMap from std.\n\nSigned-off-by: Matthias Beyer <<EMAIL>>" }, { "role": "assistant", "conte...
rust
new_file
0
1
apache-2.0
b7688b7f5792e784a4b0e5175141aa0c317e2e10
mehcode/config-rs
tests/unsigned_int_hm.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Make rust-la build with latest rust." }, { "role": "assistant", "content": "// Copyright 2013 The Servo Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution.\n//\n// Licensed under the Apac...
rust
new_file
0
2
apache-2.0
65c364f2cf6782848d80836ff10d2eacd4f0dbd6
tempbottle/rust-la,xasmx/rust-la
src/approxeq.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for const endianess conversion" }, { "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.or...
rust
new_file
0
1
apache-2.0
490c57b1563266a02c970405e731d73f4f2fc42b
GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/run-pass/const-endianess.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add missing file from previous commit." }, { "role": "assistant", "content": "use hyper::net::Openssl;\nuse openssl::crypto::pkey::PKey;\nuse openssl::ssl::{SslContext, SslMethod, SSL_VERIFY_NONE};\nuse openssl::ssl::error::SslErro...
rust
new_file
null
null
mit
e6dd77fc029687950d7999dd29a8a0bd8adbb3d3
plietar/spotify-connect,SimonPersson/librespot,bobbo/spotify-connect-scrobbler,plietar/librespot,bobbo/spotify-connect-scrobbler,XDjackieXD/librespot,michaelherger/librespot,joerg-krause/librespot,michaelherger/librespot,XDjackieXD/librespot,joerg-krause/librespot,plietar/librespot
src/spotilocal.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add Rust solutin for balanced brackets" }, { "role": "assistant", "content": "use std::collections::HashMap;\n\nfn balanced_brackets(s: &str) -> bool {\n // Use a vector as a stack\n let mut stack = Vec::new();\n\n let mut match...
rust
new_file
4
4
mit
83b47904c6c78141e811a9d56da338c3e162ee11
mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-interview,mre/the-coding-inter...
problems/balanced-brackets/balanced_brackets.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test: Add test that aux2bib runs\n\nThis just tests that aux2bib exists and runs. I couldn't find\ndocumentation on doing tests of binaries, but borrowed from what ripgrep\ndoes.\n\nThis test may break in the future if Cargo changes where bin...
rust
new_file
0
2
apache-2.0
b160c83a90d3e820be80865d111eb5e61007a0a0
musoke/inspirer,musoke/inspirer
tests/tests.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an example for counted flags.\n\nClose #56." }, { "role": "assistant", "content": "extern crate serialize;\nextern crate docopt;\n\nuse docopt::Docopt;\n\n// This shows how to implement multiple levels of verbosity.\n//\n// Whe...
rust
new_file
0
1
unlicense
36ed322e4ad946a03264879500963e4470feefeb
brandonson/docopt.rs,zsiciarz/docopt.rs,brandonson/docopt.rs,brandonson/docopt.rs,zsiciarz/docopt.rs,birkenfeld/docopt.rs,zsiciarz/docopt.rs,birkenfeld/docopt.rs,birkenfeld/docopt.rs
examples/verbose_multiple.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add solution to problem 29" }, { "role": "assistant", "content": "#![feature(core)]\n#[macro_use] extern crate libeuler;\nextern crate num;\n\nuse num::traits::FromPrimitive;\nuse num::bigint::BigInt;\nuse num::pow;\n\nuse std::col...
rust
new_file
0
3
mit
2daef86649f516a55a2fe3770e21a6669e86cc4d
zmbush/euler,zmbush/euler
sol_0029/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Check that `chdir` fails for non-utf8 paths" }, { "role": "assistant", "content": "// compile-flags: -Zmiri-disable-isolation\n\nextern {\n pub fn chdir(dir: *const u8) -> i32;\n}\n\nfn main() {\n let path = vec![0xc3u8, 0x28...
rust
new_file
3
1
apache-2.0
145a5826d5cc02b15723bb9acb6739abdac28409
rust-lang/miri,rust-lang/miri,tsion/miri,rust-lang/miri,rust-lang/miri
tests/compile-fail/chdir_invalid_path.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add tests involving Rc, Arc, and Cell." }, { "role": "assistant", "content": "#![feature(custom_attribute, box_syntax)]\n#![allow(dead_code, unused_attributes)]\n\n#[miri_run]\nfn rc_cell() -> i32 {\n use std::rc::Rc;\n use s...
rust
new_file
0
1
apache-2.0
3cb200a2bacc1dc9cb83cf065235d28c2e2681a9
aidancully/rust,graydon/rust,GBGamer/rust,tsion/miri,GBGamer/rust,graydon/rust,rust-lang/miri,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,rust-lang/miri,rust-lang/miri,aidancully/rust,rust-lang/miri,aid...
test/std.rs
rejected_duplicate
Near-duplicate of sample 120343
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n/*\n A reduced test case for Issue #506, provided by Rob Arnold.\n*/\n\nuse std;\nimport task;\n\n#[abi = \"cdecl\"]\nextern mod rustrt {\n fn rust_task_allow_kill();\n}\n\nfn main() { task::spawn(rustrt::rust_task_allow_kill); }\n\n```\n...
rust
edit
null
null
apache-2.0
9b2d988df0ffefab9ade36763b7bf41b5862b105
kmcallister/rust,AerialX/rust,sarojaba/rust-doc-korean,mvdnes/rust,fabricedesre/rust,vhbit/rust,robertg/rust,kimroen/rust,quornian/rust,servo/rust,michaelballantyne/rust-gpu,KokaKiwi/rust,pythonesque/rust,avdi/rust,barosl/rust,krzysz00/rust,sarojaba/rust-doc-korean,nham/rust,l0kod/rust,krzysz00/rust,philyoon/rust,0x73/...
src/test/run-pass/issue-506.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Solve Salary with Bonus in rust" }, { "role": "assistant", "content": "use std::io;\n\nfn main() {\n let mut input_a = String::new();\n let mut input_b = String::new();\n let mut input_c = String::new();\n\n if let Err(...
rust
new_file
0
4
mit
aa015a6ff61afaf9c2e6f44c83b9a3cb39910735
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/1009/1009.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test extracted from rand, checking that StorageDead kills loans\n\nLike \"call-kills-loans\", Polonius didn't know about some `killed` facts." }, { "role": "assistant", "content": "// Whenever a `StorageDead` MIR statement dest...
rust
new_file
0
3
apache-2.0
9bd9b0d9bf616e8a8e7f6b4c3580041b007dd868
aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/ui/nll/polonius/storagedead-kills-loans.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for allergies case\n\nI don't know how to exchange enum type and u32 type" }, { "role": "assistant", "content": "#[derive(Debug, Clone, PartialEq)]\npub enum Allergen {\n Eggs = 0x0000_0001,\n Peanuts = 0x0000_0...
rust
new_file
0
9
bsd-2-clause
02faf932ceffc30f25e8a3de81379253413ddd38
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/allergies/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: test(Rust): Add test for sizeof structs and enums" }, { "role": "assistant", "content": "//! Print sizes of structs and enums\n//!\n//! Run with `cargo test sizes -- --nocapture`\n//! to get the printed output.\n\nuse stencila_sche...
rust
new_file
1
1
apache-2.0
f818fd3b1df557873f2f2aa8fa5660a84959036a
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
rust/tests/sizes.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add skeleton code for HashJoinExec." }, { "role": "assistant", "content": "use common::types::Ty;\nuse driver::DriverContext;\nuse super::{Executor, ExecutorFactory};\n\npub struct HashJoinExecFactory \n{\n\ttypes: Vec<Ty>\n}\n\nim...
rust
new_file
0
1
apache-2.0
f5d36e8e3d5b824b68a5635e8660e9af12e77ac9
hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak
exec/hash_join.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Introduce a testcase for conditional compilation via attributes\n\nIssue #489" }, { "role": "assistant", "content": "// xfail-stage0\n// xfail-stage1\n// xfail-stage2\n\n// Since the bogus configuration isn't defined main will just...
rust
new_file
0
1
apache-2.0
cbcc7bba30920489d4c772f174bfb9715842f163
philyoon/rust,reem/rust,dinfuehr/rust,P1start/rust,ruud-v-a/rust,sae-bom/rust,GBGamer/rust,pczarn/rust,nwin/rust,Ryman/rust,ebfull/rust,stepancheg/rust-ide-rust,barosl/rust,GBGamer/rust,miniupnp/rust,victorvde/rust,mihneadb/rust,graydon/rust,zaeleus/rust,GBGamer/rust,pshc/rust,pshc/rust,erickt/rust,SiegeLord/rust,saroj...
src/test/run-pass/conditional-compile.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Prepare code for a flat_map test" }, { "role": "assistant", "content": "#[macro_use]\nextern crate nom;\n\nuse nom::{IResult, Needed, alphanumeric, is_alphanumeric};\n\nnamed!(certain_length<&[u8], &[u8]>, take!(10));\n\nnamed!(val...
rust
new_file
0
1
mit
f29b98ae29437d96120916ade4c4e43e0563af89
fifth-postulate/fits-rs
tests/nom-flat_map-test.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add enum representing OSC types" }, { "role": "assistant", "content": "// see OSC Type Tag String: http://opensoundcontrol.org/spec-1_0\n// padding: zero bytes (n*4)\npub enum OscType {\n OscInt(i32),\n OscFloat(f32),\n Os...
rust
new_file
0
0
apache-2.0
b92068a0feff97849aa285ca51c84ea9928d3700
klingtnet/rosc
src/osc_types.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: rustdoc: Add test for tuple rendering" }, { "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/...
rust
new_file
0
1
apache-2.0
515fac178a486a6a0135b0d20b3f5b1edfb03482
GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust
src/test/rustdoc/tuples.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// -*- rust -*-\n// xfail-test\n// error-pattern:Unsatisfied precondition\n\ntag list { cons(int, @list); nil; }\n\ntype bubu = {x: int, y: int};\n\npure fn less_than(x: int, y: int) -> bool { ret x < y; }\n\ntype ordered_range = {low: int, h...
rust
edit
null
null
apache-2.0
c29f1af17e49ae01d865f443ea0ff2f92bf3a888
miniupnp/rust,michaelballantyne/rust-gpu,aturon/rust,ejjeong/rust,untitaker/rust,kimroen/rust,quornian/rust,ebfull/rust,zubron/rust,miniupnp/rust,0x73/rust,stepancheg/rust-ide-rust,stepancheg/rust-ide-rust,nham/rust,victorvde/rust,dwillmer/rust,XMPPwocky/rust,GBGamer/rust,pshc/rust,andars/rust,0x73/rust,mitsuhiko/rust,...
src/test/compile-fail/constrained-type-missing-check.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add test for new DOM for empty impls" }, { "role": "assistant", "content": "#![crate_name = \"foo\"]\n\n// @has foo/struct.Foo.html\n// @has - '//div[@id=\"synthetic-implementations-list\"]/h3[@id=\"impl-Send\"]' 'impl Send for Foo...
rust
new_file
0
2
apache-2.0
982ef39d47a1d43524071536745496f803b1addc
graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust
src/test/rustdoc/empty-impls.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Test nested `proc` can access outer owned data\n\nFixes #10682" }, { "role": "assistant", "content": "// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\...
rust
new_file
null
null
apache-2.0
7d94de2b043f728858c494d9e268ceadb11aab42
quornian/rust,defuz/rust,aidancully/rust,zubron/rust,vhbit/rust,kwantam/rust,cllns/rust,aneeshusa/rust,l0kod/rust,vhbit/rust,kwantam/rust,stepancheg/rust-ide-rust,aepsil0n/rust,richo/rust,miniupnp/rust,AerialX/rust-rt-minimal,GBGamer/rust,emk/rust,nwin/rust,jroesch/rust,jashank/rust,mihneadb/rust,nham/rust,aepsil0n/rus...
src/test/run-pass/issue-10682.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: chore(Kernels): Add a \"mini-CLI\" for development purposes" }, { "role": "assistant", "content": "//! Mini CLI for testing this crate at the command line without compiling the whole `stencila` binary.\n//! Run using `cargo run --a...
rust
new_file
0
1
apache-2.0
d384073ed7ed281b0e80dd3d412eea6d8a98ca37
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
rust/kernels/src/main.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a benchmark for the Negamax implementation." }, { "role": "assistant", "content": "#![feature(test)]\nextern crate minimax;\nextern crate test;\nuse test::Bencher;\nuse minimax::*;\n\n#[derive(Clone)]\npub struct Board;\n\n#[de...
rust
new_file
0
2
mit
0d886e0eddf78d760c062d81747ae8669c7e618d
kinghajj/minimax-rs
benches/negamax.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for rotational-cipher\n\nIt passed all testcases" }, { "role": "assistant", "content": "#![feature(ascii_ctype)]\nuse std::ascii::AsciiExt;\n\npub fn rotate(text: &str, key: usize) -> String {\n text.chars()\n ...
rust
new_file
2
3
bsd-2-clause
af3d883e4c096f752301e745c3adc76604b6b26e
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/rotational-cipher/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for trait toggle location" }, { "role": "assistant", "content": "#![crate_name = \"foo\"]\n\n// @has foo/trait.Foo.html\n// @has - '//details[@class=\"rustdoc-toggle\"]//code' 'bar'\npub trait Foo {\n fn bar() -> ();\n}...
rust
new_file
0
0
apache-2.0
6696a60f0f04e1b7e78927f5747c1080f5189370
aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/rustdoc/toggle-trait-fn.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a benchmark test for edit_distance function." }, { "role": "assistant", "content": "#![feature(test)]\n\nextern crate test;\nextern crate bloodhound;\n\nuse test::Bencher;\nuse std::path::PathBuf;\nuse bloodhound::matching::fin...
rust
new_file
0
2
mit
fcf6be3aa38995cf7974c284747fc375f5f95721
jmacdonald/bloodhound
benches/matching.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a very basic example" }, { "role": "assistant", "content": "extern crate ansi_term;\nuse ansi_term::Colour::*;\n\nfn main() {\n println!(\"{}\", Black.paint(\"Black\"));\n println!(\"{}\", Red.paint(\"Red\"));\n printl...
rust
new_file
0
1
mit
586244c7bd22b3a16858d9292e680f9c1895633d
ogham/rust-ansi-term
examples/colours.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add a test for std::any::type_name() as a const fn\n\nThis is a modified version of the test I added previously. The difference is this version implements a wrapper around std::any::type_name versus core::intrinsics::type_name, in order to sho...
rust
new_file
1
1
apache-2.0
873b3614808415f9269759a6903ac75ddcb7d7ff
aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust
src/test/ui/consts/const-fn-type-name-any.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add inline const macro test" }, { "role": "assistant", "content": "// run-pass\n\n#![allow(incomplete_features)]\n#![feature(inline_const)]\nmacro_rules! do_const_block{\n ($val:block) => { const $val }\n}\n\nfn main() {\n le...
rust
new_file
1
1
apache-2.0
dcd2d91a647c101c7226e594ecae23bc5fb3bb69
aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust
src/test/ui/inline-const/const-expr-macro.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add tests for `if let`" }, { "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/COPYRIGHT.\n//\...
rust
new_file
null
null
apache-2.0
1bc407fb8413b6e7f05a9d38b0d0a770e67dde5a
0x73/rust,pelmers/rust,graydon/rust,0x73/rust,AerialX/rust-rt-minimal,mdinger/rust,defuz/rust,XMPPwocky/rust,dinfuehr/rust,reem/rust,defuz/rust,bombless/rust,ebfull/rust,dwillmer/rust,untitaker/rust,XMPPwocky/rust,mdinger/rust,graydon/rust,emk/rust,zachwick/rust,jashank/rust,seanrivera/rust,rprichard/rust,aneeshusa/rus...
src/test/run-pass/if-let.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add a test for escaping LLVMisms in inline asm\n\nWe escape certain LLVM-specific features when passing the inline\nassembly string to the LLVM. Until now, however, there was no test\nmaking sure this behaviour stays intact. This commit adds s...
rust
new_file
2
1
apache-2.0
243755a13e78ebe7a3bb5ba797dd3e2fd04dd2dd
graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust
src/test/codegen/asm-sanitize-llvm.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add rust code for luhn-from case\n\nIt passed all testcases" }, { "role": "assistant", "content": "pub struct Luhn {\n result: Option<String>,\n}\n\nfn is_valid(id: &str) -> bool {\n if id.len() < 2 {\n return false;\n...
rust
new_file
0
8
bsd-2-clause
7a29ab7e26ac76373f333ec79e4faa4ab27c8b70
gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism
rust/luhn-from/src/lib.rs
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```rust\n// xfail-test\n// error-pattern:unresolved import: m::f\nuse x = m::f;\n\nmod m {\n #[legacy_exports];\n}\n\nfn main() {\n}\n\n```\n\nApply this change: Update error message and un-xfail test" }, { "role": "assistant", "content...
rust
edit
null
null
apache-2.0
cb355bf7ad63d087a558c0509dfe350016dd35ba
bluss/rand,l0kod/rust,zaeleus/rust,defuz/rust,0x73/rust,pczarn/rust,hauleth/rust,erickt/rust,P1start/rust,defuz/rust,zubron/rust,jashank/rust,jashank/rust,miniupnp/rust,quornian/rust,aidancully/rust,stepancheg/rust-ide-rust,rohitjoshi/rust,philyoon/rust,servo/rust,jashank/rust,dwillmer/rust,richo/rust,l0kod/rust,zaeleu...
src/test/compile-fail/issue-2123.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Check const-propagation of borrows of unsized places" }, { "role": "assistant", "content": "// run-pass (ensure that const-prop is run)\n\nstruct A<T: ?Sized>(T);\n\nfn main() {\n let _x = &(&A([2, 3]) as &A<[i32]>).0 as *const ...
rust
new_file
0
1
apache-2.0
7b0cc6a439d2cf7a9d6dab5b1df2772488cc80a8
graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust
src/test/ui/consts/const-prop-ice3.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test to prevent regression" }, { "role": "assistant", "content": "// check-pass\n//\n// Regression test for issue #86082\n//\n// Checks that option_env! does not panic on receiving an invalid\n// environment variable name.\n\nf...
rust
new_file
0
1
apache-2.0
d26e01e9df416304f7d0cc425bd0290560e12fae
graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust
src/test/ui/macros/issue-86082-option-env-invalid-char.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add test for braced-macro followed by `.` or `?`." }, { "role": "assistant", "content": "// check-pass\n\nuse std::io::Write;\n\nfn main() -> Result<(), std::io::Error> {\n vec! { 1, 2, 3 }.len();\n write! { vec![], \"\" }?;\...
rust
new_file
0
2
apache-2.0
ebf12529dfa62cf463de4fd5e1355e8ea4fe0559
graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust
src/test/ui/parser/macro-braces-dot-question.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
null
null
apache-2.0
9968ccfc303f6cc6fed614118400faabcb9a6760
stepancheg/rust-ide-rust,LeoTestard/rust,bluss/rand,ebfull/rust,kmcallister/rust,ruud-v-a/rust,aidancully/rust,mahkoh/rust,mdinger/rust,avdi/rust,victorvde/rust,robertg/rust,graydon/rust,vhbit/rust,ejjeong/rust,mitsuhiko/rust,andars/rust,sarojaba/rust-doc-korean,zubron/rust,pshc/rust,andars/rust,jroesch/rust,j16r/rust,...
src/test/run-pass/clone-with-exterior.rs
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write rust code for the following: Add an inlining debuginfo test" }, { "role": "assistant", "content": "#![crate_type=\"rlib\"]\n// compile-flags: -Copt-level=3 -g\n\n#[no_mangle]\n#[inline(always)]\npub extern \"C\" fn callee(x: u32) -> u32 {\n x + 4\n}\n\n// C...
rust
new_file
2
1
apache-2.0
7ae8bc3957fa78dbe99ec70ddbdc27a9be42e52d
aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust
src/test/codegen/inline-debuginfo.rs
accepted
null
true
[ { "role": "user", "content": "Write rust code for the following: Add an XFAILed test for if expressions resulting in boxes" }, { "role": "assistant", "content": "// xfail-boot\n// xfail-stage0\n// -*- rust -*-\n\n// Tests for if as expressions returning boxed types\n\nfn test_box() {\n auto res...
rust
new_file
null
null
apache-2.0
38d54535840603b131cfac0aafc4133e62a7fb56
bhickey/rand,jbclements/rust,0x73/rust,jbclements/rust,krzysz00/rust,stepancheg/rust-ide-rust,ebfull/rust,nwin/rust,victorvde/rust,l0kod/rust,ejjeong/rust,pythonesque/rust,graydon/rust,KokaKiwi/rust,jroesch/rust,servo/rust,aneeshusa/rust,aepsil0n/rust,pelmers/rust,P1start/rust,servo/rust,vhbit/rust,mdinger/rust,0x73/ru...
src/test/run-pass/expr-if-box.rs
rejected_syntax
Syntax error detected by tree-sitter
false