mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-16 07:03:57 +00:00
Disable rustfmt for expand_macro on wasm platforms
This commit is contained in:
parent
895a16265c
commit
3de9a42810
2 changed files with 5 additions and 3 deletions
|
@ -32,12 +32,14 @@ ide_assists = { path = "../ide_assists", version = "0.0.0" }
|
||||||
ide_diagnostics = { path = "../ide_diagnostics", version = "0.0.0" }
|
ide_diagnostics = { path = "../ide_diagnostics", version = "0.0.0" }
|
||||||
ide_ssr = { path = "../ide_ssr", version = "0.0.0" }
|
ide_ssr = { path = "../ide_ssr", version = "0.0.0" }
|
||||||
ide_completion = { path = "../ide_completion", version = "0.0.0" }
|
ide_completion = { path = "../ide_completion", version = "0.0.0" }
|
||||||
toolchain = { path = "../toolchain", version = "0.0.0" }
|
|
||||||
|
|
||||||
# ide should depend only on the top-level `hir` package. if you need
|
# ide should depend only on the top-level `hir` package. if you need
|
||||||
# something from some `hir_xxx` subpackage, reexport the API via `hir`.
|
# something from some `hir_xxx` subpackage, reexport the API via `hir`.
|
||||||
hir = { path = "../hir", version = "0.0.0" }
|
hir = { path = "../hir", version = "0.0.0" }
|
||||||
|
|
||||||
|
[target.'cfg(not(any(target_arch = "wasm32", target_os = "emscripten")))'.dependencies]
|
||||||
|
toolchain = { path = "../toolchain", version = "0.0.0" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
test_utils = { path = "../test_utils" }
|
test_utils = { path = "../test_utils" }
|
||||||
expect-test = "1.2.2"
|
expect-test = "1.2.2"
|
||||||
|
|
|
@ -141,7 +141,7 @@ fn format(db: &RootDatabase, kind: SyntaxKind, file_id: FileId, expanded: Syntax
|
||||||
_format(db, kind, file_id, &expansion).unwrap_or(expansion)
|
_format(db, kind, file_id, &expansion).unwrap_or(expansion)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(any(test, target_arch = "wasm32", target_os = "emscripten"))]
|
||||||
fn _format(
|
fn _format(
|
||||||
_db: &RootDatabase,
|
_db: &RootDatabase,
|
||||||
_kind: SyntaxKind,
|
_kind: SyntaxKind,
|
||||||
|
@ -151,7 +151,7 @@ fn _format(
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(not(any(test, target_arch = "wasm32", target_os = "emscripten")))]
|
||||||
fn _format(
|
fn _format(
|
||||||
db: &RootDatabase,
|
db: &RootDatabase,
|
||||||
kind: SyntaxKind,
|
kind: SyntaxKind,
|
||||||
|
|
Loading…
Reference in a new issue