-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reporting
Description
#[cfg(feature = "profile")]
pub struct TaskRecord {
start: Instant,
}
#[cfg(feature = "profile")]
pub type ProfilingReturnType = TaskRecord;
#[cfg(not(feature = "profile"))]
pub type ProfilingReturnType = ();
pub fn profile_task(name: &'static str) -> ProfilingReturnType {
#[cfg(feature = "profile")]
{ // Error start
TaskRecord {
start: Instant::now(),
}
} // Error end
#[cfg(not(feature = "profile"))]
let _ = name;
}rust-analyzer: "Remove this semicolon"
It says the error is at the marked region
Metadata
Metadata
Assignees
Labels
A-diagnosticsdiagnostics / error reportingdiagnostics / error reporting