8598: minor: fix ugly line wrapping in the rendered manual r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2021-04-20 07:45:04 +00:00 committed by GitHub
commit 1834938d6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -429,24 +429,32 @@ However, if you use some other build system, you'll have to describe the structu
[source,TypeScript] [source,TypeScript]
---- ----
interface JsonProject { interface JsonProject {
/// Path to the directory with *source code* of sysroot crates. /// Path to the directory with *source code* of
/// sysroot crates.
///
/// It should point to the directory where std,
/// core, and friends can be found:
/// ///
/// It should point to the directory where std, core, and friends can be found:
/// https://github.com/rust-lang/rust/tree/master/library. /// https://github.com/rust-lang/rust/tree/master/library.
/// ///
/// If provided, rust-analyzer automatically adds dependencies on sysroot /// If provided, rust-analyzer automatically adds
/// crates. Conversely, if you omit this path, you can specify sysroot /// dependencies on sysroot crates. Conversely,
/// dependencies yourself and, for example, have several different "sysroots" in /// if you omit this path, you can specify sysroot
/// one graph of crates. /// dependencies yourself and, for example, have
/// several different "sysroots" in one graph of
/// crates.
sysroot_src?: string; sysroot_src?: string;
/// The set of crates comprising the current project. /// The set of crates comprising the current
/// Must include all transitive dependencies as well as sysroot crate (libstd, libcore and such). /// project. Must include all transitive
/// dependencies as well as sysroot crate (libstd,
/// libcore and such).
crates: Crate[]; crates: Crate[];
} }
interface Crate { interface Crate {
/// Optional crate name used for display purposes, without affecting semantics. /// Optional crate name used for display purposes,
/// See the `deps` key for semantically-significant crate names. /// without affecting semantics. See the `deps`
/// key for semantically-significant crate names.
display_name?: string; display_name?: string;
/// Path to the root module of the crate. /// Path to the root module of the crate.
root_module: string; root_module: string;
@ -454,45 +462,59 @@ interface Crate {
edition: "2015" | "2018" | "2021"; edition: "2015" | "2018" | "2021";
/// Dependencies /// Dependencies
deps: Dep[]; deps: Dep[];
/// Should this crate be treated as a member of current "workspace". /// Should this crate be treated as a member of
/// current "workspace".
/// ///
/// By default, inferred from the `root_module` (members are the crates which reside /// By default, inferred from the `root_module`
/// inside the directory opened in the editor). /// (members are the crates which reside inside
/// the directory opened in the editor).
/// ///
/// Set this to `false` for things like standard library and 3rd party crates to /// Set this to `false` for things like standard
/// enable performance optimizations (rust-analyzer assumes that non-member crates /// library and 3rd party crates to enable
/// don't change). /// performance optimizations (rust-analyzer
/// assumes that non-member crates don't change).
is_workspace_member?: boolean; is_workspace_member?: boolean;
/// Optionally specify the (super)set of `.rs` files comprising this crate. /// Optionally specify the (super)set of `.rs`
/// files comprising this crate.
/// ///
/// By default, rust-analyzer assumes that only files under `root_module.parent` can belong to a crate. /// By default, rust-analyzer assumes that only
/// `include_dirs` are included recursively, unless a subdirectory is in `exclude_dirs`. /// files under `root_module.parent` can belong
/// to a crate. `include_dirs` are included
/// recursively, unless a subdirectory is in
/// `exclude_dirs`.
/// ///
/// Different crates can share the same `source`. /// Different crates can share the same `source`.
/// ///
/// If two crates share an `.rs` file in common, they *must* have the same `source`. /// If two crates share an `.rs` file in common,
/// rust-analyzer assumes that files from one source can't refer to files in another source. /// they *must* have the same `source`.
/// rust-analyzer assumes that files from one
/// source can't refer to files in another source.
source?: { source?: {
include_dirs: string[], include_dirs: string[],
exclude_dirs: string[], exclude_dirs: string[],
}, },
/// The set of cfgs activated for a given crate, like `["unix", "feature=\"foo\"", "feature=\"bar\""]`. /// The set of cfgs activated for a given crate, like
/// `["unix", "feature=\"foo\"", "feature=\"bar\""]`.
cfg: string[]; cfg: string[];
/// Target triple for this Crate. /// Target triple for this Crate.
/// ///
/// Used when running `rustc --print cfg` to get target-specific cfgs. /// Used when running `rustc --print cfg`
/// to get target-specific cfgs.
target?: string; target?: string;
/// Environment variables, used for the `env!` macro /// Environment variables, used for
/// the `env!` macro
env: : { [key: string]: string; }, env: : { [key: string]: string; },
/// For proc-macro crates, path to compiles proc-macro (.so file). /// For proc-macro crates, path to compiled
/// proc-macro (.so file).
proc_macro_dylib_path?: string; proc_macro_dylib_path?: string;
} }
interface Dep { interface Dep {
/// Index of a crate in the `crates` array. /// Index of a crate in the `crates` array.
crate: number, crate: number,
/// Name as should appear in the (implicit) `extern crate name` declaration. /// Name as should appear in the (implicit)
/// `extern crate name` declaration.
name: string, name: string,
} }
---- ----