mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
internal: Remove unnecessary Arc allocations in macro_expand
This commit is contained in:
parent
426d2842c1
commit
3fc043ce9b
6 changed files with 40 additions and 19 deletions
|
@ -5,6 +5,7 @@ import * as vscode from "vscode";
|
|||
import type { Env } from "./client";
|
||||
import { log } from "./util";
|
||||
import { expectNotUndefined, unwrapUndefinable } from "./undefinable";
|
||||
import type { JsonProject } from "./rust_project";
|
||||
|
||||
export type RunnableEnvCfgItem = {
|
||||
mask?: string;
|
||||
|
|
|
@ -23,6 +23,7 @@ import { execRevealDependency } from "./commands";
|
|||
import { PersistentState } from "./persistent_state";
|
||||
import { bootstrap } from "./bootstrap";
|
||||
import type { RustAnalyzerExtensionApi } from "./main";
|
||||
import type { JsonProject } from "./rust_project";
|
||||
|
||||
// We only support local folders, not eg. Live Share (`vlsl:` scheme), so don't activate if
|
||||
// only those are in use. We use "Empty" to represent these scenarios
|
||||
|
|
|
@ -6,6 +6,7 @@ import { type CommandFactory, Ctx, fetchWorkspace } from "./ctx";
|
|||
import * as diagnostics from "./diagnostics";
|
||||
import { activateTaskProvider } from "./tasks";
|
||||
import { setContextValue } from "./util";
|
||||
import type { JsonProject } from "./rust_project";
|
||||
|
||||
const RUST_PROJECT_CONTEXT_NAME = "inRustProject";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
interface JsonProject {
|
||||
export interface JsonProject {
|
||||
/// Path to the directory with *source code* of
|
||||
/// sysroot crates.
|
||||
///
|
||||
|
@ -21,7 +21,7 @@ interface JsonProject {
|
|||
crates: Crate[];
|
||||
}
|
||||
|
||||
interface Crate {
|
||||
export interface Crate {
|
||||
/// Optional crate name used for display purposes,
|
||||
/// without affecting semantics. See the `deps`
|
||||
/// key for semantically-significant crate names.
|
||||
|
@ -82,7 +82,7 @@ interface Crate {
|
|||
proc_macro_dylib_path?: string;
|
||||
}
|
||||
|
||||
interface Dep {
|
||||
export interface Dep {
|
||||
/// Index of a crate in the `crates` array.
|
||||
crate: number;
|
||||
/// Name as should appear in the (implicit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue