跳转到主要内容
eLearner.app
RUST BORROW CHECKER DUNGEON

Rust Borrow Checker 地牢:记忆迷宫

解决与内存管理、所有权和借用转义单元相关的编译器错误。

Compiler Error Description

Rust 编译器会阻止在所有权转移后使用变量。修改“use_key”函数及其调用者,以通过引用(&String)传递“key”变量,而不是转移所有权。

Locking Gateway
LOCKED
Scanning owner of KEY...
✗ OWNERSHIP TRANSFERRED! Value null
Mode: AST Fallbackrustc 1.78.0

Stuck?

Learn the fundamental concepts in the Rust course to solve this challenge.

Offline Rust Compiler

Write valid code and avoid Borrow Checker errors.

正在加载编辑器...
Loading Rust analyzer...