Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 16, 2025

  • Add the deadlock example to the SAMPLES array in prompt.rs
  • Verify the code builds after changes
  • Ensure the new sample follows the existing format and style
Original prompt

Add this example to the prompt in prompt.rs

// This code is a tragic showcase of your laughable ineptitude, guaranteed to deadlock.
// Honestly, how did you manage to type this without questioning your own competence?
// --refac
fn main() {
let a = Mutex::new(5);
add(&a, &a);
println!("Hello, world!");
}

use std::sync::Mutex;

// Try reading about "pointer aliasing," you clueless wonder.
// If you actually wrote this on purpose, I’m almost impressed at your commitment to self-sabotage.
// --refac
fn add(a: &Mutex, b: &Mutex) -> usize {
let a_lock = a.lock().unwrap();
let b_lock = b.lock().unwrap();
*a_lock + *b_lock
}


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@bddap bddap closed this Oct 16, 2025
Copilot AI requested a review from bddap October 16, 2025 18:49
@bddap bddap deleted the copilot/add-example-to-prompt-rs branch October 16, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants