messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Write rust code for the following: Add a test case for previous commit"
},
{
"role": "assistant",
"content": "// -*- rust -*-\n// xfail-pretty\n\nenum color {\n red,\n green,\n blue\n}\n\nfn main() {\n log(error, alt red {\n red => { 1 }\n ... | rust | new_file | null | null | apache-2.0 | a542258277aac84889ed7eb3c2f14273d6d5e3f7 | jbclements/rust,mdinger/rust,michaelballantyne/rust-gpu,aepsil0n/rust,barosl/rust,mvdnes/rust,servo/rust,P1start/rust,P1start/rust,jbclements/rust,seanrivera/rust,rprichard/rust,andars/rust,LeoTestard/rust,ebfull/rand,sae-bom/rust,andars/rust,pelmers/rust,mahkoh/rust,kmcallister/rust,SiegeLord/rust,omasanori/rust,P1sta... | src/test/run-pass/fat-arrow-alt.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for unique boxes as fn args\n\nIssue #409"
},
{
"role": "assistant",
"content": "fn f(i: ~int) {\n assert *i == 100;\n}\n\nfn main() {\n f(~100);\n let i = ~100;\n f(i);\n}"
}
] | rust | new_file | null | null | apache-2.0 | 1367f2b63e33e8b00ca287e146cf10ba67b64094 | arthurprs/rand,jroesch/rust,zubron/rust,achanda/rand,P1start/rust,miniupnp/rust,mdinger/rust,mahkoh/rust,nham/rust,avdi/rust,defuz/rust,aneeshusa/rust,pythonesque/rust,kwantam/rust,zaeleus/rust,gifnksm/rust,j16r/rust,stepancheg/rust-ide-rust,dwillmer/rust,krzysz00/rust,bhickey/rand,graydon/rust,mihneadb/rust,reem/rust,... | src/test/run-pass/unique-fn-arg.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for Location::caller in a macro."
},
{
"role": "assistant",
"content": "// run-pass\n\n#![feature(track_caller)]\n\nmacro_rules! caller_location_from_macro {\n () => (core::panic::Location::caller());\n}\n\nfn main() {\... | rust | new_file | 1 | 1 | apache-2.0 | eb679c9c5d57c88deaa313608af4011befc69605 | aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust | src/test/ui/rfc-2091-track-caller/intrinsic-wrapper.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for async/await combined with const-generics."
},
{
"role": "assistant",
"content": "// edition:2018\n// check-pass\n// revisions: full min\n#![cfg_attr(full, feature(const_generics))]\n#![cfg_attr(full, allow(incomplete_f... | rust | new_file | 6 | 1 | apache-2.0 | 2c385040550fb1eb98cf14ace99129f05b1d7b3f | aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust | src/test/ui/const-generics/issue-74906.rs | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test for unsafe code in TLS macro"
},
{
"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/COPY... | rust | new_file | 2 | 1 | apache-2.0 | 4b68c293fdf64749975adfa0c70c8b3eda649bad | aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust | src/test/run-pass/issue-30756.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Create a example PPM program\n\nThe program outputs a checkerboard"
},
{
"role": "assistant",
"content": "extern crate scratchapixel;\n\nuse std::fs::File;\n\nuse scratchapixel::ppm::rgb::RGB;\nuse scratchapixel::ppm::format::PPM;\... | rust | new_file | 0 | 6 | mit | 57c1936ff26195e5624fc1aa87fe5d7f467e50a8 | Chair-of-Indefinite-Studies/scratchapixel | scratchapixel/examples/use_ppm.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for uint and negative literals as discriminants"
},
{
"role": "assistant",
"content": "enum Animal {\n Cat = 0u,\n Dog = 1u,\n Horse = 2u,\n Snake = 3u\n}\n\nenum Hero {\n Batman = -1,\n Superman = -2,\n ... | rust | new_file | null | null | apache-2.0 | e9233d55c87185d7c0e1ee489d4dce0346770576 | michaelballantyne/rust-gpu,l0kod/rust,ktossell/rust,vhbit/rust,fabricedesre/rust,robertg/rust,nham/rust,dinfuehr/rust,rprichard/rust,Ryman/rust,jashank/rust,kwantam/rust,AerialX/rust,stepancheg/rust-ide-rust,pshc/rust,zachwick/rust,pczarn/rust,mdinger/rust,dwillmer/rust,aidancully/rust,avdi/rust,omasanori/rust,rprichar... | src/test/run-pass/enum-discr.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add redirector to simplify imports."
},
{
"role": "assistant",
"content": "/* This file exists just to make it easier to import things inside of\n ./geom/ without specifying the file they came out of imports.\n \nNote that you stil... | rust | new_file | 0 | 0 | apache-2.0 | 78c5cd2230040b98b959cd0c189035788e11a3a0 | mbrubeck/rust-geom,servo/rust-geom,pcwalton/rust-geom,ruud-v-a/rust-geom | geom.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test to check that we do not get a cycle due to resolving `Self::Bar` in the where clauses"
},
{
"role": "assistant",
"content": "// check-pass\n\n// Test that we do not get a cycle due to\n// resolving `Self::Bar` in the where... | rust | new_file | 5 | 1 | apache-2.0 | 4a97c52630f9d8c5df3c229b1c2c0fb0fa3f3ca2 | graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust | src/test/ui/associated-type-bounds/super-trait-where-referencing-self.rs | rejected_lint | Too many lint violations: 5 | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for none-delimited attribute on an item"
},
{
"role": "assistant",
"content": "#[macro_use]\nmod macros;\n\nuse proc_macro2::{Delimiter, Group, Ident, Span, TokenStream, TokenTree};\nuse quote::quote;\nuse std::iter::FromI... | rust | new_file | 1 | 0 | apache-2.0 | ef51ded615c06e32044d213da246dd67751ddd33 | dtolnay/syn | tests/test_item.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add GitError algebraic data type"
},
{
"role": "assistant",
"content": "use std::fmt;\n\npub enum GitError {\n CorruptedRepository(&'static str),\n CorruptedCommit(&'static str)\n}\n\nimpl fmt::Show for GitError {\n fn fmt... | rust | new_file | 0 | 2 | mit | aa111a2fe19b5df4d3c5a3b88e63ed7e7f57803e | kaisellgren/rust_git | src/error.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add another test for !"
},
{
"role": "assistant",
"content": "// 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//\... | rust | new_file | 0 | 2 | apache-2.0 | 06747c669f3e6fb53270b76975d4382e52d567e2 | GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust | src/test/run-pass/impl-for-never.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add 7 segment display example"
},
{
"role": "assistant",
"content": "#![no_std]\n\nextern crate tock;\n\nconst DATA_PIN: u32 = 0;\nconst CLOCK_PIN: u32 = 1;\nconst LATCH_PIN: u32 = 2;\nconst SPEED: u32 = 2;\n\nuse tock::{led, timer... | rust | new_file | 0 | 2 | apache-2.0 | 24f9bd2273a17f9be48b50afe3bf9e459f32b48f | tock/libtock-rs | examples/seven_digit.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a regression test for FromIterator of OscArray"
},
{
"role": "assistant",
"content": "extern crate rosc;\n\nuse rosc::{OscArray, OscType};\n\n#[test]\nfn test_osc_array_from_iter() {\n use std::iter::FromIterator;\n let i... | rust | new_file | 0 | 1 | apache-2.0 | b267167805648186c2959ccf8e2dbda9e9e3cfc6 | klingtnet/rosc | tests/types_test.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for assoc consts."
},
{
"role": "assistant",
"content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-lang.org/COPYRIGHT.\... | rust | new_file | 1 | 1 | apache-2.0 | e1725a810142bb95fb5d3beb3e19a1a6f1885836 | GBGamer/rust,rust-lang/miri,aidancully/rust,rust-lang/miri,rust-lang/miri,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,rust-lang/miri,graydon/... | tests/run-pass/associated-const.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for fix duplicate display of E0502"
},
{
"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 | 975ff7b7a053f99fa24e7a79b22aec63d054409a | aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,graydon/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust | src/test/compile-fail/issue-42106.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a testkit for HTTP cache integration tests.\n\nDerived from cargo's."
},
{
"role": "assistant",
"content": "use std::cell::Cell;\nuse std::env;\nuse std::fs;\nuse std::path::PathBuf;\nuse std::sync::atomic::{AtomicUsize, Orderi... | rust | new_file | 2 | 2 | mit | a7e64c2655bf486643f91e46ba2f45134dcdac6d | softprops/hubcaps,softprops/gust | tests/testkit/mod.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 | 0 | 1 | apache-2.0 | 2cdc7af41366182259a05435e325d7444653a3e8 | aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust | src/test/compile-fail/rfc-1937-termination-trait/termination-trait-main-i32.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add some XML character predicates"
},
{
"role": "assistant",
"content": "use super::{Document,Root,RootChild};\n\ntrait XmlChar {\n fn is_name_start_char(&self) -> bool;\n fn is_name_char(&self) -> bool;\n}\n\nimpl XmlChar fo... | rust | new_file | null | null | mit | 6bcd10f8db14f4fd0acfa8a1b5cee0a990838522 | shepmaster/sxd-rust | document/src/parser.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Test for a particular parallel codegen corner case"
},
{
"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://r... | rust | new_file | 4 | 1 | apache-2.0 | 19645c4e219acc56f601c13a949cac3b2f7e9b48 | jroesch/rust,GBGamer/rust,aidancully/rust,l0kod/rust,nwin/rust,nwin/rust,omasanori/rust,GBGamer/rust,GBGamer/rust,dwillmer/rust,dwillmer/rust,nwin/rust,jroesch/rust,zubron/rust,vhbit/rust,omasanori/rust,zubron/rust,jashank/rust,nwin/rust,vhbit/rust,pelmers/rust,dwillmer/rust,dwillmer/rust,jroesch/rust,GBGamer/rust,jash... | src/test/run-pass/parallel-codegen-closures.rs | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\n#![feature(\n btree_range,\n collections,\n collections_bound,\n question_mark,\n rustc_private,\n pub_restricted,\n)]\n\n// From rustc.\n#[macro_use] extern crate rustc;\nextern crate rustc_borrowck;\nextern crate rustc_dat... | rust | edit | 4 | 0 | apache-2.0 | 00ae07be075d313f077c383927bc1daa45c752b0 | graydon/rust,aidancully/rust,aidancully/rust,rust-lang/miri,GBGamer/rust,graydon/rust,rust-lang/miri,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,tsion/miri,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,rust-lang/miri,aidancully/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust... | src/lib.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add command for FLAC metdata\n\nFor now it only prints stream info"
},
{
"role": "assistant",
"content": "extern crate docopt;\nextern crate flac;\nextern crate rustc_serialize;\n\nuse docopt::Docopt;\nuse flac::{ReadStream, Stream... | rust | new_file | 0 | 2 | bsd-3-clause | c9d1bf8edb2a78c1995ddb11ad90cfe2d65c928f | sourrust/flac | examples/metadata.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add rust code for perfect-numbers\n\nIt passed all test cases"
},
{
"role": "assistant",
"content": "#[derive(Debug, PartialEq)]\npub enum Classification {\n Perfect,\n Abundant,\n Deficient,\n}\n\npub fn classify(number: ... | rust | new_file | 0 | 4 | bsd-2-clause | 850466d70f5158028ba7f9a1a91b0c8d357a4e0e | gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism | rust/perfect-numbers/src/lib.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a regression test for the const eval type resolution"
},
{
"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// ht... | rust | new_file | 2 | 1 | apache-2.0 | 1ee0ff3bfed4ecf56b175b166286b7cd2163a81b | GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust | src/test/run-pass/ctfe/assoc-const.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add day 25 part 1 solution"
},
{
"role": "assistant",
"content": "// advent25.rs\n// copy protection code\n\n#[macro_use] extern crate scan_fmt;\n\nuse std::io;\n\nfn main() {\n let mut input = String::new();\n io::stdin().re... | rust | new_file | 0 | 2 | mit | f2f1b6c8c8684a913b6a0d829a3a70fa2a7c5e43 | davidsullins/AdventOfCodeRust | src/bin/advent25.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add simple vertex buffer tests\n\ncc #15"
},
{
"role": "assistant",
"content": "#![feature(phase)]\n\n#[phase(plugin)]\nextern crate glium_macros;\n\nextern crate glutin;\nextern crate glium;\n\nuse glium::DisplayBuild;\n\n#[test]\... | rust | new_file | null | null | apache-2.0 | 8ef2829092ff6fc6f51cf709101ccca85cf82d38 | rozaliev/glium,carbidegames/glium,msiglreith/glium,caldwell/glium,TyOverby/glium,binsoftware/glium,nicokoch/glium,glium/glium,cpjreynolds/glium,tomaka/glium,bvssvni/glium,christopheraugustus/glium,acolley/glium,sdotz/glium | tests/vertex_buffer.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add tests for macros hygiene"
},
{
"role": "assistant",
"content": "#[test]\nfn iproduct_hygiene() {\n let _ = itertools::iproduct!(0..6);\n let _ = itertools::iproduct!(0..6, 0..9);\n let _ = itertools::iproduct!(0..6, 0.... | rust | new_file | 0 | 1 | apache-2.0 | 79e39cbfed53317cf427578d24c29414a4d4bf4f | rust-itertools/itertools | tests/macros_hygiene.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a simple decoder benchmark"
},
{
"role": "assistant",
"content": "#![feature(test)]\nextern crate test;\nextern crate rosc;\n\nuse self::test::Bencher;\n\n#[bench]\nfn bench_decode(b: &mut Bencher) {\n // The message was cap... | rust | new_file | 0 | 2 | apache-2.0 | e0d3350a301134b75891b12da02f57895f5dac1b | klingtnet/rosc | benches/decoder_bench.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add Rust solution for bubblesort"
},
{
"role": "assistant",
"content": "use std::cmp::PartialOrd;\n\n/// An in-place implementation of bubble sort\nfn bubble_sort<T>(arr: &mut [T])\nwhere T: PartialOrd {\n for i in 0..arr.len() {\... | rust | new_file | 0 | 5 | mit | 6f744ef5c4f546af005f0791b38383703635afdf | 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/bubble-sort/buble_sort.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test to deserialize unsigned int\n\nSigned-off-by: Matthias Beyer <<EMAIL>>"
},
{
"role": "assistant",
"content": "#![cfg(feature = \"preserve_order\")]\n\nextern crate indexmap;\n\n#[derive(serde::Deserialize, Eq, PartialEq, D... | rust | new_file | 0 | 1 | apache-2.0 | 6ea01f14b279add8e8c0bec037de3a30ff5f6621 | mehcode/config-rs | tests/unsigned_int.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for Command::current_dir behavior."
},
{
"role": "assistant",
"content": "// run-pass\n// ignore-emscripten no processes\n// ignore-sgx no processes\n\nuse std::env;\nuse std::fs;\nuse std::path::Path;\nuse std::process::C... | rust | new_file | 3 | 3 | apache-2.0 | fcbcc975767b0621a43fb9c1c872e1754e30a377 | graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust | src/test/ui/command/command-current-dir.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for associated const version display"
},
{
"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 | 1 | 0 | apache-2.0 | ca04c639307e700e4684a46ef71d0781b8f35736 | graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust | src/test/rustdoc/assoc-consts-version.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add solution to problem 37"
},
{
"role": "assistant",
"content": "#![feature(core)]\n#[macro_use] extern crate libeuler;\nextern crate num;\n\nuse libeuler::SieveOfAtkin;\nuse num::traits::PrimInt;\n\n/// The number 3797 has an int... | rust | new_file | 0 | 6 | mit | 2c1f67fe7763ab7435e126b54e29d394ff2edbc5 | zmbush/euler,zmbush/euler | sol_0037/main.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add syntactic test for rest patterns."
},
{
"role": "assistant",
"content": "// Here we test that `..` is allowed in all pattern locations *syntactically*.\n// The semantic test is in `rest-pat-semantic-disallowed.rs`.\n\n// check-... | rust | new_file | 3 | 3 | apache-2.0 | 15bc63e8bfd575c709a45f7c6845acfe0f3fdc92 | graydon/rust,graydon/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust | src/test/ui/pattern/rest-pat-syntactic.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for --remap-path-prefix on std imports"
},
{
"role": "assistant",
"content": "// ignore-windows\n\n// compile-flags: -g -C no-prepopulate-passes --remap-path-prefix=/=/the/root/\n\n// Here we check that imported code from... | rust | new_file | 0 | 2 | apache-2.0 | 65520ec802f77ab191423f3a1507d6c0be7cfb9c | graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust | src/test/codegen/remap_path_prefix/issue-73167-remap-std.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add failing use case for CubeMapArray type in shaders.\n\nThis is because of missing UniformType mapping."
},
{
"role": "assistant",
"content": "#[macro_use]\nextern crate glium;\n\nmod support;\n\n// Tests for support of the cube ... | rust | new_file | 0 | 1 | apache-2.0 | 51dfc63d557f90a8cee6be08e8435f6a85fa721e | glium/glium | tests/program_variable_types.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a compile-fail test for attempts to extend non-objects."
},
{
"role": "assistant",
"content": "//error-pattern:x does not have object type\nuse std;\n\nfn main() {\n auto x = 3;\n\n auto anon_obj = obj {\n fn foo()... | rust | new_file | null | null | apache-2.0 | 6bd80d01217c621b754f669188c0826c01af8fda | untitaker/rust,TheNeikos/rust,victorvde/rust,0x73/rust,jashank/rust,erickt/rust,pythonesque/rust,cllns/rust,kimroen/rust,omasanori/rust,LeoTestard/rust,kwantam/rust,reem/rust,TheNeikos/rust,nham/rust,victorvde/rust,aepsil0n/rust,ruud-v-a/rust,zaeleus/rust,jashank/rust,kimroen/rust,fabricedesre/rust,aturon/rust,ejjeong/... | src/test/compile-fail/extend-non-object.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for error_on_line_overflow_strings"
},
{
"role": "assistant",
"content": "// rustfmt-error_on_line_overflow_strings: false\n// Suppress an error on line overflow strings.\n\nfn main() {\n let x = \" ... | rust | new_file | 3 | 1 | apache-2.0 | 6d78bd5fdc5c5ade539e221d7e91603538199452 | graydon/rust,graydon/rust,SingingTree/rustfmt,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,rust-lang/rustfmt,aidancully/rust,rust-lang/rustfmt,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,SingingTree/rustfmt | tests/target/configs-error_on_line_overflow_strings-false.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add codegen test to make sure that closures are 'internalized' properly."
},
{
"role": "assistant",
"content": "// Copyright 2016 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 | f7820888daeb961339643dd142ba032847181555 | GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust,graydon/rust,GBGamer/rust | src/test/codegen/internalize-closures.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: test: Add a test for trait inheritance with self as a type parameter. rs=test-only"
},
{
"role": "assistant",
"content": "trait Foo<T> {\n fn f(&self, x: &T);\n}\n\ntrait Bar : Foo<self> {\n fn g(&self);\n}\n\nstruct S {\n ... | rust | new_file | null | null | apache-2.0 | 593f4142548100f9d37909ca10df35615a91abec | servo/rust,sarojaba/rust-doc-korean,emk/rust,barosl/rust,robertg/rust,mihneadb/rust,aturon/rust,servo/rust,omasanori/rust,defuz/rust,pshc/rust,kwantam/rust,GrahamDennis/rand,erickt/rust,zachwick/rust,kimroen/rust,seanrivera/rust,michaelballantyne/rust-gpu,ebfull/rust,Ryman/rust,omasanori/rust,erickt/rust,carols10cents/... | src/test/run-pass/trait-inheritance-self.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add regression test for atomics being Send + Sync\n\nThanks to Tamir Duberstein for the implementation suggestion."
},
{
"role": "assistant",
"content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at ... | rust | new_file | 2 | 1 | apache-2.0 | 3a4904f06f5d39bfa50d1cd55e6ad6229c34045d | vhbit/rust,jashank/rust,jroesch/rust,zubron/rust,pshc/rust,l0kod/rust,l0kod/rust,jroesch/rust,GBGamer/rust,dwillmer/rust,vhbit/rust,graydon/rust,GBGamer/rust,l0kod/rust,pshc/rust,graydon/rust,aidancully/rust,vhbit/rust,graydon/rust,l0kod/rust,GBGamer/rust,pshc/rust,aidancully/rust,graydon/rust,GBGamer/rust,pshc/rust,jr... | src/test/run-pass/sync-send-atomics.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add exercise 6.5 - strftime"
},
{
"role": "assistant",
"content": "/// Exercise: Write a program to obtain the current time and print it using strftime,\n/// so that it looks like the default output from date(1). Set the TZ environ... | rust | new_file | 0 | 1 | mit | 5d1495b03e63ec2df370ce56f1ef5d83cd0916ec | philippkeller/apue-rust,philippkeller/apue-rust,philippkeller/apue-rust | src/bin/06-system-data-files/e05-strftime.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test demonstrating context inference failure"
},
{
"role": "assistant",
"content": "use anyhow::{Context, Result};\n\n// https://github.com/dtolnay/anyhow/issues/18\n#[test]\nfn test_inference() -> Result<()> {\n let x = \"1... | rust | new_file | 0 | 2 | apache-2.0 | 6057864f8b0c131793af21321a59567d64b03c0f | dtolnay/anyhow | tests/test_context.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add an xfailed test for bogus deep copying of things containing resources"
},
{
"role": "assistant",
"content": "// xfail-test\n// expected error: mismatched kinds\n\nresource r(i: @mutable int) {\n *i = *i + 1;\n}\n\nfn main() ... | rust | new_file | null | null | apache-2.0 | 1097463d96fb549464ba37a3d2dbaa6a837d18eb | dinfuehr/rust,stepancheg/rust-ide-rust,omasanori/rust,untitaker/rust,avdi/rust,Ryman/rust,andars/rust,P1start/rust,zaeleus/rust,philyoon/rust,servo/rust,ruud-v-a/rust,zubron/rust,AerialX/rust-rt-minimal,pshc/rust,ruud-v-a/rust,robertg/rust,untitaker/rust,quornian/rust,defuz/rust,philyoon/rust,mdinger/rust,mvdnes/rust,m... | src/test/compile-fail/pinned-deep-copy.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for duplicate definitions of structs and enum struct variants."
},
{
"role": "assistant",
"content": "// Copyright 2013 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distributio... | rust | new_file | 0 | 1 | apache-2.0 | 41e90f2156236d8b4a0ab74e3ed9aadaa7d11d58 | avdi/rust,krzysz00/rust,krzysz00/rust,j16r/rust,P1start/rust,servo/rust,krzysz00/rust,sae-bom/rust,servo/rust,LeoTestard/rust,aidancully/rust,bombless/rust,ruud-v-a/rust,KokaKiwi/rust,dinfuehr/rust,aturon/rust,P1start/rust,kmcallister/rust,robertg/rust,hauleth/rust,reem/rust,mdinger/rust,carols10cents/rust,mitsuhiko/ru... | src/test/compile-fail/dup-struct-enum-struct-variant.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for deprecated phase(syntax)"
},
{
"role": "assistant",
"content": "// Copyright 2013-2014 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 | 7c674aceeb60da7e8aca60512c79329186127e5b | barosl/rust,TheNeikos/rust,pshc/rust,ktossell/rust,stepancheg/rust-ide-rust,vhbit/rust,l0kod/rust,jroesch/rust,AerialX/rust-rt-minimal,miniupnp/rust,sae-bom/rust,ejjeong/rust,pshc/rust,mahkoh/rust,andars/rust,richo/rust,KokaKiwi/rust,mahkoh/rust,TheNeikos/rust,aepsil0n/rust,kwantam/rust,AerialX/rust,dwillmer/rust,ejjeo... | src/test/run-pass/deprecated-phase-syntax.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a missing file that defines the `Unit` type."
},
{
"role": "assistant",
"content": "use traits::geometry::Norm;\n\n\n/// A wrapper that ensures the undelying algebraic entity has a unit norm.\n#[repr(C)]\n#[derive(Eq, PartialEq... | rust | new_file | 4 | 2 | bsd-3-clause | 05a0c12c4a9bc39153f24e30844ca830570d0d21 | sebcrozet/nalgebra,sebcrozet/nalgebra | src/structs/unit.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add rustdoc regression test for the unused_braces lint"
},
{
"role": "assistant",
"content": "// check-pass\n\n// This tests the bug in #70814, where the unused_braces lint triggered on the following code\n// without providing a sp... | rust | new_file | 2 | 1 | apache-2.0 | 485f1999f59a9895b94534de91e8bbd870e7bd49 | graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust | src/test/rustdoc-ui/unused-braces-lint.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Create an example for the client module."
},
{
"role": "assistant",
"content": "// Copyright 2020 Google LLC\n//\n// Use of this source code is governed by an MIT-style license that can be found\n// in the LICENSE file or at https:... | rust | new_file | 0 | 4 | mit | 662fa5bb8e1ea344b9875f5e1ca2ce502eebfcae | google/fleetspeak-rs | examples/hello.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for associated constants in the sidebar"
},
{
"role": "assistant",
"content": "#![crate_name = \"foo\"]\n\npub trait Trait {\n const FOO: u32 = 12;\n\n fn foo();\n}\n\npub struct Bar;\n\n// @has 'foo/struct.Bar.html'... | rust | new_file | 0 | 2 | apache-2.0 | 51a993f4a6f70765b2def104e9f1ba9549b37eb5 | graydon/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust | src/test/rustdoc/associated-consts.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a simple trait for single time parsing\n\nThis is inspired by the chomp project <https://github.com/m4rw3r/chomp>."
},
{
"role": "assistant",
"content": "use nom::IResult;\n\npub trait StreamProducer {\n fn parse<F, T>(&mut se... | rust | new_file | 0 | 0 | bsd-3-clause | f45f1ffaf1e2e77e252d9d276c5b15d3821091fd | sourrust/flac | src/utility/types.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 | null | null | apache-2.0 | 16b27bbeadff1c61ce36e09180b18aedc7ec27b2 | l0kod/rust,emk/rust,mihneadb/rust,untitaker/rust,carols10cents/rust,aneeshusa/rust,avdi/rust,jroesch/rust,pshc/rust,aepsil0n/rust,untitaker/rust,mdinger/rust,mvdnes/rust,jroesch/rust,ejjeong/rust,vhbit/rust,cllns/rust,graydon/rust,gifnksm/rust,rprichard/rust,kimroen/rust,aepsil0n/rust,seanrivera/rust,carols10cents/rust... | src/test/run-pass/unboxed-closures-by-ref.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for E0152 error message improvement"
},
{
"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-la... | rust | new_file | 1 | 1 | apache-2.0 | dfe72fa4ce2c31be3ee941f6df216e3a463cf68a | graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,graydon/rust | src/test/compile-fail/duplicate_entry_error.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add simpler, but less performant decode example"
},
{
"role": "assistant",
"content": "// Claxon -- A FLAC decoding library in Rust\n// Copyright 2017 Ruud van Asseldonk\n//\n// Licensed under the Apache License, Version 2.0 (the \... | rust | new_file | 0 | 2 | apache-2.0 | 0bfb8a1449679b285bb6a88ef6d6cabe5856beb9 | ruuda/claxon,ruuda/claxon,ruuda/claxon | examples/decode_simple.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add an XFAILed test for failing destructors\n\nIssue #236"
},
{
"role": "assistant",
"content": "// error-pattern:fail\n// xfail-test\n\nresource r(i: int) {\n // What happens when destructors throw?\n fail;\n}\n\nfn main() {... | rust | new_file | null | null | apache-2.0 | 5b7145a9f41ba54d956dc16c147a3a06ba331e72 | nwin/rust,quornian/rust,philyoon/rust,kwantam/rust,erickt/rust,ruud-v-a/rust,vhbit/rust,ejjeong/rust,emk/rust,ejjeong/rust,graydon/rust,victorvde/rust,bombless/rust,emk/rust,andars/rust,sarojaba/rust-doc-korean,stepancheg/rust-ide-rust,defuz/rust,Ryman/rust,dinfuehr/rust,jroesch/rust,jroesch/rust,bhickey/rand,aneeshusa... | src/test/run-fail/unwind-resource-fail.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Solve Simple Sum 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\n if let Err(_e) = io::stdin().read_line(&mut input_a){}\n... | rust | new_file | 0 | 3 | mit | e234fbb4e336a6e221ea2ee0ac77ab0177b0c6bc | 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/1003/1003.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 | 0 | 2 | apache-2.0 | 58a288d323a00647c12a78f88427ac892b87c5b5 | ejjeong/rust,reem/rust,philyoon/rust,sae-bom/rust,seanrivera/rust,zaeleus/rust,pshc/rust,zaeleus/rust,andars/rust,nwin/rust,andars/rust,TheNeikos/rust,sae-bom/rust,krzysz00/rust,dwillmer/rust,ebfull/rust,l0kod/rust,nwin/rust,aneeshusa/rust,ruud-v-a/rust,jroesch/rust,aepsil0n/rust,jroesch/rust,KokaKiwi/rust,philyoon/rus... | src/test/run-pass/issue-4759-1.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for ICE 6793"
},
{
"role": "assistant",
"content": "//! This is a reproducer for the ICE 6793: https://github.com/rust-lang/rust-clippy/issues/6793.\n//! The ICE is caused by using `TyCtxt::type_of(assoc_type_id)`, which i... | rust | new_file | 3 | 1 | apache-2.0 | e51bb0ee26413c8db8264abe413cc06c95bd9a13 | aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust | tests/ui/crashes/ice-6793.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: [Bonsai] Add the AST (missing file)."
},
{
"role": "assistant",
"content": "// Copyright 2016 Pierre Talbot (IRCAM)\n\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in com... | rust | new_file | 0 | 0 | apache-2.0 | 290ef4acf5dd95b5496d69a29786a6d5ff7e56fd | ptal/bonsai,ptal/bonsai,ptal/bonsai,ptal/bonsai | src/ast.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test that NRVO elides the call to `memcpy`"
},
{
"role": "assistant",
"content": "// compile-flags: -O\n\n#![crate_type = \"lib\"]\n\n// Ensure that we do not call `memcpy` for the following function.\n// `memset` and `init` should... | rust | new_file | 0 | 1 | apache-2.0 | 856cd6609f42f3dfb71a060205981f075a22c541 | aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust | src/test/codegen/nrvo.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Implement \"Roots of a function\" problem."
},
{
"role": "assistant",
"content": "// http://rosettacode.org/wiki/Roots_of_a_function\n\nfn find_roots<T: Copy + PartialOrd + Signed>(f: |T| -> T, start: T, stop: T,\n ... | rust | new_file | null | null | unlicense | 2e560975d0320da4f6850a8b1f8f199e9e8e2d6e | ghotiphud/rust-rosetta,sakeven/rust-rosetta,crespyl/rust-rosetta,ZoomRmc/rust-rosetta,magum/rust-rosetta,magum/rust-rosetta,pfalabella/rust-rosetta,JIghtuse/rust-rosetta,crr0004/rust-rosetta,Hoverbear/rust-rosetta | src/roots_of_a_function.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Test for cast causing static promotion failure.\n\nThis commit adds a test that ensures that a cast in a static doesn't\nstop const promotion within the static."
},
{
"role": "assistant",
"content": "// Copyright 2017 The Rust Proj... | rust | new_file | 1 | 1 | apache-2.0 | 8a0d8c5ab5541c28a64073d8af2592965941564c | GBGamer/rust,graydon/rust,graydon/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust | src/test/ui/nll/issue-55288.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for `Ipv6Addr` methods in a const context"
},
{
"role": "assistant",
"content": "// run-pass\n\n#![feature(ip)]\n#![feature(const_ipv6)]\n\nuse std::net::{Ipv4Addr, Ipv6Addr, Ipv6MulticastScope};\n\nfn main() {\n const ... | rust | new_file | 0 | 1 | apache-2.0 | cd08deff3c9c0de3ecd78883a3df4c9089b715d1 | aidancully/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust | src/test/ui/consts/std/net/ipv6.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a wrapper for C file descriptors"
},
{
"role": "assistant",
"content": "extern crate libc;\nuse self::libc::{c_int, close};\nuse std::fmt;\n\n\npub struct CFileDescriptor {\n fd: c_int\n}\n\n\nimpl CFileDescriptor {\n pub... | rust | new_file | 1 | 2 | mit | 9ccaa1946d35a3003ff3fe44a25eae1b24444713 | graememcc/netStack,graememcc/netStack | src/ioctl/c_file_descriptor.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add Showcase program to test and demonstrate the library"
},
{
"role": "assistant",
"content": "/* Copyright 2016 Jordan Miner\n *\n * Licensed under the MIT license <LICENSE or\n * http://opensource.org/licenses/MIT>. This file ma... | rust | new_file | 0 | 1 | mit | f88d0e75b51ea1779d20f5a3856c56e28ac0aca5 | jminer/clear-coat | examples/showcase.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test to ensure edge-triggering"
},
{
"role": "assistant",
"content": "/// Ensure all sockets operate on edge trigger mode.\n\nextern crate amy;\n\nuse std::net::{TcpListener, TcpStream};\nuse std::thread;\nuse std::str;\nuse st... | rust | new_file | 0 | 3 | apache-2.0 | a93185a867d87010babdabbb55ed6fd13c6f278e | andrewjstone/amy | tests/edge-trigger-test.rs | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\nuse super::SDTHeader;\n\n#[repr(packed)]\n#[derive(Clone, Copy, Debug, Default)]\npub struct DSDT {\n pub header: SDTHeader,\n pub data: &'static [u8]\n\n}\n\nimpl DSDT {\n pub fn new(header: *const SDTHeader) -> Option<Self> {\n ... | rust | edit | 1 | 2 | mit | 76fa101d2d8c6542d5334828a4c50ef5eccecff1 | Lacaranian/redox,rexlunae/redox,Lacaranian/redox,Lacaranian/redox,Lacaranian/redox,rexlunae/redox,rexlunae/redox,Lacaranian/redox | kernel/acpi/dsdt.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add 3rd example, simple linked list and move"
},
{
"role": "assistant",
"content": "enum SimpleList<T> {\n Cons(T, Box<SimpleList<T>>),\n Nil,\n}\n\nfn length<T>(xs: &SimpleList<T>) -> int {\n match xs {\n &Cons(_, ... | rust | new_file | null | null | mit | d7b71ec32541226908b5f878bfacfb798b2ba9a5 | liquidamber/rust-examples,liquidamber/rust-examples,liquidamber/rust-examples,liquidamber/rust-examples,liquidamber/rust-examples | p003_simple_list_and_move.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add dummy compilation test in replacement for examples"
},
{
"role": "assistant",
"content": "//! This file contains a single test that is\n//! compiled but not run, just to ensure that\n//! the GL symbols are defined\n\nextern c... | rust | new_file | 0 | 1 | apache-2.0 | d8abdbac8faccab6ce70742e24d5fdd1b41e9921 | neon64/gl-rs,skligys/gl-rs,tomaka/gl-rs,nicokoch/gl-rs,skligys/gl-rs,bjz/gl-rs,jimarnold/gl-rs,nicokoch/gl-rs,jimarnold/gl-rs,neon64/gl-rs,tomaka/gl-rs,bjz/gl-rs | tests/symbols.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 | 5b0164b0fa950e384e91c807e79df4b51a4bcd50 | aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,rust-lang/miri,rust-lang/miri,aidancully/rust,graydon/rust,rust-lang/miri,tsion/miri,graydon/rust,rust-lang/mi... | test/std.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add example from lkuper's intern talk to the test suite."
},
{
"role": "assistant",
"content": "// Example from lkuper's intern talk, August 2012.\n\ntrait Equal {\n fn isEq(a: self) -> bool;\n}\n\nenum Color { cyan, magenta, ye... | rust | new_file | null | null | apache-2.0 | 8703d088ead97cff975187bcd5b57851ad410cbe | rprichard/rust,bombless/rust,jashank/rust,AerialX/rust,P1start/rust,seanrivera/rust,mvdnes/rust,nham/rust,ejjeong/rust,defuz/rust,jbclements/rust,pythonesque/rust,jbclements/rust,mahkoh/rust,mvdnes/rust,dinfuehr/rust,SiegeLord/rust,j16r/rust,mdinger/rust,ebfull/rust,gifnksm/rust,carols10cents/rust,michaelballantyne/rus... | src/test/run-pass/typeclasses-eq-example.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"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 | 0 | 1 | apache-2.0 | ac25b449e2d9a9f541748ce95da59ae556827034 | aidancully/rust,aidancully/rust,pshc/rust,pshc/rust,pshc/rust,dwillmer/rust,pshc/rust,graydon/rust,GBGamer/rust,aidancully/rust,graydon/rust,aidancully/rust,dwillmer/rust,GBGamer/rust,pshc/rust,graydon/rust,dwillmer/rust,GBGamer/rust,GBGamer/rust,pshc/rust,GBGamer/rust,aidancully/rust,dwillmer/rust,dwillmer/rust,aidanc... | src/librustc_back/target/i686_pc_windows_msvc.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add example that utilizes terminal default colors"
},
{
"role": "assistant",
"content": "extern crate cursive;\n\n\nuse cursive::Cursive;\nuse cursive::theme::{Color, Theme};\nuse cursive::views::TextView;\n\n\nfn custom_theme_from... | rust | new_file | 0 | 1 | mit | 9edc6ffc15097c777bea622d4b7731fd01509218 | Gyscos/Cursive | examples/terminal_default.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add an XFAILed test for native \"llvm\" modules\n\nThis functionality is completely broken"
},
{
"role": "assistant",
"content": "// xfail-test\n\nnative \"llvm\" mod llvm {\n fn thesqrt(n: float) -> float = \"sqrt.f64\";\n}\n\n... | rust | new_file | null | null | apache-2.0 | cb50e4329af7091db430a74fa36737a4dd84608d | sae-bom/rust,omasanori/rust,dwillmer/rust,aturon/rust,mvdnes/rust,ktossell/rust,philyoon/rust,omasanori/rust,pelmers/rust,jbclements/rust,michaelballantyne/rust-gpu,aepsil0n/rust,reem/rust,aepsil0n/rust,stepancheg/rust-ide-rust,pshc/rust,quornian/rust,miniupnp/rust,miniupnp/rust,stepancheg/rust-ide-rust,miniupnp/rust,m... | src/test/run-pass/native-llvm.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for async closures"
},
{
"role": "assistant",
"content": "// rustfmt-edition: Edition2018\n\nfn main() {\n let async_closure = async {\n let x = 3;\n x\n };\n\n let f = async /* comment */ {\n ... | rust | new_file | 7 | 1 | apache-2.0 | 25f83b14c7e1bcdef955f1e2f84ff73b98e29baf | aidancully/rust,graydon/rust,graydon/rust,aidancully/rust,SingingTree/rustfmt,rust-lang/rustfmt,rust-lang/rustfmt,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,SingingTree/rustfmt,graydon/rust,graydon/rust,aidancully/rust,aidancully/rust | tests/target/async_closure.rs | rejected_lint | Too many lint violations: 7 | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for two sequence repetitions in a row"
},
{
"role": "assistant",
"content": "// Copyright 2015 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directory of this distribution and at\n// http://rust-... | rust | new_file | 1 | 1 | apache-2.0 | 7a5d74828bf6350c72f0330d7799e0cccd2e968f | carols10cents/rust,krzysz00/rust,aepsil0n/rust,KokaKiwi/rust,zubron/rust,rohitjoshi/rust,vhbit/rust,reem/rust,aidancully/rust,zachwick/rust,GBGamer/rust,reem/rust,jroesch/rust,pshc/rust,l0kod/rust,pelmers/rust,carols10cents/rust,nwin/rust,mihneadb/rust,victorvde/rust,carols10cents/rust,robertg/rust,cllns/rust,dwillmer/... | src/test/compile-fail/macro-seq-followed-by-seq.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add Rust code for proverb case\n\nIt passed all test cases"
},
{
"role": "assistant",
"content": "pub fn build_proverb(text: Vec<&str>) -> String {\n let mut result = String::new();\n let mut iter = text.iter().peekable();\n\... | rust | new_file | 0 | 4 | bsd-2-clause | 85a55afb412ee479830882fa9420b0c513bff5e9 | gyn/exercism,gyn/exercism,gyn/exercism,gyn/exercism | rust/proverb/src/lib.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add the commandline options example from the README to examples"
},
{
"role": "assistant",
"content": "extern crate getopts;\nextern crate knob;\n\nuse getopts::optopt;\nuse knob::Settings;\n\nfn main() {\n let mut settings = Se... | rust | new_file | 0 | 2 | mit | d7f87f7949a4751d62613d32fb63851d99bd4e42 | skade/knob | examples/commandline_options.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Implement a trait that get an HTTP response given an URL and headers"
},
{
"role": "assistant",
"content": "use hyper::client::Client;\nuse hyper::client::response::Response;\nuse hyper::error::Error;\nuse hyper::header::Headers;\n... | rust | new_file | 0 | 2 | mit | a8af8e5b89fdebb61bdf230c765da3a7a9259bbf | derniercri/snatch | src/client.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a prototype of the digest FFI API."
},
{
"role": "assistant",
"content": "extern crate ring;\n\nmacro_rules! wrap_algorithm {\n ( $wrapper_name:ident, $t:ty, $alg:expr ) => {\n /// Do NOT free the resulting pointer.\n... | rust | new_file | 0 | 2 | isc | 4aab7b3831b66d3311f5d69d54dc1f554167ba68 | briansmith/ring-ffi | src/lib.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test to prevent regression\n\nThe way it defines implementations is unrealistic though."
},
{
"role": "assistant",
"content": "// Copyright 2018 The Rust Project Developers. See the COPYRIGHT\n// file at the top-level directo... | rust | new_file | 0 | 0 | apache-2.0 | bbcb6339aa6f1062a220ce5d16fea3b645c32281 | GBGamer/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust | src/test/rustdoc/issue-53812.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for comparing md5 checksums"
},
{
"role": "assistant",
"content": "extern crate flac;\nextern crate crypto;\n\nuse crypto::digest::Digest;\nuse crypto::md5::Md5;\nuse flac::Stream;\nuse std::cmp;\n\nfn to_bytes(value: i32,... | rust | new_file | 0 | 2 | bsd-3-clause | 5631b23d2e707dd13fc739387a833f0d509a8f18 | sourrust/flac | tests/stream.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test file for distinct ty_native types\n\nThis should have gone into patch\n77f5d14f14630da997f13de28ea86e8320957180, had I not forgotten to add\nthe file."
},
{
"role": "assistant",
"content": "// error-pattern:expected nati... | rust | new_file | null | null | apache-2.0 | c59ebf0f018b748011fc9b23ce0bab3dcfcfe733 | nwin/rust,seanrivera/rust,mdinger/rust,mvdnes/rust,jbclements/rust,j16r/rust,dwillmer/rust,rprichard/rust,gifnksm/rust,mvdnes/rust,bombless/rust-docs-chinese,sae-bom/rust,omasanori/rust,GrahamDennis/rand,carols10cents/rust,arthurprs/rand,mvdnes/rust,pshc/rust,erickt/rust,aepsil0n/rust,dwillmer/rust,nwin/rust,zubron/rus... | src/test/compile-fail/native-type-mismatch.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add example for merge requests"
},
{
"role": "assistant",
"content": "\nextern crate gitlab_api as gitlab;\n\nuse std::env;\n#[macro_use]\nextern crate log;\nextern crate env_logger;\n\nuse gitlab::GitLab;\nuse gitlab::merge_reques... | rust | new_file | 0 | 3 | apache-2.0 | 3e80e6fe27c8ad82dc138918e96da5a84b637467 | nbigaouette/gitlab-api-rs,nbigaouette/gitlab-api-rs | examples/list_merge_requests.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add RMS example to the examples directory\n\nA similar example was already in the readme and the docs, but it is\nuseful to have a runnable program to test whether Hound can read a given\nfile."
},
{
"role": "assistant",
"content":... | rust | new_file | 0 | 3 | apache-2.0 | 1147c79c2fd8ad7e6ee9b13656f653c41380b4a5 | ruud-v-a/hound,ruuda/hound | examples/rms.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Test against accesses to uninitialized fields."
},
{
"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-... | rust | new_file | 2 | 1 | apache-2.0 | ae5fc76dceea5b03e400110315728a0baaa1a1f9 | aidancully/rust,graydon/rust,graydon/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,GBGamer/rust,GBGamer/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,graydon/rust | src/test/compile-fail/borrowck/borrowck-uninit-field-access.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a FIXME note about what's missing"
},
{
"role": "assistant",
"content": "// ignore-test\n\n#![allow(incomplete_features)]\n#![feature(const_mut_refs)]\n#![feature(inline_const)]\n\nuse std::marker::PhantomData;\n\n#[derive(Part... | rust | new_file | 2 | 2 | apache-2.0 | 4060ed7eff2dfb38ee8f9e3d2806f9d82c2cfc65 | 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/inline-const/const-match-pat-lifetime-err.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: test: Add a test for regions, traits, and variance.\n\nCloses #12470."
},
{
"role": "assistant",
"content": "// Copyright 2012 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 | 86dda1b6f3db582005a3138e6cc10eb924ad7da3 | jbclements/rust,P1start/rust,seanrivera/rust,TheNeikos/rust,stepancheg/rust-ide-rust,cllns/rust,TheNeikos/rust,sae-bom/rust,rohitjoshi/rust,graydon/rust,reem/rust,victorvde/rust,richo/rust,rohitjoshi/rust,zubron/rust,0x73/rust,omasanori/rust,avdi/rust,P1start/rust,bombless/rust,robertg/rust,aneeshusa/rust,mvdnes/rust,k... | src/test/compile-fail/regions-trait-variance.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add an unit test for add_global_mapping."
},
{
"role": "assistant",
"content": "extern crate libc;\nextern crate llvm;\n\nuse libc::c_void;\nuse llvm::*;\nuse std::mem;\n\npub extern \"C\" fn test_func3(x: f64) -> f64 {\n x\n}\n\n... | rust | new_file | 0 | 2 | bsd-3-clause | a40f3feaf420202a0b181b57ea302745b7de35e5 | hyunsik/llvm-rust | tests/engine.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for unsized tuple impls."
},
{
"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/CO... | rust | new_file | 0 | 1 | apache-2.0 | 728d26c8861265c15d997117be31ca2b9d3fa44b | aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust,aidancully/rust,GBGamer/rust,aidancully/rust,graydon/rust,GBGamer/rust | src/test/run-pass/unsized-tuple-impls.rs | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\n// xfail-stage0\n\n#[attr = \"val\"]\nconst int x = 10;\n\n#[attr = \"val\"]\nmod mod1 {\n}\n\n#[attr = \"val\"]\nnative \"rust\" mod rustrt {\n}\n\n#[attr = \"val\"]\ntype t = obj { };\n\n#[attr = \"val\"]\nobj o() { }\n\nfn main() {\n}\n```... | rust | edit | null | null | apache-2.0 | 6c6d7c3916fade4549caf4dd9380d23fc3d3d040 | sarojaba/rust-doc-korean,KokaKiwi/rust,bombless/rust,philyoon/rust,jroesch/rust,j16r/rust,untitaker/rust,jbclements/rust,rprichard/rust,jbclements/rust,michaelballantyne/rust-gpu,philyoon/rust,nwin/rust,emk/rust,XMPPwocky/rust,mahkoh/rust,emk/rust,kmcallister/rust,kwantam/rust,l0kod/rust,mitsuhiko/rust,servo/rust,mding... | src/test/run-pass/item-attributes.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```rust\n#![feature(custom_attribute)]\n#![allow(dead_code, unused_attributes)]\n\n#[miri_run]\nfn empty() -> &'static str {\n \"\"\n}\n\n#[miri_run]\nfn hello() -> &'static str {\n \"Hello, world!\"\n}\n\n#[miri_run]\nfn hello_bytes() -> &'stat... | rust | edit | 0 | 1 | apache-2.0 | 530315a220866df8c34c3a3551b4eef949eea23a | aidancully/rust,graydon/rust,graydon/rust,tsion/miri,GBGamer/rust,GBGamer/rust,rust-lang/miri,graydon/rust,aidancully/rust,GBGamer/rust,GBGamer/rust,aidancully/rust,rust-lang/miri,aidancully/rust,GBGamer/rust,GBGamer/rust,rust-lang/miri,rust-lang/miri,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/ru... | test/strings.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add test for macro disambiguators"
},
{
"role": "assistant",
"content": "#![crate_name = \"foo\"]\n#![deny(rustdoc::broken_intra_doc_links)]\n\n//! [foo!()]\n// @has foo/index.html '//a[@href=\"macro.foo.html\"]' 'foo!()'\n\n//! [f... | rust | new_file | 0 | 0 | apache-2.0 | f387e8c207b47f0da4fcaa675460745ab325f3f8 | graydon/rust,aidancully/rust,aidancully/rust,graydon/rust,graydon/rust,graydon/rust,aidancully/rust,graydon/rust,aidancully/rust,aidancully/rust,aidancully/rust,graydon/rust | src/test/rustdoc/intra-doc/macros-disambiguators.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add and xfail test for 2101"
},
{
"role": "assistant",
"content": "// xfail-test\nuse std;\nimport std::arena;\nimport std::arena::arena;\n\nenum hold { s(str) }\n\nfn init(ar: &a.arena::arena, str: str) -> &a.hold {\n new(*ar) ... | rust | new_file | null | null | apache-2.0 | 0b1675da16fc95ea3fc7a90632de088d6d7b99f9 | SiegeLord/rust,jroesch/rust,sarojaba/rust-doc-korean,sae-bom/rust,zubron/rust,sarojaba/rust-doc-korean,Ryman/rust,servo/rust,ejjeong/rust,cllns/rust,nham/rust,nwin/rust,pczarn/rust,miniupnp/rust,pelmers/rust,andars/rust,Ryman/rust,l0kod/rust,robertg/rust,philyoon/rust,erickt/rust,krzysz00/rust,AerialX/rust-rt-minimal,e... | src/test/run-pass/issue-2101.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add integration test for macro"
},
{
"role": "assistant",
"content": "//! Having these as an integration test checks that the visibility of the macros\n//! and their dependencies is valid for use by external libraries.\n\n#[macro_u... | rust | new_file | 0 | 1 | apache-2.0 | 52e391579275edb127426e1ce6ed58e24f99bc93 | Nemo157/hamlet,Nemo157/hamlet | tests/macros.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add support for Linux cooked-mode capture (LINKTYPE_LINUX_SLL) packets\n\nAdd support for Linux cooked-mode capture (LINKTYPE_LINUX_SLL) packets\r\n\r\nCloses #510"
},
{
"role": "assistant",
"content": "//! A Linux cooked-mode capt... | rust | new_file | null | null | apache-2.0 | a7b79d85f59a7f8e41d06fda772d278630fcfde6 | mrmonday/libpnet,mrmonday/libpnet,libpnet/libpnet,libpnet/libpnet,mrmonday/libpnet,mrmonday/libpnet,libpnet/libpnet,libpnet/libpnet | pnet_packet/src/sll.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add tests for null pointer opt."
},
{
"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/COPYRI... | rust | new_file | 0 | 0 | apache-2.0 | f48cc740017bac1214030300435dfa95dbaa220b | vhbit/rust,pelmers/rust,jashank/rust,ejjeong/rust,cllns/rust,philyoon/rust,richo/rust,l0kod/rust,l0kod/rust,TheNeikos/rust,rohitjoshi/rust,vhbit/rust,rohitjoshi/rust,jashank/rust,ebfull/rust,P1start/rust,reem/rust,mdinger/rust,andars/rust,kimroen/rust,zubron/rust,nham/rust,TheNeikos/rust,0x73/rust,zubron/rust,richo/rus... | src/test/run-pass/enum-null-pointer-opt.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 | 0 | 2 | apache-2.0 | 5fa788415fc5f7976e314ac2024f84f6e0196f98 | robertg/rust,jroesch/rust,mahkoh/rust,philyoon/rust,barosl/rust,fabricedesre/rust,P1start/rust,erickt/rust,pshc/rust,gifnksm/rust,andars/rust,jbclements/rust,XMPPwocky/rust,krzysz00/rust,pczarn/rust,quornian/rust,j16r/rust,andars/rust,miniupnp/rust,gifnksm/rust,quornian/rust,stepancheg/rust-ide-rust,ktossell/rust,ruud-... | src/test/run-pass/enum-alignment.rs | accepted | null | true |
[
{
"role": "user",
"content": "Write rust code for the following: Add tests for various ways to write 'do' and 'for' without args"
},
{
"role": "assistant",
"content": "// no-reformat\n// Testing various forms of `do` and `for` with empty arg lists\n\nfn f(f: fn() -> bool) {\n}\n\nfn main() {\n ... | rust | new_file | null | null | apache-2.0 | bfa43ca3011bd1296cb1797ad3ea1c5dc4056749 | fabricedesre/rust,jroesch/rust,LeoTestard/rust,SiegeLord/rust,aidancully/rust,rprichard/rust,aneeshusa/rust,ktossell/rust,krzysz00/rust,Ryman/rust,andars/rust,victorvde/rust,aepsil0n/rust,kmcallister/rust,sarojaba/rust-doc-korean,LeoTestard/rust,dinfuehr/rust,nwin/rust,l0kod/rust,bombless/rust-docs-chinese,sae-bom/rust... | src/test/run-pass/do-for-empty-args.rs | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Write rust code for the following: Add a test for exported symbols."
},
{
"role": "assistant",
"content": "// Copyright 2016 Mozilla\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n// this file except in compliance with the... | rust | new_file | 0 | 0 | apache-2.0 | 1dc8a3eaa0cc078dbade42ff2555f83867aae4bb | ncalexan/mentat,mozilla/mentat,ncalexan/mentat,ncalexan/mentat,ncalexan/datomish,ncalexan/mentat,ncalexan/datomish,mozilla/mentat,mozilla/mentat,mozilla/mentat,mozilla/mentat,ncalexan/mentat,ncalexan/mentat,mozilla/mentat | tests/api.rs | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.