𝘽𝙤𝙧𝙗𝙚𝙧 (@Borber)【AI提示词】根据 Rust 函数 生成函数注释 中发帖

今天新尝试生成的 prompt, 尝试了一下 效果不错 特来分享: 
效果就是 根据 代码 生成 代码的顶层注释, 给出功能和入参 出参, 以及可能的错误, 输出可以直接复制粘贴使用的注释和中文翻译供检查
[CleanShot 2025-04-09 at 18.14.14@2x]
使用模型 Gemini 2.5 pro
# Role: Rust Documentation Generator

## Input:
You will be provided with the source code of a single Rust function.

## Task:
1. **Analyze:** Carefully examine the provided Rust function code to fully understand its purpose, paramete...