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 that object bounds are preferred over global where clause bounds"
},
{
"role": "assistant",
"content": "// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution ... | rust | new_file | null | null | apache-2.0 | 0476a875d19bd79a4755d0e086cb5b62492aa66a | GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust | src/test/ui/trivial-bounds-object.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add benchmarks for zeros / default"
},
{
"role": "assistant",
"content": "#![feature(test)]\n\nextern crate test;\nuse test::Bencher;\n\n#[macro_use(s)]\nextern crate ndarray;\nuse ndarray::prelude::*;\n\n#[bench]\nfn default_f64(b... | rust | new_file | 0 | 2 | apache-2.0 | 4ce12858bac853ba528db4a4259923fe1de5c0d1 | Pireax/rust-ndarray,Pireax/rust-ndarray,SuperFluffy/rust-ndarray,SuperFluffy/rust-ndarray | benches/construct.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test for cross-crate const in match pattern."
},
{
"role": "assistant",
"content": "// Copyright 2013 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-la... | rust | new_file | null | null | apache-2.0 | 3f2d576a38854c1f6ffd21016e4c8a2822d64fee | vhbit/rust,XMPPwocky/rust,miniupnp/rust,Ryman/rust,stepancheg/rust-ide-rust,kmcallister/rust,hauleth/rust,untitaker/rust,richo/rust,rohitjoshi/rust,mitsuhiko/rust,P1start/rust,kmcallister/rust,emk/rust,XMPPwocky/rust,mvdnes/rust,vhbit/rust,servo/rust,defuz/rust,zachwick/rust,aturon/rust,andars/rust,pshc/rust,jashank/ru... | src/test/run-pass/cross-crate-const-pat.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add example to load and print bundle\n\nAlso allows quick testing if local kbdgen bundles can be parsed, e.g.\nlike this:\n\n fd -0 .kbdgen ../giellalt/ | xargs -0 -I % cargo r --example load_bundle -- %"
},
{
"role": "assistant",
... | rust | new_file | 0 | 3 | apache-2.0 | 06516ca3a41d76f4807d92a8f29e10fe7d2814c5 | bbqsrc/kbdgen | examples/load_bundle.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add simple assembler parsing example\n\nHas proven useful for finding assembler statements that the parser fail\nto understand, by loading larger examples found online."
},
{
"role": "assistant",
"content": "extern crate r68k_tools... | rust | new_file | 0 | 6 | mit | 5b19876acb82c259693c95fc3f6fa433b99ad297 | marhel/r68k,marhel/r68k | tools/examples/parse.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for silenced unused params in derive"
},
{
"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-l... | rust | new_file | 0 | 1 | apache-2.0 | 52e064c39d1c20bb84aad72178a76c79c0c9b4c8 | GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust | src/test/run-pass/issue-32292.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add initial Firefix tab opener rust program (0.9)"
},
{
"role": "assistant",
"content": "extern mod extra;\n\nuse std::from_str::from_str;\nuse std::io::net::ip::SocketAddr;\nuse std::io::net::tcp::TcpListener;\nuse std::io::{Accep... | rust | new_file | null | null | mit | ab604a9993726c0883dda1c50cb209ca3ab083c2 | Siosm/ffto | ffto.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for closure drop."
},
{
"role": "assistant",
"content": "struct Foo<'a>(&'a mut bool);\n\nimpl<'a> Drop for Foo<'a> {\n fn drop(&mut self) {\n *self.0 = true;\n }\n}\n\nfn f<T: FnOnce()>(t: T) {\n t()\n}\n\... | rust | new_file | 0 | 2 | apache-2.0 | d8e5500c6dedfa9a754b1e8831c5ae37c368756e | rust-lang/miri,GBGamer/rust,GBGamer/rust,GBGamer/rust,rust-lang/miri,graydon/rust,rust-lang/miri,tsion/miri,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,rust-lang/miri,... | tests/run-pass/closure-drop.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add solution to problem 48"
},
{
"role": "assistant",
"content": "#[macro_use] extern crate libeuler;\nextern crate num;\n\nuse num::bigint::{BigInt, ToBigInt};\nuse num::traits::{Zero, One, ToPrimitive, PrimInt};\n\n/// The series... | rust | new_file | 0 | 6 | mit | c1b54846b892778fd8f6a2307845ce4933490822 | zmbush/euler,zmbush/euler | sol_0048/main.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Check if enum_map! can be used on variantless enum"
},
{
"role": "assistant",
"content": "#![no_std]\n\n#[macro_use]\nextern crate enum_map;\n\nuse enum_map::EnumMap;\n\n#[derive(EnumMap)]\nenum Void {}\n\n#[test]\nfn empty_map() {... | rust | new_file | 0 | 1 | apache-2.0 | cfb36df1e80177a02dfce52b15022268087cf467 | xfix/enum-map | enum-map/tests/macro.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add equivalent test in src/test/rustdoc"
},
{
"role": "assistant",
"content": "// edition:2018\n\n#![no_core]\n#![feature(no_core)]\n\n// @count issue_89852/index.html '//*[@class=\"macro\"]' 2\n// @has - '//*[@class=\"macro\"]/@hr... | rust | new_file | 0 | 0 | apache-2.0 | e259cc46a643101775709ae6b9bbd5abb834906d | graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust | src/test/rustdoc/issue-89852.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test case for labeled break in const assignment\n\nSee https://github.com/rust-lang/rust/issues/51350 for more information."
},
{
"role": "assistant",
"content": "// Using labeled break in a while loop has caused an illegal ins... | rust | new_file | null | null | apache-2.0 | 7cafacdd82226e57971fe629311a41b26d68838c | graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust | src/test/run-pass/consts/const-labeled-break.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 | 2 | 2 | apache-2.0 | 9b91ccffb0f72d78b208a495d8d0ffdcb630dff8 | rohitjoshi/rust,andars/rust,dwillmer/rust,mdinger/rust,jroesch/rust,graydon/rust,jroesch/rust,pshc/rust,robertg/rust,l0kod/rust,pelmers/rust,jroesch/rust,l0kod/rust,dwillmer/rust,rohitjoshi/rust,cllns/rust,kwantam/rust,sae-bom/rust,mdinger/rust,l0kod/rust,seanrivera/rust,kwantam/rust,victorvde/rust,mvdnes/rust,jashank/... | src/test/run-fail/task-spawn-barefn.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add Depth-First Search using The Rust Programming Language"
},
{
"role": "assistant",
"content": "use std::io::stdin;\n\n// DFS receives a graph and the start point\nfn dfs(graph: &mut Vec<Vec<usize>>, start: usize) {\n let mut ... | rust | new_file | 9 | 3 | cc0-1.0 | 582179e7791597f890c1b644bbbb29d86fe55cdc | 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/DFS.rs | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for concurrently using an FFT object"
},
{
"role": "assistant",
"content": "//! Test that we can use an `FFT` object from multiple threads\n\nextern crate rustfft;\n\nuse std::thread;\n\nuse rustfft::FFTplanner;\nuse rustf... | rust | new_file | 0 | 3 | apache-2.0 | 3a76b16e293f244a6254751a195c0d57151b3891 | ejmahler/RustFFT,ejmahler/RustFFT | tests/concurrency.rs | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\n// 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/COPYRIGHT.\n//\n// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or\n//... | rust | edit | 1 | 1 | apache-2.0 | f88f660af4706e11b2c9753334b783ca501a3b86 | graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust | src/test/run-pass/issue-38987.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: test: Add a test case for self regions and typeclass implementations"
},
{
"role": "assistant",
"content": "type clam = { chowder: &int };\n\nimpl clam for clam {\n fn get_chowder() -> &self.int { ret self.chowder; }\n}\n\nfn ma... | rust | new_file | null | null | apache-2.0 | 0972571cddcbbaa5fbf9e17dcc2732e820e5cb46 | XMPPwocky/rust,nwin/rust,ktossell/rust,victorvde/rust,dinfuehr/rust,nwin/rust,GrahamDennis/rand,michaelballantyne/rust-gpu,mihneadb/rust,michaelballantyne/rust-gpu,avdi/rust,servo/rust,michaelballantyne/rust-gpu,KokaKiwi/rust,philyoon/rust,achanda/rand,andars/rust,aepsil0n/rust,hauleth/rust,quornian/rust,vhbit/rust,0x7... | src/test/run-pass/regions-self-impls.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test that unique boxes in vectors are copied when the vector is\n\nIssue #409"
},
{
"role": "assistant",
"content": "fn main() {\n let a = [~mutable 10];\n let b = a;\n\n assert *a[0] == 10;\n assert *b[0] == 10;\... | rust | new_file | null | null | apache-2.0 | 2d5e085eb9fb22f8aa22bb7a19313e97be87a286 | huonw/rand,aepsil0n/rust,defuz/rust,zubron/rust,aturon/rust,erickt/rust,defuz/rust,ktossell/rust,zubron/rust,mitsuhiko/rust,ruud-v-a/rust,dinfuehr/rust,cllns/rust,kwantam/rust,vhbit/rust,zubron/rust,ruud-v-a/rust,michaelballantyne/rust-gpu,ebfull/rust,P1start/rust,sarojaba/rust-doc-korean,vhbit/rust,hauleth/rust,shepma... | src/test/run-pass/unique-in-vec-copy.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add example for multiple simultaneous examples"
},
{
"role": "assistant",
"content": "extern crate init = \"gl-init-rs\";\nextern crate libc;\nextern crate gl;\n\nfn main() {\n let window1 = init::Window::new().unwrap();\n le... | rust | new_file | null | null | apache-2.0 | c0912c9ec4b3080fbff6dc1debd216dbe9fe93e8 | vvuk/glutin,vberger/glutin,kornholi/glutin,larsbergstrom/glutin,glennw/glutin,TimNN/glutin,Jayflux/glutin,tomaka/glutin,christopheraugustus/glutin,akiss77/glutin,aepsil0n/glutin,fkaa/glutin,frewsxcv/glutin,tomaka/winit,ozkriff/glutin,retep998/glutin,mbrubeck/glutin,tempbottle/glutin,paulrouget/glutin,Ms2ger/glutin,robe... | examples/multiwindow.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\npub fn editor(source: &str) -> String {\n format!(\"<div id=\\\"active-code\\\">\n<button class=\\\"btn btn-primary\\\" type=\\\"button\\\" id=\\\"run-code\\\">Run</button>\n<button class=\\\"btn btn-primary\\\" type=\\\"button\\\" id=\\\"... | rust | edit | 0 | 3 | apache-2.0 | e9a991e866b5882b01f173792bd9812b2959323a | kteza1/rust-by-example,beni55/rust-by-example,rwaldron/rust-by-example,mdinger/rust-by-example,MatejLach/rust-by-example,chriskrycho/rust-by-example,aakloxu/rust-by-example-cn,realcr/rust-by-example,nodakai/rust-by-example,jinyuanxie/rust-by-example-cn,aakloxu/rust-by-example-cn,DenisKolodin/rust-by-example,youprofit/r... | src/playpen.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add an unwind test for failure during unique box construction"
},
{
"role": "assistant",
"content": "// error-pattern:fail\n\nfn f() -> [int] { fail; }\n\n// Voodoo. In unwind-alt we had to do this to trigger the bug. Might\n// hav... | rust | new_file | null | null | apache-2.0 | 92af552956fd81693d335cfcab28526607ba286c | barosl/rust,ktossell/rust,bhickey/rand,defuz/rust,seanrivera/rust,jashank/rust,robertg/rust,jroesch/rust,AerialX/rust-rt-minimal,vhbit/rust,seanrivera/rust,pythonesque/rust,philyoon/rust,carols10cents/rust,aidancully/rust,AerialX/rust-rt-minimal,untitaker/rust,stepancheg/rust-ide-rust,LeoTestard/rust,richo/rust,aepsil0... | src/test/run-fail/unwind-partial-unique.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add run-pass test for paths containing the NUL character"
},
{
"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// ht... | rust | new_file | 3 | 2 | apache-2.0 | 06fab0ea7002bde57beaee6db7976ae0cb080c38 | graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust | src/test/run-pass/paths-containing-nul.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 | 25a4adc62f4a743b6696a248ef365aaaaee06362 | aidancully/rust,dinfuehr/rust,zubron/rust,rohitjoshi/rust,jroesch/rust,robertg/rust,mahkoh/rust,defuz/rust,sae-bom/rust,robertg/rust,omasanori/rust,ejjeong/rust,seanrivera/rust,sae-bom/rust,zubron/rust,dinfuehr/rust,nwin/rust,andars/rust,jashank/rust,richo/rust,ejjeong/rust,graydon/rust,defuz/rust,mdinger/rust,GBGamer/... | src/test/run-pass/init-large-type.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add regression test for const prop"
},
{
"role": "assistant",
"content": "// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COP... | rust | new_file | 0 | 2 | apache-2.0 | a678044c77e8b341daae3fc7b2f7c74e45cf2c01 | graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust | src/test/ui/const-eval/no_lint_for_statically_known_error.rs | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\nextern crate futures;\n\nuse std::thread;\nuse futures::sync::oneshot;\nuse futures::Future;\nuse futures::future::IntoShared;\n\n\nfn send_shared_oneshot_and_wait_on_multiple_threads(threads_number: u32) {\n let (tx, rx) = oneshot::channe... | rust | edit | 0 | 4 | apache-2.0 | 1129f479ffb9adafdcee3144c62fd7be00e966c6 | Idolf/futures-rs,alexcrichton/futures-rs | tests/shared.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add the example as an example test program.\n\nPutting it in the examples directory makes it be automatically built as\npart of `cargo test`."
},
{
"role": "assistant",
"content": "extern crate wasmparser;\n\nuse std::io;\nuse std:... | rust | new_file | 0 | 3 | apache-2.0 | f7b8dd19f0c62b3e11036c23a25e857dc1b99537 | yurydelendik/wasmparser.rs,yurydelendik/wasmparser.rs | examples/simple.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for drop for newtype structs."
},
{
"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... | rust | new_file | null | null | apache-2.0 | cce97ab8cb225c9ae5b9e8dca4f96bd750eebdb7 | sarojaba/rust-doc-korean,omasanori/rust,carols10cents/rust,hauleth/rust,nwin/rust,mahkoh/rust,P1start/rust,kwantam/rust,sarojaba/rust-doc-korean,mdinger/rust,KokaKiwi/rust,emk/rust,0x73/rust,mdinger/rust,P1start/rust,mdinger/rust,pshc/rust,krzysz00/rust,gifnksm/rust,GBGamer/rust,avdi/rust,krzysz00/rust,j16r/rust,zubron... | src/test/run-pass/newtype-struct-drop-run.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for memory layout information"
},
{
"role": "assistant",
"content": "// @has type_layout/struct.Foo.html 'Size: '\n// @has - ' bytes'\npub struct Foo {\n pub a: usize,\n b: Vec<String>,\n}\n\n// @has type_layout/enum... | rust | new_file | 0 | 0 | apache-2.0 | 9859e2b01d2498ea0465a36bf4055d45e1f96f5b | aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust | src/test/rustdoc/type-layout.rs | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\nuse std::io::{Result, SeekFrom};\nuse std::syscall::*;\nuse std::Url;\n\npub struct Resource;\n\nimpl Resource {\n pub fn dup(&self) -> Result<Box<Resource>> {\n Ok(box Resource)\n }\n\n pub fn path(&self) -> Result<String> {\... | rust | edit | null | null | mit | da37f3e2a6d0bfa6a293b77f6a69b9f3064bc7ec | Lacaranian/redox,rexlunae/redox,Lacaranian/redox,Lacaranian/redox,Lacaranian/redox,rexlunae/redox,rexlunae/redox,Lacaranian/redox | filesystem/schemes/pty/main.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add address stability test for matches"
},
{
"role": "assistant",
"content": "// Check that `ref mut` variables don't change address between the match guard\n// and the arm expression.\n\n// run-pass\n\n#![feature(nll, bind_by_move... | rust | new_file | 2 | 3 | apache-2.0 | bf446c80c2792c7ec234ecf4107d75c80826a5f5 | graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust | src/test/ui/match/match-ref-mut-stability.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add linked_list implementation in Rust"
},
{
"role": "assistant",
"content": "use List::{Item, Nil};\n\n// linked list implementation in rust\n\nfn main() {\n let mut list = List::new();\n list = list.prepend(1);\n list = ... | rust | new_file | 2 | 2 | cc0-1.0 | fc6ae84f363dbdf74880b98850535341a0118ffe | 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... | data_structures/linked_list/rust/Linked_List.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for rustdoc ignore test\n\nThis will check for regression on issue #32556"
},
{
"role": "assistant",
"content": "// Copyright 2016 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this ... | rust | new_file | 0 | 1 | apache-2.0 | fa1d125ae6b8dd4a472510ef3478daaff831ae2c | GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust | src/test/rustdoc/issue-32556.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add failing test for globals to subcommands\n\nIssue 978 mentions that subcommands cannot see the value\nof globals that get passed, even if ArgSettings::PropagateGlobalsDown\nis true.\n\nThis change commits a failing test that reproduces this... | rust | new_file | 0 | 1 | apache-2.0 | 6f3b45457323430fb9f59121909cafe0df42b289 | clap-rs/clap,kbknapp/clap-rs,clap-rs/clap,kbknapp/clap-rs,clap-rs/clap | tests/propagate_globals_down.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a compile-fail test for qualification lint"
},
{
"role": "assistant",
"content": "// Copyright 2013 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-... | rust | new_file | 0 | 1 | apache-2.0 | f20c78c984d0e93d94420c9bddf17c06303de6e7 | jashank/rust,fabricedesre/rust,cllns/rust,avdi/rust,philyoon/rust,zubron/rust,KokaKiwi/rust,seanrivera/rust,zaeleus/rust,kmcallister/rust,pczarn/rust,ktossell/rust,zubron/rust,AerialX/rust-rt-minimal,TheNeikos/rust,avdi/rust,aturon/rust,philyoon/rust,SiegeLord/rust,bhickey/rand,pelmers/rust,AerialX/rust,jbclements/rust... | src/test/compile-fail/lint-qualification.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for a mixture of arguments"
},
{
"role": "assistant",
"content": "extern crate clap;\n\nuse clap::{App, Arg};\n\n#[test]\nfn mixed_positional_and_options() {\n App::new(\"mixed_positional_and_options\")\n .arg(Ar... | rust | new_file | 0 | 1 | mit | c4651265bebde0f4149a23a8818291aa35198628 | wezm/clap-rs,wezm/clap-rs,wezm/clap-rs | tests/app_mixed_args.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add basic program for benchmarking decode speed"
},
{
"role": "assistant",
"content": "// Claxon -- A FLAC decoding library in Rust\n// Copyright 2016 Ruud van Asseldonk\n//\n// Licensed under the Apache License, Version 2.0 (the \... | rust | new_file | 0 | 3 | apache-2.0 | c4ea0bc0c9eec7d46d0028d0a03b6f250afe3843 | ruuda/claxon,ruuda/claxon,ruuda/claxon | examples/bench_decode.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add ignored test for associated types in const impl"
},
{
"role": "assistant",
"content": "// ignore-test\n\n// FIXME: This test should fail since, within a const impl of `Foo`, the bound on `Foo::Bar` should\n// require a const im... | rust | new_file | null | null | apache-2.0 | c8f0abb51c59ee4c704eda1bb2a7e9e70173b074 | aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust | src/test/ui/rfc-2632-const-trait-impl/assoc-type.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add test of serialize_trait_object involving generics"
},
{
"role": "assistant",
"content": "use erased_serde::serialize_trait_object;\n\npub trait MyTrait: erased_serde::Serialize {}\n\nserialize_trait_object!(MyTrait);\n\npub tra... | rust | new_file | 0 | 0 | apache-2.0 | 6b6bde1eedd5cde74ed635804107bcb88fdf9948 | dtolnay/erased-serde | tests/traitobject.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Fix kindck to consider inherited bounds"
},
{
"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 | null | null | apache-2.0 | ae314512e381f5a7ae5a798fd613125720214829 | ejjeong/rust,graydon/rust,emk/rust,GBGamer/rust,mdinger/rust,reem/rust,ebfull/rust,emk/rust,nwin/rust,barosl/rust,mahkoh/rust,ebfull/rust,andars/rust,jroesch/rust,P1start/rust,pelmers/rust,aidancully/rust,krzysz00/rust,jashank/rust,avdi/rust,aidancully/rust,barosl/rust,0x73/rust,nham/rust,zubron/rust,dwillmer/rust,mvdn... | src/test/compile-fail/kindck-inherited-copy-bound.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add regression test for lint deprecation"
},
{
"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.o... | rust | new_file | 3 | 1 | apache-2.0 | d9eb13b2c8397f6eccea0c37967c4010d9aedb0d | jroesch/rust,GBGamer/rust,AerialX/rust,jashank/rust,mdinger/rust,defuz/rust,hauleth/rust,GBGamer/rust,XMPPwocky/rust,quornian/rust,omasanori/rust,nwin/rust,andars/rust,krzysz00/rust,reem/rust,aneeshusa/rust,ktossell/rust,kwantam/rust,0x73/rust,kwantam/rust,barosl/rust,AerialX/rust,carols10cents/rust,krzysz00/rust,rober... | src/test/compile-fail/lint-renaming.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: needless_continue: Add tests for helper functions to the needless_continue lint.\n\nCreating a test file per function sounds a bit excessive, so just\nclubbing all needless_continue specific function tests into this module."
},
{
"role... | rust | new_file | 5 | 1 | apache-2.0 | 69928906f490e52aed6497f9b8f8e5a3ad924477 | graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust | tests/needless_continue_helpers.rs | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for reading truncated files\n\nTests loading every image for every truncation length up to 1000\nbytes. Expensive, so ignored by default."
},
{
"role": "assistant",
"content": "//! Ensure truncated images are read without ... | rust | new_file | 0 | 5 | mit | 16b98ec4d5bad3c79730569f700de53168331827 | PistonDevelopers/image,mbrubeck/image,PistonDevelopers/image,nwin/rust-image | tests/truncate_images.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add example of color effects"
},
{
"role": "assistant",
"content": "//! Demonstrates adding a color tint and applying a color gradient to a grayscale image.\n\nextern crate image;\nextern crate imageproc;\n\nuse std::env;\nuse std:... | rust | new_file | 0 | 2 | mit | 16675470b28c504579b2871d8def91ee4079f197 | theotherphil/imageproc,PistonDevelopers/imageproc | examples/color_effects.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for BTreeMap lifetime bound to see if it compiles"
},
{
"role": "assistant",
"content": "// check-pass\n\nuse std::collections::{BTreeMap, HashMap};\n\ntrait Map\nwhere\n for<'a> &'a Self: IntoIterator<Item = (&'a Sel... | rust | new_file | 2 | 1 | apache-2.0 | cedf96c834372074b1c56869155744a3bfef6fe4 | graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust | src/test/ui/btreemap/btreemap_into_iterator_lifetime.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for wrong code generation for HashSet creation on arm cpu\n\nThis is test for #42918.\nTo reproduce bug you need machine with arm cpu and compile with optimization.\nI tried with rustc 1.19.0-nightly (3d5b8c626 2017-06-09),\nif compil... | rust | new_file | 2 | 1 | apache-2.0 | 911a15d5a82cd3a48d7bc6ca3eb906d46e45eb35 | aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust | src/test/run-pass/wrong-hashset-issue-42918.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test to ensure const-prop fails gracefully"
},
{
"role": "assistant",
"content": "#[inline(never)]\nfn read(_: usize) { }\n\nfn main() {\n const FOO: &i32 = &1;\n let x = FOO as *const i32 as usize;\n read(x);\n}\n\n//... | rust | new_file | 0 | 1 | apache-2.0 | b17066dd5eaf3dabd403bd4caccfca193c7184db | graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust | src/test/mir-opt/const_prop/const_prop_fails_gracefully.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test that column information is not emitted for MSVC targets"
},
{
"role": "assistant",
"content": "// Verify that no column information is emitted for MSVC targets\n//\n// only-msvc\n// compile-flags: -C debuginfo=2\n\n// CHECK-NO... | rust | new_file | 0 | 1 | apache-2.0 | 8e93a01824a2239f1c588c7c0b884c8a2662e929 | graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust | src/test/codegen/debug-column-msvc.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test for (previously uncaught) infinite loop identified by matthewjasper."
},
{
"role": "assistant",
"content": "// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribut... | rust | new_file | 0 | 1 | apache-2.0 | 469d6a819d3d7348fdd54d8c7ec1e694f2f43051 | graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust | src/test/ui/issue-45696-no-variant-box-recur.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test that `!` cannot be indexed"
},
{
"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/CO... | rust | new_file | null | null | apache-2.0 | 6035222d21480c30614048538556d6a615810304 | aneeshusa/rust,ruud-v-a/rust,philyoon/rust,nwin/rust,bombless/rust,dwillmer/rust,pelmers/rust,reem/rust,zubron/rust,reem/rust,bombless/rust-docs-chinese,untitaker/rust,zubron/rust,zachwick/rust,zubron/rust,XMPPwocky/rust,dwillmer/rust,zachwick/rust,aneeshusa/rust,jashank/rust,victorvde/rust,l0kod/rust,0x73/rust,jroesch... | src/test/compile-fail/index-bot.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add codegen test checking binary_search allows eliding bound checks"
},
{
"role": "assistant",
"content": "// min-llvm-version: 11.0.0\n// compile-flags: -O\n// ignore-debug: the debug assertions get in the way\n#![crate_type = \"l... | rust | new_file | 0 | 2 | apache-2.0 | c9d04c2b238dc5ab51bd8a92c41ba17bb5b00ed7 | graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust | src/test/codegen/binary-search-index-no-bound-check.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add codegen test for integers compare"
},
{
"role": "assistant",
"content": "// This is test for more optimal Ord implementation for integers.\n// See <https://github.com/rust-lang/rust/issues/63758> for more info.\n\n// compile-fl... | rust | new_file | 0 | 1 | apache-2.0 | f5b16f6212d2d72d505d4d6b1dedc2c9c61dd014 | aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust | src/test/codegen/integer-cmp.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for untagged unions"
},
{
"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/COPYRIG... | rust | new_file | 0 | 1 | apache-2.0 | f8c61da0704f86726139197b3d34381ac3e1334f | GBGamer/rust,rust-lang/miri,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,tsion/miri,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,rust-lang/miri,GBGamer/rust,rust-lang/miri,GBGamer/rust,aidancully/rust,rust-lang/miri,... | tests/run-pass-fullmir/unsized-tuple-impls.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add regression test for MIR drop generation in async loops\n\nFixes #61986."
},
{
"role": "assistant",
"content": "// compile-pass\n// edition:2018\n//\n// Tests that we properly handle StorageDead/StorageLives for temporaries\n// ... | rust | new_file | 1 | 2 | apache-2.0 | 72ca844ca7d9debbb849eb3aa16c5c4df14d1293 | graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust | src/test/ui/async-await/issues/issue-61986.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add solution to problem 72"
},
{
"role": "assistant",
"content": "#![feature(core, step_by)]\n#[macro_use] extern crate libeuler;\n\nuse std::collections::{HashSet, HashMap};\n\nuse libeuler::prime::SieveOfAtkin;\n/// Consider the ... | rust | new_file | 0 | 5 | mit | 7deb9c792d553726d3f0776c557bb98118f4031c | zmbush/euler,zmbush/euler | sol_0072/main.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test that lambdas can't deinitialize upvars"
},
{
"role": "assistant",
"content": "// error-pattern:assigning to upvar\nfn force(f: &block() -> int) -> int { ret f(); }\nfn main() {\n let x = 5;\n let f = lambda () -> i... | rust | new_file | null | null | apache-2.0 | ec763bba9caba2ee5be0ee92736949ca8a65a566 | SiegeLord/rust,dwillmer/rust,0x73/rust,mitsuhiko/rust,pczarn/rust,l0kod/rust,emk/rust,nham/rust,carols10cents/rust,jroesch/rust,KokaKiwi/rust,nwin/rust,pythonesque/rust,TheNeikos/rust,erickt/rust,fabricedesre/rust,bhickey/rand,servo/rust,SiegeLord/rust,ktossell/rust,LeoTestard/rust,untitaker/rust,bombless/rust,reem/rus... | src/test/compile-fail/block-deinitializes-upvar.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add rather involved run-pass test case."
},
{
"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 | 3 | 1 | apache-2.0 | 55c6a68f1184eefb9e475b5f58272931688d2bc9 | zubron/rust,reem/rust,seanrivera/rust,l0kod/rust,mahkoh/rust,miniupnp/rust,mvdnes/rust,nwin/rust,XMPPwocky/rust,aidancully/rust,defuz/rust,AerialX/rust-rt-minimal,aepsil0n/rust,robertg/rust,seanrivera/rust,gifnksm/rust,krzysz00/rust,ebfull/rust,zaeleus/rust,aepsil0n/rust,zaeleus/rust,aidancully/rust,rprichard/rust,avdi... | src/test/run-pass/associated-types-ref-from-struct.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add simple UtpStream test using only the public API."
},
{
"role": "assistant",
"content": "#![feature(macro_rules)]\n\nextern crate utp;\n\nuse std::io::test::next_test_ip4;\nuse utp::UtpStream;\n\nmacro_rules! iotry(\n ($e:exp... | rust | new_file | null | null | apache-2.0 | 5ea7126501e0437837c382704cc68c0f44d1a79b | benjaminbollen/rust-utp,dirvine/rust-utp | tests/stream.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add regression test for Clone for [[T; 256]; 4] where T: Copy and not Clone"
},
{
"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 | 2 | 1 | apache-2.0 | 0ca2a9e71a9d907b79c3ca296163d313dc3234eb | GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust | src/test/run-pass/deriving-clone-array.rs | rejected_duplicate | Near-duplicate of sample 120289 | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for module ambiguity"
},
{
"role": "assistant",
"content": "// ignore-tidy-linelength\n\n#![deny(intra_doc_link_resolution_failure)]\n\n\npub fn foo() {\n\n}\n\npub mod foo {}\n// @has intra_doc_link_mod_ambiguity/struct.A... | rust | new_file | 1 | 1 | apache-2.0 | 69dab507620aada3085b45ccd0189de3bf8c8734 | graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust | src/test/rustdoc/intra-doc-link-mod-ambiguity.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Use of impl trait in an impl as the valoe for an associated type in a dyn"
},
{
"role": "assistant",
"content": "// check-pass\n\n#![feature(type_alias_impl_trait)]\n#![allow(dead_code)]\n\ntype Foo = Box<dyn Iterator<Item = impl S... | rust | new_file | 0 | 1 | apache-2.0 | eb16ae723dd3849e23192792889144488c70b584 | graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust | src/test/ui/type-alias-impl-trait/type-alias-impl-trait-assoc-dyn.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test Hello World Iron server"
},
{
"role": "assistant",
"content": "use iron::prelude::*;\nuse iron::status;\n\n/// Test hello world server\npub fn hello_world(_: &mut Request) -> IronResult<Response> {\n Ok(Response::... | rust | new_file | 0 | 1 | mit | 39b576c6ed917dff7106559d47fc6ba7a5906e05 | hawkw/grist | src/servers.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test that bounds checks are elided when slice len is checked up-front"
},
{
"role": "assistant",
"content": "// no-system-llvm\n// compile-flags: -O\n#![crate_type = \"lib\"]\n\n// CHECK-LABEL: @already_sliced_no_bounds_check\n#[no... | rust | new_file | 0 | 2 | apache-2.0 | 0906066ae7d8a5e217e8cbf7f17de78a00d4ed83 | aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust | src/test/codegen/issue-69101-bounds-check.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add rust code for tournament project\n\nIt passed all testcases"
},
{
"role": "assistant",
"content": "use std::collections::HashMap;\nuse std::cmp::Ordering;\n\n\n#[derive(Debug)]\nstruct Record {\n win: u32,\n draw: u32,\n ... | rust | new_file | 3 | 5 | bsd-2-clause | a7318374656d4a3c14c7c87a177a348a8230bcbf | gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism | rust/tournament/src/lib.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test for struct-like variants in consts"
},
{
"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.or... | rust | new_file | null | null | apache-2.0 | f0c6a8ebe9091bcc03807060ea7c7394c67a734c | KokaKiwi/rust,dwillmer/rust,gifnksm/rust,dinfuehr/rust,robertg/rust,gifnksm/rust,TheNeikos/rust,robertg/rust,P1start/rust,sae-bom/rust,miniupnp/rust,nwin/rust,ruud-v-a/rust,nham/rust,pczarn/rust,omasanori/rust,hauleth/rust,0x73/rust,bombless/rust,aidancully/rust,l0kod/rust,nwin/rust,mdinger/rust,aturon/rust,miniupnp/ru... | src/test/run-pass/const-enum-structlike.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add test to check for debug logging disabled at compile time"
},
{
"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 | 0 | 2 | apache-2.0 | a68917190b9c2d52a25a6f1452fa9d2129e7e721 | miniupnp/rust,dinfuehr/rust,ejjeong/rust,zaeleus/rust,XMPPwocky/rust,stepancheg/rust-ide-rust,victorvde/rust,defuz/rust,0x73/rust,miniupnp/rust,fabricedesre/rust,pczarn/rust,l0kod/rust,philyoon/rust,mihneadb/rust,krzysz00/rust,seanrivera/rust,mitsuhiko/rust,pshc/rust,miniupnp/rust,carols10cents/rust,omasanori/rust,nham... | src/test/run-pass/logging-enabled-debug.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for `Ipv4Addr` methods in a const context"
},
{
"role": "assistant",
"content": "// run-pass\n\n#![feature(ip)]\n#![feature(const_ipv4)]\n\nuse std::net::Ipv4Addr;\n\nfn main() {\n const IP_ADDRESS: Ipv4Addr = Ipv4Addr:... | rust | new_file | 0 | 1 | apache-2.0 | fb64e6dcf0a7ea0518c8f2d499327a2b6974f859 | aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust | src/test/ui/consts/std/net/ipv4.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for the returned balances from Kraken"
},
{
"role": "assistant",
"content": "#[cfg(test)]\r\nmod kraken_tests {\r\n extern crate coinnect;\r\n\r\n use self::coinnect::kraken::KrakenApi;\r\n\r\n /// IMPORTANT: Re... | rust | new_file | 0 | 1 | mit | a6fbc2c07fc21090ef24bbb6e8350589cbf0c82a | ainestal/coinnect,ainestal/coinnect,hugues31/coinnect,hugues31/coinnect | tests/kraken.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add tests for hidden types"
},
{
"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/COPYRIGHT.\... | rust | new_file | 0 | 0 | apache-2.0 | 03530ee1a7e9320b518af9cefafbee5d32d8e519 | aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust | src/test/rustdoc/hidden-trait-struct-impls.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for Item::Verbatim splitting a None group\n\n(see issue #1235)"
},
{
"role": "assistant",
"content": "use proc_macro2::{Delimiter, Group};\nuse quote::quote;\n\n#[test]\nfn main() {\n // Okay. Rustc allows top-level `st... | rust | new_file | 0 | 1 | apache-2.0 | 26a605e5654cf7daa65fa65b4b0387dc6ee16c52 | dtolnay/syn | tests/regression/issue1235.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add new test case showing that supertraits are not enough"
},
{
"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// h... | rust | new_file | null | null | apache-2.0 | f7a75e0341b6192b20bc271c4a165b9a53d34ff4 | vhbit/rust,AerialX/rust,gifnksm/rust,pshc/rust,nwin/rust,ebfull/rust,l0kod/rust,KokaKiwi/rust,l0kod/rust,krzysz00/rust,sae-bom/rust,gifnksm/rust,cllns/rust,ejjeong/rust,l0kod/rust,carols10cents/rust,AerialX/rust-rt-minimal,mdinger/rust,philyoon/rust,krzysz00/rust,miniupnp/rust,ruud-v-a/rust,aepsil0n/rust,aepsil0n/rust,... | src/test/compile-fail/typeck-default-trait-impl-trait-where-clause.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\nuse std::fs::File;\nuse std::io::{Read, Write};\n\nuse system::scheme::{Packet, Scheme};\n\nextern crate system;\n\nstruct ExampleScheme;\n\nimpl Scheme for ExampleScheme {\n\n}\n\nfn main() {\n //In order to handle example:, we create :exa... | rust | edit | 0 | 2 | mit | 2db84f95994e329cd591b78db88d1ca2d51177f8 | nxnfufunezn/redox,tedsta/redox,imp/redox,nxnfufunezn/redox,nounoursheureux/redox,achanda/redox,vvlevchenko/redox,imp/redox,tedsta/redox,vvlevchenko/redox,tedsta/redox,nxnfufunezn/redox,achanda/redox,nounoursheureux/redox,vvlevchenko/redox,imp/redox,nounoursheureux/redox,achanda/redox,tedsta/redox | filesystem/apps/example/main.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add expression tests from rcc codebase"
},
{
"role": "assistant",
"content": "use std::fmt::Display;\nuse thiserror::Error;\n\n// Some of the elaborate cases from the rcc codebase, which is a C compiler in\n// Rust. https://github.... | rust | new_file | 0 | 1 | apache-2.0 | f80d7de018ac590d1897b9b8aa75e2352f89d22f | dtolnay/thiserror | tests/test_expr.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for mocking Generic Associated Types\n\nNo code changes are necessary to get this test working."
},
{
"role": "assistant",
"content": "#! vim: tw=80\n//! automock a trait with Generic Associated Types\n#![cfg_attr(featur... | rust | new_file | 0 | 1 | apache-2.0 | 692c9a90175d8beffbfced41f4c5f033919c8330 | asomers/mockall,asomers/mockall | mockall/tests/automock_gat.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add another test using projection types in impls."
},
{
"role": "assistant",
"content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://ru... | rust | new_file | 0 | 2 | apache-2.0 | cc1776ef1eb8ef2696ebc3228f6ce9db63019d15 | rohitjoshi/rust,mvdnes/rust,rprichard/rust,jashank/rust,aneeshusa/rust,mvdnes/rust,dwillmer/rust,avdi/rust,cllns/rust,pelmers/rust,TheNeikos/rust,omasanori/rust,aepsil0n/rust,mahkoh/rust,pelmers/rust,victorvde/rust,kwantam/rust,untitaker/rust,jroesch/rust,graydon/rust,zachwick/rust,pshc/rust,defuz/rust,ebfull/rust,l0ko... | src/test/run-pass/associated-types-projection-from-known-type-in-impl.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for uninit raw ptrs"
},
{
"role": "assistant",
"content": "fn main() {\n let _val = unsafe { std::mem::MaybeUninit::<*const u8>::uninit().assume_init() };\n //~^ ERROR type validation failed at .value: encountered un... | rust | new_file | 1 | 1 | apache-2.0 | 1cca2acf9553e0993a79e0e1a5443cac3ead6a03 | rust-lang/miri,rust-lang/miri,rust-lang/miri,rust-lang/miri | tests/compile-fail/uninit_raw_ptr.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add run-pass test for reinitialized unions.\n\nThis commit adds a run-pass test for the subset of\n`src/test/ui/borrowck/borrowck-union-move-assign.rs` that is intended to\npass as the union is reinitialized."
},
{
"role": "assistant",... | rust | new_file | 4 | 1 | apache-2.0 | 8e7786a2d9285fc79ec595d85081064560b9d4e4 | GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust | src/test/ui/nll/issue-55651.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a new test case to verify behavior."
},
{
"role": "assistant",
"content": "// run-pass\n#![feature(trait_upcasting)]\n#![allow(incomplete_features)]\n\ntrait Foo<T: Default + ToString>: Bar<i32> + Bar<T> {}\ntrait Bar<T: Defaul... | rust | new_file | 1 | 1 | apache-2.0 | e1e0989a0d53d7521b9efdc774236c25bff844bd | aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust | src/test/ui/traits/trait-upcasting/correct-supertrait-substitution.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for derive(PartialOrd) correctness"
},
{
"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-lan... | rust | new_file | 2 | 1 | apache-2.0 | 5fa157a2d4e147f8bff3d244940dccfe80680081 | graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust | src/test/run-pass/derive-partialord-correctness.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a utility for printing out a table of bytes"
},
{
"role": "assistant",
"content": "pub fn print_byte_table<'a, T: Iterator<&'a u8>>(iter: T) {\n print!(\" \");\n for x in range::<u8>(0, 16) {\n print!(\" {:02x}... | rust | new_file | 0 | 6 | mit | f1ded018b6cdfbca5aa86e9b9a539dd8bdf78fc5 | graememcc/netStack,graememcc/netStack | src/common.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test that autoref'ing beyond method receivers does not leak into two-phase borrows."
},
{
"role": "assistant",
"content": "// Copyright 2017 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this... | rust | new_file | 1 | 1 | apache-2.0 | 81b93fa0b364e106f13c5810941857426a6c6756 | GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust | src/test/compile-fail/borrowck/two-phase-nonrecv-autoref.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for binding bare functions\n\nIssue #1022"
},
{
"role": "assistant",
"content": "fn# f(i: int) {\n assert i == 10;\n}\n\nfn main() {\n // Binding a bare function turns it into a shared closure\n let g: fn() = bi... | rust | new_file | null | null | apache-2.0 | 145feb32984f668ea1caf737af502f60d3d703ea | quornian/rust,vhbit/rust,bombless/rust,defuz/rust,ejjeong/rust,robertg/rust,P1start/rust,ejjeong/rust,omasanori/rust,LeoTestard/rust,cllns/rust,andars/rust,rohitjoshi/rust,dwillmer/rust,sae-bom/rust,mahkoh/rust,0x73/rust,philyoon/rust,omasanori/rust,AerialX/rust-rt-minimal,fabricedesre/rust,carols10cents/rust,shepmaste... | src/test/run-pass/fn-bare-bind.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for borrowck errors with multiple closure captures.\n\nWhen converting check_loans to use ExprUseVisitor I encountered a few\nissues where the wrong number of errors were being emitted for multiple\nclosure captures, but there is no... | rust | new_file | null | null | apache-2.0 | f1542a6a7da088f99bfe2963d29e6ea4b451b432 | AerialX/rust,ruud-v-a/rust,cllns/rust,GBGamer/rust,rohitjoshi/rust,kimroen/rust,mahkoh/rust,jbclements/rust,richo/rust,P1start/rust,erickt/rust,zubron/rust,zubron/rust,erickt/rust,avdi/rust,zubron/rust,KokaKiwi/rust,ktossell/rust,bombless/rust,quornian/rust,ktossell/rust,stepancheg/rust-ide-rust,aneeshusa/rust,pelmers/... | src/test/compile-fail/borrowck-multiple-captures.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add example showing incorrect handling of gamma"
},
{
"role": "assistant",
"content": "//! Demonstrates the current incorrect handling of gamma for RGB images\n\nextern crate image;\nextern crate imageproc;\n\nuse image::{ImageBuff... | rust | new_file | 0 | 5 | mit | 43a0ecf2f8b3f68982f337ef80f37960bd032b8e | PistonDevelopers/imageproc,theotherphil/imageproc | examples/blend.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a struct representing the chosen device and interface options"
},
{
"role": "assistant",
"content": "use std::fmt;\n\n\nstatic DEFAULTDEVICE: &'static str = \"/dev/net/tun\";\nstatic DEFAULTINTERFACE: &'static str = \"tap0\";\n... | rust | new_file | 2 | 2 | mit | d65f5e0772dcead9480b4eebeeac57f390ecae59 | graememcc/netStack,graememcc/netStack | src/device_info.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add xfail'd test for a default method containing 'self'."
},
{
"role": "assistant",
"content": "//xfail-test\n\n// Right now, this fails with \"attempted access of field `purr` on\n// type `self`, but no public field or method with... | rust | new_file | null | null | apache-2.0 | 7bb33e6f1bda3ab4a4a0ac516065b845133c5c3d | j16r/rust,philyoon/rust,AerialX/rust-rt-minimal,AerialX/rust,kmcallister/rust,erickt/rust,richo/rust,gifnksm/rust,pczarn/rust,ejjeong/rust,kimroen/rust,jbclements/rust,ktossell/rust,aneeshusa/rust,sarojaba/rust-doc-korean,nwin/rust,servo/rust,ebfull/rust,LeoTestard/rust,zaeleus/rust,Ryman/rust,hauleth/rust,pczarn/rust,... | src/test/run-pass/traits-default-method-self.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add hello world server example"
},
{
"role": "assistant",
"content": "extern crate clap;\nextern crate fibers;\nextern crate futures;\nextern crate miasht;\n\nuse fibers::{Executor, ThreadPoolExecutor};\nuse futures::{Future, BoxFu... | rust | new_file | 0 | 1 | mit | 407ffb82893bbbe95ca11018a0ed80289f055719 | sile/miasht | examples/hello_srv.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add an example program which demonstates detailed detection"
},
{
"role": "assistant",
"content": "extern crate cld2;\n\nuse std::default::Default;\nuse cld2::{detect_language_ext, Format};\n\nstatic TEXTS: &'static [&'static str] ... | rust | new_file | 0 | 3 | apache-2.0 | 8335eff3da0cc1c2b53af5b672efb109bf7ff886 | emk/rust-cld2,emk/rust-cld2 | examples/analyze_texts.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add simple `[repr(align)]` codegen test.\n\nChecks alloca and memcpy are aligned correctly."
},
{
"role": "assistant",
"content": "// Copyright 2016 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory... | rust | new_file | 2 | 1 | apache-2.0 | 1dd082fb3e92e714f7d8e2f1de344a946b601141 | graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust | src/test/codegen/align-struct.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add example that periodically shows the current clock ticks."
},
{
"role": "assistant",
"content": "#![no_std]\n/**\n * This example shows a repeated timer combined with reading and displaying the current time in\n * clock ticks.\n... | rust | new_file | 0 | 6 | apache-2.0 | f3879d2e847b7a209e8ecbbdddc4ec131746e271 | tock/libtock-rs | examples/now.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test case for const fn sizing, just to be safe."
},
{
"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 | null | null | apache-2.0 | eb1c632201a9b9f03abfef816fb9625d3f014600 | zachwick/rust,SiegeLord/rust,nwin/rust,quornian/rust,bombless/rust,ejjeong/rust,ktossell/rust,barosl/rust,mihneadb/rust,jashank/rust,erickt/rust,rohitjoshi/rust,jashank/rust,0x73/rust,nwin/rust,untitaker/rust,jbclements/rust,pczarn/rust,mihneadb/rust,rprichard/rust,pelmers/rust,miniupnp/rust,untitaker/rust,Ryman/rust,r... | src/test/run-pass/const-vec-of-fns.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: test: Add a test for vector reference counts, XFAIL'd in rustc"
},
{
"role": "assistant",
"content": "// xfail-stage0\n\nuse std;\nimport std._vec;\n\nfn main() {\n auto v = vec(1, 2, 3);\n check (_vec.refcount[int](v) == 1u)... | rust | new_file | null | null | apache-2.0 | ffbbf42edd9ff5d1db9fe563051cdee66e5598ae | l0kod/rust,fabricedesre/rust,dwillmer/rust,pelmers/rust,pythonesque/rust,krzysz00/rust,XMPPwocky/rust,ruud-v-a/rust,aepsil0n/rust,ebfull/rust,pelmers/rust,sarojaba/rust-doc-korean,michaelballantyne/rust-gpu,AerialX/rust-rt-minimal,stepancheg/rust-ide-rust,hauleth/rust,zachwick/rust,robertg/rust,graydon/rust,mvdnes/rust... | src/test/run-pass/vec-ref-count.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add branch tests for codegen."
},
{
"role": "assistant",
"content": "#![feature(libc)]\n\nextern crate libc;\nextern crate llvm;\n\n#[macro_use]\nextern crate util;\n\nuse llvm::*;\nuse llvm::Attribute::*;\n\n#[test]\npub fn test()... | rust | new_file | 0 | 3 | apache-2.0 | b5425161e4150feb0e32fca27bfad918f0f2fc3a | hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak,hyunsik/tokamak | codegen/tests/branch_tests.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add an example of using the typed API"
},
{
"role": "assistant",
"content": "// This example assumes you have InfluxDB running at http://localhost:8086/\n// without authentication and that there is an existing database named\n// `m... | rust | new_file | 0 | 1 | apache-2.0 | 661bbe33a4ce7d4fd3c49bd8c4ff90ed73b56ad2 | integer32llc/influxdb-rs,panoptix-za/influxdb-rs | examples/load_typed_data.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: test: Add a simple region test, xfail'd in the pretty printer"
},
{
"role": "assistant",
"content": "// xfail-pretty\n\nfn main() {\n unsafe {\n let x : int = 3;\n let y : &mut int = &mut x;\n *y = 5;\n ... | rust | new_file | 0 | 1 | apache-2.0 | c40bfec45dee4957a56c4d6dd5bad21c91b40b5c | robertg/rust,stepancheg/rust-ide-rust,mahkoh/rust,michaelballantyne/rust-gpu,Ryman/rust,j16r/rust,gifnksm/rust,cllns/rust,robertg/rust,andars/rust,sae-bom/rust,pczarn/rust,bombless/rust,jroesch/rust,sarojaba/rust-doc-korean,kimroen/rust,richo/rust,bhickey/rand,mahkoh/rust,fabricedesre/rust,cllns/rust,zubron/rust,dwillm... | src/test/run-pass/simple-regions.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for mutable references to unique boxes as function arguments\n\nIssue #409"
},
{
"role": "assistant",
"content": "fn f(&i: ~int) {\n i = ~200;\n}\n\nfn main() {\n let i = ~100;\n f(i);\n assert *i == 200;\n}"... | rust | new_file | null | null | apache-2.0 | 61a14f3df06606ab20a2123fa00366dbc37f9092 | ktossell/rust,aidancully/rust,sarojaba/rust-doc-korean,reem/rust,omasanori/rust,nham/rust,dwillmer/rust,reem/rust,sae-bom/rust,P1start/rust,dwillmer/rust,kimroen/rust,nwin/rust,cllns/rust,aidancully/rust,LeoTestard/rust,GBGamer/rust,l0kod/rust,mahkoh/rust,emk/rust,stepancheg/rust-ide-rust,michaelballantyne/rust-gpu,ane... | src/test/run-pass/unique-fn-arg-mut.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\nfn main() {\n auto s = #shell { uname -a && hg identify };\n log s;\n}\n\n```\n\nApply this change: Fix hg dependency in testsuite."
},
{
"role": "assistant",
"content": "fn main() {\n auto s = #shell { uname -a };\n log s;\n}... | rust | edit | null | null | apache-2.0 | 935442babcf4f8ae52c1a13bb9ce07270a302886 | ktossell/rust,mitsuhiko/rust,XMPPwocky/rust,bombless/rust-docs-chinese,P1start/rust,zachwick/rust,krzysz00/rust,erickt/rust,kwantam/rust,stepancheg/rust-ide-rust,P1start/rust,stepancheg/rust-ide-rust,zubron/rust,reem/rust,mdinger/rust,aneeshusa/rust,rohitjoshi/rust,ejjeong/rust,avdi/rust,barosl/rust,SiegeLord/rust,vhbi... | src/test/run-pass/syntax-extension.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add testing coverage for assigning to immutable thread-locals.\n\nIt is currently allowed to perform such assignments when not making use\nof NLL. NLL already does this right, but let's add a test in place to\nensure it never regresses."
},
... | rust | new_file | 1 | 1 | apache-2.0 | e47cc69697b47f69d18d3c767b136c987a943645 | aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust | src/test/compile-fail/nll/constant-thread-locals-issue-47053.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add simple drag and drop example"
},
{
"role": "assistant",
"content": "//! Simple drag and drop example\n//!\n//! Ported over from example code:\n//! https://developer.gnome.org/gtkmm-tutorial/stable/sec-dnd-example.html.en\n\next... | rust | new_file | 0 | 2 | mit | ab411259a09416e83d1ad3b19c91614cccf57a89 | rust-gnome/examples,rust-gnome/examples | src/bin/drag_and_drop.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Solve Average 2 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(_e) = io... | rust | new_file | 0 | 4 | mit | f186cc2a0b8f947aa53476a7c0f626088370d39d | 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/1006/1006.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add compile-fail test of DST rvalues resulting from overloaded index"
},
{
"role": "assistant",
"content": "// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution a... | rust | new_file | 0 | 1 | apache-2.0 | 205f84f13c69dd20caa6ecb6fc1bbed9171f0703 | rohitjoshi/rust,zachwick/rust,mahkoh/rust,ktossell/rust,ejjeong/rust,mihneadb/rust,ebfull/rust,philyoon/rust,TheNeikos/rust,AerialX/rust,gifnksm/rust,defuz/rust,andars/rust,rohitjoshi/rust,pelmers/rust,ktossell/rust,graydon/rust,nwin/rust,philyoon/rust,barosl/rust,mihneadb/rust,bombless/rust,quornian/rust,dwillmer/rust... | src/test/compile-fail/dst-index.rs | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.