chore(deps): update rust crate annotate-snippets to 0.12.1

This commit is contained in:
Scott Schafer 2025-08-28 12:13:13 -06:00
parent 96aec67d25
commit d36c326926
No known key found for this signature in database
29 changed files with 118 additions and 170 deletions

5
Cargo.lock generated
View File

@ -40,11 +40,12 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
[[package]]
name = "annotate-snippets"
version = "0.11.5"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "710e8eae58854cdc1790fcb56cca04d712a17be849eeb81da2a724bf4bae2bc4"
checksum = "7a851f39ec7e23bf1c30faf3844a496fee4db701f5f840f68d1f78f00e697892"
dependencies = [
"anstyle",
"memchr",
"unicode-width",
]

View File

@ -18,7 +18,7 @@ homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo"
[workspace.dependencies]
annotate-snippets = "0.11.5"
annotate-snippets = { version = "0.12.1", features = ["simd"] }
anstream = "0.6.20"
anstyle = "1.0.11"
anyhow = "1.0.98"

View File

@ -2,7 +2,7 @@ use std::fmt;
use std::io::IsTerminal;
use std::io::prelude::*;
use annotate_snippets::{Message, Renderer};
use annotate_snippets::{Renderer, Report};
use anstream::AutoStream;
use anstyle::Style;
@ -406,8 +406,8 @@ impl Shell {
Ok(())
}
/// Prints the passed in [Message] to stderr
pub fn print_message(&mut self, message: Message<'_>) -> std::io::Result<()> {
/// Prints the passed in [`Report`] to stderr
pub fn print_report(&mut self, report: Report<'_>) -> std::io::Result<()> {
let term_width = self
.err_width()
.diagnostic_terminal_width()
@ -415,7 +415,7 @@ impl Shell {
writeln!(
self.err(),
"{}",
Renderer::styled().term_width(term_width).render(message)
Renderer::styled().term_width(term_width).render(report)
)
}
}

View File

@ -1,6 +1,6 @@
use crate::core::{Edition, Feature, Features, Manifest, Package};
use crate::{CargoResult, GlobalContext};
use annotate_snippets::{Level, Snippet};
use annotate_snippets::{AnnotationKind, Group, Level, Snippet};
use cargo_util_schemas::manifest::{TomlLintLevel, TomlToolLints};
use pathdiff::diff_paths;
use std::fmt::Display;
@ -145,32 +145,33 @@ fn verify_feature_enabled(
panic!("could not find `cargo::{lint_name}` in `[lints]`, or `[workspace.lints]` ")
};
let mut message = Level::Error
.title(&title)
.snippet(
Snippet::source(contents)
.origin(path)
.annotation(Level::Error.span(span.key).label(&label))
.fold(true),
)
.footer(Level::Help.title(&help));
let mut report = Vec::new();
report.push(
Group::with_title(Level::ERROR.primary_title(title))
.element(
Snippet::source(contents)
.path(path)
.annotation(AnnotationKind::Primary.span(span.key).label(label)),
)
.element(Level::HELP.message(help)),
);
if let Some(inherit_span) = get_key_value_span(manifest.document(), &["lints", "workspace"])
{
message = message.footer(
Level::Note.title(&second_title).snippet(
report.push(
Group::with_title(Level::NOTE.secondary_title(second_title)).element(
Snippet::source(manifest.contents())
.origin(&manifest_path)
.path(manifest_path)
.annotation(
Level::Note.span(inherit_span.key.start..inherit_span.value.end),
)
.fold(true),
AnnotationKind::Context
.span(inherit_span.key.start..inherit_span.value.end),
),
),
);
}
*error_count += 1;
gctx.shell().print_message(message)?;
gctx.shell().print_report(&report)?;
}
Ok(())
}
@ -330,12 +331,12 @@ impl LintLevel {
self == &LintLevel::Forbid || self == &LintLevel::Deny
}
pub fn to_diagnostic_level(self) -> Level {
pub fn to_diagnostic_level(self) -> Level<'static> {
match self {
LintLevel::Allow => unreachable!("allow does not map to a diagnostic level"),
LintLevel::Warn => Level::Warning,
LintLevel::Deny => Level::Error,
LintLevel::Forbid => Level::Error,
LintLevel::Warn => Level::WARNING,
LintLevel::Deny => Level::ERROR,
LintLevel::Forbid => Level::ERROR,
}
}
}
@ -450,17 +451,15 @@ pub fn check_im_a_teapot(
let span = get_key_value_span(manifest.document(), &["package", "im-a-teapot"]).unwrap();
let message = level
.title(IM_A_TEAPOT.desc)
.snippet(
let report = &[Group::with_title(level.primary_title(IM_A_TEAPOT.desc))
.element(
Snippet::source(manifest.contents())
.origin(&manifest_path)
.annotation(level.span(span.key.start..span.value.end))
.fold(true),
.path(&manifest_path)
.annotation(AnnotationKind::Primary.span(span.key.start..span.value.end)),
)
.footer(Level::Note.title(&emitted_reason));
.element(Level::NOTE.message(&emitted_reason))];
gctx.shell().print_message(message)?;
gctx.shell().print_report(report)?;
}
Ok(())
}
@ -540,37 +539,36 @@ fn output_unknown_lints(
panic!("could not find `cargo::{lint_name}` in `[lints]`, or `[workspace.lints]` ")
};
let mut message = level.title(&title).snippet(
let mut report = Vec::new();
let mut group = Group::with_title(level.clone().primary_title(title)).element(
Snippet::source(contents)
.origin(path)
.annotation(Level::Error.span(span.key))
.fold(true),
.path(path)
.annotation(AnnotationKind::Primary.span(span.key)),
);
if emitted_source.is_none() {
emitted_source = Some(UNKNOWN_LINTS.emitted_source(lint_level, reason));
message = message.footer(Level::Note.title(emitted_source.as_ref().unwrap()));
group = group.element(Level::NOTE.message(emitted_source.as_ref().unwrap()));
}
if let Some(help) = help.as_ref() {
message = message.footer(Level::Help.title(help));
group = group.element(Level::HELP.message(help));
}
report.push(group);
if let Some(inherit_span) = get_key_value_span(manifest.document(), &["lints", "workspace"])
{
message = message.footer(
Level::Note.title(&second_title).snippet(
report.push(
Group::with_title(Level::NOTE.secondary_title(second_title)).element(
Snippet::source(manifest.contents())
.origin(&manifest_path)
.path(manifest_path)
.annotation(
Level::Note.span(inherit_span.key.start..inherit_span.value.end),
)
.fold(true),
AnnotationKind::Context
.span(inherit_span.key.start..inherit_span.value.end),
),
),
)
);
}
gctx.shell().print_message(message)?;
gctx.shell().print_report(&report)?;
}
Ok(())

View File

@ -1,4 +1,4 @@
use annotate_snippets::{Level, Snippet};
use annotate_snippets::{AnnotationKind, Group, Level, Snippet};
use std::borrow::Cow;
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::ffi::OsStr;
@ -1879,12 +1879,11 @@ fn missing_dep_diagnostic(
"`{}` is an unused optional dependency since no feature enables it",
&dep_name
);
let message = Level::Error.title(&title);
let snippet = Snippet::source(&contents)
.origin(&manifest_path)
.fold(true)
.annotation(Level::Error.span(feature_span.value));
let message = if missing_dep.weak_optional {
let group = Group::with_title(Level::ERROR.primary_title(&title));
let snippet = Snippet::source(contents)
.path(manifest_path)
.annotation(AnnotationKind::Primary.span(feature_span.value));
let group = if missing_dep.weak_optional {
let mut orig_deps = vec![
(
orig_toml.dependencies.as_ref(),
@ -1920,17 +1919,20 @@ fn missing_dep_diagnostic(
.collect::<Vec<_>>();
let dep_span = get_key_value_span(&document, &toml_path).unwrap();
message
.snippet(snippet.annotation(Level::Warning.span(dep_span.key).label(&info_label)))
.footer(Level::Help.title(&help))
group
.element(
snippet
.annotation(AnnotationKind::Context.span(dep_span.key).label(info_label)),
)
.element(Level::HELP.message(help))
} else {
message.snippet(snippet)
group.element(snippet)
}
} else {
message.snippet(snippet)
group.element(snippet)
};
if let Err(err) = gctx.shell().print_message(message) {
if let Err(err) = gctx.shell().print_report(&[group]) {
return Err(err.into());
}
Err(AlreadyPrintedError::new(anyhow!("").into()).into())
@ -2792,13 +2794,13 @@ fn emit_diagnostic(
.unwrap_or_else(|| manifest_file.to_path_buf())
.display()
.to_string();
let message = Level::Error.title(e.message()).snippet(
let group = Group::with_title(Level::ERROR.primary_title(e.message())).element(
Snippet::source(contents)
.origin(&manifest_path)
.fold(true)
.annotation(Level::Error.span(span)),
.path(manifest_path)
.annotation(AnnotationKind::Primary.span(span)),
);
if let Err(err) = gctx.shell().print_message(message) {
if let Err(err) = gctx.shell().print_report(&[group]) {
return err.into();
}
return AlreadyPrintedError::new(e.into()).into();

View File

@ -749,13 +749,12 @@ fn bad_registry_name() {
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] invalid character ` ` in registry name: `bad name`, characters must be Unicode XID characters (numbers, `-`, `_`, or most letters)
--> Cargo.toml:8:17
|
8 | [dependencies.bar]
| ^^^^^^^^^^^^^^^^^^
|
"#]])
.run();
@ -1976,13 +1975,12 @@ fn empty_dependency_registry() {
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] registry name cannot be empty
--> Cargo.toml:8:23
|
8 | bar = { version = "0.1.0", registry = "" }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
"#]])
.run();

View File

@ -455,11 +455,12 @@ fn malformed_override() {
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] newlines are unsupported in inline tables, expected nothing
--> Cargo.toml:9:27
|
9 | native = {
| ^
|
--> Cargo.toml:9:27
|
9 | native = {
| ___________________________^
10 | | foo: "bar"
| |_^
"#]])
.run();
@ -2635,7 +2636,6 @@ fn bad_dependency() {
|
9 | bar = 3
| ^
|
"#]])
.run();
@ -2664,13 +2664,12 @@ fn bad_dependency_true_literal() {
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] invalid type: boolean `true`, expected a version string like "0.9.8" or a detailed dependency like { version = "0.9.8" }
[NOTE] if you meant to use a workspace member, you can write
dep.workspace = true
[NOTE] if you meant to use a workspace member, you can write
dep.workspace = true
--> Cargo.toml:9:23
|
9 | bar = true
| ^^^^
|
"#]])
.run();
@ -2703,7 +2702,6 @@ fn bad_debuginfo() {
|
9 | debug = 'a'
| ^^^
|
"#]])
.run();
@ -2736,7 +2734,6 @@ fn bad_debuginfo2() {
|
9 | debug = 3.6
| ^^^
|
"#]])
.run();
@ -2767,7 +2764,6 @@ fn bad_opt_level() {
|
7 | build = 3
| ^
|
"#]])
.run();
@ -3067,7 +3063,6 @@ fn bad_trim_paths() {
|
8 | trim-paths = "split-debuginfo"
| ^^^^^^^^^^^^^^^^^
|
"#]])
.run();

View File

@ -423,7 +423,6 @@ fn cargo_compile_with_invalid_manifest2() {
|
3 | foo = bar
| ^^^
|
"#]])
.run();
@ -441,7 +440,6 @@ fn cargo_compile_with_invalid_manifest3() {
|
1 | a = bar
| ^^^
|
"#]])
.run();
@ -496,7 +494,6 @@ fn cargo_compile_with_invalid_version() {
|
4 | version = "1.0"
| ^^^^^
|
"#]])
.run();
@ -516,7 +513,6 @@ fn cargo_compile_with_empty_package_name() {
|
3 | name = ""
| ^^
|
"#]])
.run();
@ -536,7 +532,6 @@ fn cargo_compile_with_invalid_package_name() {
|
3 | name = "foo@bar"
| ^^^^^^^^^
|
"#]])
.run();
@ -1317,7 +1312,6 @@ fn cargo_compile_with_invalid_dep_rename() {
|
8 | "haha this isn't a valid name 🐛" = { package = "libc", version = "0.1" }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
"#]])
.run();

View File

@ -1,4 +1,4 @@
<svg width="740px" height="146px" xmlns="http://www.w3.org/2000/svg">
<svg width="740px" height="128px" xmlns="http://www.w3.org/2000/svg">
<style>
.fg { fill: #AAAAAA }
.bg { background: #000000 }
@ -19,19 +19,17 @@
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
<text xml:space="preserve" class="container fg">
<tspan x="10px" y="28px"><tspan class="fg-bright-red bold">error</tspan><tspan>: </tspan><tspan class="bold">invalid float, expected `inf`</tspan>
<tspan x="10px" y="28px"><tspan class="fg-bright-red bold">error</tspan><tspan class="bold">: invalid float, expected `inf`</tspan>
</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt;</tspan><tspan> Cargo.toml:9:7</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt; </tspan><tspan>Cargo.toml:9:7</tspan>
</tspan>
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">9 |</tspan><tspan> key = invalid-value</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">9</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> key = invalid-value</tspan>
</tspan>
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^^^^^^^</tspan>
</tspan>
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="136px">
<tspan x="10px" y="118px">
</tspan>
</text>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -739,7 +739,6 @@ fn wrong_position() {
|
6 | cargo-features = ["test-dummy-unstable"]
| ^^^^^^^^^^^^^^^^^^^^^^^
|
"#]])
.run();

View File

@ -26,7 +26,6 @@ edition = "2021"
|
6 | [[bench.foo]]
| ^^^^^
|
"#]])
.run();

View File

@ -99,7 +99,6 @@ fn empty_feature_name() {
|
9 | "" = []
| ^^
|
"#]])
.run();
@ -348,7 +347,6 @@ fn feature_activates_missing_dep_feature() {
|
9 | foo = ["bar/baz"]
| ^^^^^^^^^^^
|
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
"#]])
@ -383,7 +381,6 @@ fn feature_activates_feature_inside_feature() {
|
9 | foo = ["bar/baz"]
| ^^^^^^^^^^^
|
[ERROR] failed to parse manifest at `[ROOT]/foo/Cargo.toml`
"#]])
@ -2306,7 +2303,6 @@ fn invalid_feature_names_error() {
|
9 | "+foo" = []
| ^^^^^^
|
"#]])
.run();
@ -2333,7 +2329,6 @@ fn invalid_feature_names_error() {
|
9 | "a&b" = []
| ^^^^^
|
"#]])
.run();
@ -2366,7 +2361,6 @@ fn invalid_feature_name_slash_error() {
|
8 | "foo/bar" = []
| ^^^^^^^^^
|
"#]])
.run();

View File

@ -461,7 +461,6 @@ fn crate_syntax_bad_name() {
|
11 | "dep:bar" = []
| ^^^^^^^^^
|
"#]])
.run();

View File

@ -1282,7 +1282,6 @@ fn unused_ambiguous_published_deps() {
|
2 | [package
| ^
|
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[RUNNING] `target/debug/foo[EXE]`
@ -2813,7 +2812,6 @@ fn invalid_git_dependency_manifest() {
|
9 | categories = ["algorithms"]
| ^^^^^^^^^^
|
[ERROR] failed to get `dep1` as a dependency of package `foo v0.5.0 ([ROOT]/foo)`
Caused by:

View File

@ -1327,7 +1327,6 @@ fn error_workspace_false() {
|
8 | description = { workspace = false }
| ^^^^^
|
"#]])
.run();
@ -1410,9 +1409,8 @@ fn error_malformed_workspace_root() {
[ERROR] unclosed array, expected `]`
--> ../Cargo.toml:4:13
|
4 | ...
| ^
|
4 |
| ^
"#]])
.run();

View File

@ -2161,13 +2161,11 @@ fn git_install_reads_workspace_manifest() {
|
6 | incremental = 3
| ^
|
[ERROR] invalid type: integer `3`, expected a boolean
--> home/.cargo/git/checkouts/foo-[HASH]/[..]/Cargo.toml:6:27
|
6 | incremental = 3
| ^
|
"#]])
.run();

View File

@ -3,7 +3,6 @@
.fg { fill: #AAAAAA }
.bg { background: #000000 }
.fg-bright-blue { fill: #5555FF }
.fg-bright-green { fill: #55FF55 }
.fg-bright-red { fill: #FF5555 }
.container {
padding: 0 10px;
@ -20,19 +19,19 @@
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
<text xml:space="preserve" class="container fg">
<tspan x="10px" y="28px"><tspan class="fg-bright-red bold">error</tspan><tspan>: </tspan><tspan class="bold">`im_a_teapot` is specified</tspan>
<tspan x="10px" y="28px"><tspan class="fg-bright-red bold">error</tspan><tspan class="bold">: `im_a_teapot` is specified</tspan>
</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt;</tspan><tspan> Cargo.toml:9:1</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt; </tspan><tspan>Cargo.toml:9:1</tspan>
</tspan>
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">9 |</tspan><tspan> im-a-teapot = true</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">9</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> im-a-teapot = true</tspan>
</tspan>
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^^^^^^^^^^^^</tspan>
</tspan>
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="fg-bright-green bold">note</tspan><tspan>: `cargo::im_a_teapot` is set to `deny` in `[lints]`</tspan>
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: `cargo::im_a_teapot` is set to `deny` in `[lints]`</tspan>
</tspan>
<tspan x="10px" y="154px">
</tspan>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1,9 +1,8 @@
<svg width="818px" height="290px" xmlns="http://www.w3.org/2000/svg">
<svg width="818px" height="272px" xmlns="http://www.w3.org/2000/svg">
<style>
.fg { fill: #AAAAAA }
.bg { background: #000000 }
.fg-bright-blue { fill: #5555FF }
.fg-bright-cyan { fill: #55FFFF }
.fg-bright-green { fill: #55FF55 }
.fg-bright-red { fill: #FF5555 }
.fg-red { fill: #AA0000 }
@ -22,35 +21,33 @@
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
<text xml:space="preserve" class="container fg">
<tspan x="10px" y="28px"><tspan class="fg-bright-red bold">error</tspan><tspan>: </tspan><tspan class="bold">use of unstable lint `im_a_teapot`</tspan>
<tspan x="10px" y="28px"><tspan class="fg-bright-red bold">error</tspan><tspan class="bold">: use of unstable lint `im_a_teapot`</tspan>
</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt;</tspan><tspan> Cargo.toml:6:1</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt; </tspan><tspan>Cargo.toml:6:1</tspan>
</tspan>
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">6 |</tspan><tspan> im_a_teapot = { level = "warn", priority = 10 }</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">6</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> im_a_teapot = { level = "warn", priority = 10 }</tspan>
</tspan>
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-red bold">^^^^^^^^^^^</tspan><tspan> </tspan><tspan class="fg-bright-red bold">this is behind `test-dummy-unstable`, which is not enabled</tspan>
</tspan>
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="fg-bright-cyan bold">help</tspan><tspan>: consider adding `cargo-features = ["test-dummy-unstable"]` to the top of the manifest</tspan>
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">help</tspan><tspan>: consider adding `cargo-features = ["test-dummy-unstable"]` to the top of the manifest</tspan>
</tspan>
<tspan x="10px" y="154px"><tspan class="fg-bright-green bold">note</tspan><tspan>: </tspan><tspan class="bold">`cargo::im_a_teapot` was inherited</tspan>
<tspan x="10px" y="154px"><tspan class="fg-bright-green bold">note</tspan><tspan>: `cargo::im_a_teapot` was inherited</tspan>
</tspan>
<tspan x="10px" y="172px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt;</tspan><tspan> foo/Cargo.toml:9:1</tspan>
<tspan x="10px" y="172px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt; </tspan><tspan>foo/Cargo.toml:9:1</tspan>
</tspan>
<tspan x="10px" y="190px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="208px"><tspan class="fg-bright-blue bold">9 |</tspan><tspan> workspace = true</tspan>
<tspan x="10px" y="208px"><tspan class="fg-bright-blue bold">9</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> workspace = true</tspan>
</tspan>
<tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-green bold">----------------</tspan>
<tspan x="10px" y="226px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">----------------</tspan>
</tspan>
<tspan x="10px" y="244px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
<tspan x="10px" y="244px"><tspan class="fg-red bold">error</tspan><tspan class="bold">:</tspan><tspan> encountered 1 errors(s) while verifying lints</tspan>
</tspan>
<tspan x="10px" y="262px"><tspan class="fg-red bold">error</tspan><tspan class="bold">:</tspan><tspan> encountered 1 errors(s) while verifying lints</tspan>
</tspan>
<tspan x="10px" y="280px">
<tspan x="10px" y="262px">
</tspan>
</text>

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -305,7 +305,6 @@ workspace = true
|
9 | workspace = true
| ----------------
|
[ERROR] use of unstable lint `test_dummy_unstable`
--> Cargo.toml:7:1
|
@ -318,7 +317,6 @@ workspace = true
|
9 | workspace = true
| ----------------
|
[ERROR] encountered 2 errors(s) while verifying lints
"#]])

View File

@ -82,7 +82,6 @@ workspace = true
|
9 | workspace = true
| ----------------
|
[CHECKING] foo v0.0.1 ([ROOT]/foo/foo)
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s

View File

@ -3,7 +3,6 @@
.fg { fill: #AAAAAA }
.bg { background: #000000 }
.fg-bright-blue { fill: #5555FF }
.fg-bright-green { fill: #55FF55 }
.fg-green { fill: #00AA00 }
.fg-yellow { fill: #AA5500 }
.container {
@ -21,19 +20,19 @@
<rect width="100%" height="100%" y="0" rx="4.5" class="bg" />
<text xml:space="preserve" class="container fg">
<tspan x="10px" y="28px"><tspan class="fg-yellow bold">warning</tspan><tspan>: </tspan><tspan class="bold">`im_a_teapot` is specified</tspan>
<tspan x="10px" y="28px"><tspan class="fg-yellow bold">warning</tspan><tspan class="bold">: `im_a_teapot` is specified</tspan>
</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt;</tspan><tspan> Cargo.toml:9:1</tspan>
<tspan x="10px" y="46px"><tspan> </tspan><tspan class="fg-bright-blue bold">--&gt; </tspan><tspan>Cargo.toml:9:1</tspan>
</tspan>
<tspan x="10px" y="64px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">9 |</tspan><tspan> im-a-teapot = true</tspan>
<tspan x="10px" y="82px"><tspan class="fg-bright-blue bold">9</tspan><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> im-a-teapot = true</tspan>
</tspan>
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-yellow bold">------------------</tspan>
<tspan x="10px" y="100px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan><tspan> </tspan><tspan class="fg-yellow bold">^^^^^^^^^^^^^^^^^^</tspan>
</tspan>
<tspan x="10px" y="118px"><tspan> </tspan><tspan class="fg-bright-blue bold">|</tspan>
</tspan>
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="fg-bright-green bold">note</tspan><tspan>: `cargo::im_a_teapot` is set to `warn` in `[lints]`</tspan>
<tspan x="10px" y="136px"><tspan> </tspan><tspan class="fg-bright-blue bold">= </tspan><tspan class="bold">note</tspan><tspan>: `cargo::im_a_teapot` is set to `warn` in `[lints]`</tspan>
</tspan>
<tspan x="10px" y="154px"><tspan class="fg-green bold"> Checking</tspan><tspan> foo v0.0.1 ([ROOT]/foo)</tspan>
</tspan>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -79,7 +79,6 @@ fn malformed_on_stable() {
|
2 | lints = 20
| ^^
|
"#]])
.run();
@ -139,7 +138,6 @@ fn invalid_type_in_lint_value() {
|
8 | rust-2018-idioms = -1
| ^^
|
"#]])
.run();
@ -342,7 +340,6 @@ pub fn foo(num: i32) -> u32 {
|
9 | workspace = false
| ^^^^^
|
"#]])
.run();
@ -832,7 +829,7 @@ im_a_teapot = "warn"
--> Cargo.toml:9:1
|
9 | im-a-teapot = true
| ------------------
| ^^^^^^^^^^^^^^^^^^
|
= [NOTE] `cargo::im_a_teapot` is set to `warn` in `[lints]`
[CHECKING] foo v0.0.1 ([ROOT]/foo)

View File

@ -55,7 +55,6 @@ fn toml_deserialize_manifest_error() {
|
8 | foobar == "0.55"
| ^
|
[ERROR] failed to load manifest for dependency `bar`
"#]])

View File

@ -2111,7 +2111,6 @@ fn cargo_metadata_with_invalid_authors_field() {
|
3 | authors = ""
| ^^
|
"#]])
.run();
@ -2138,7 +2137,6 @@ fn cargo_metadata_with_invalid_version_field() {
|
3 | version = 1
| ^
|
"#]])
.run();
@ -2165,7 +2163,6 @@ fn cargo_metadata_with_invalid_publish_field() {
|
3 | publish = "foo"
| ^^^^^
|
"#]])
.run();

View File

@ -1097,13 +1097,12 @@ fn invalid_base() {
.with_stderr_data(
"\
[ERROR] invalid character `^` in path base name: `^^not-valid^^`, the first character must be a Unicode XID start character (most letters or `_`)
--> Cargo.toml:10:23
|
10 | bar = { base = '^^not-valid^^', path = 'bar' }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
",
)
.run();

View File

@ -87,7 +87,6 @@ fn invalid_profile_name() {
|
8 | [profile.'.release-lto']
| ^^^^^^^^^^^^^^
|
"#]])
.run();
@ -589,13 +588,12 @@ See https://doc.rust-lang.org/cargo/reference/profiles.html for more on configur
.with_stderr_data(&format!(
"\
[ERROR] profile name `{name}` is reserved
Please choose a different name.
See https://doc.rust-lang.org/cargo/reference/profiles.html for more on configuring profiles.
Please choose a different name.
See https://doc.rust-lang.org/cargo/reference/profiles.html for more on configuring profiles.
--> Cargo.toml:7:30
|
7 | [profile.{name}]
| {highlight}
|
"
))
.run();
@ -620,13 +618,12 @@ See https://doc.rust-lang.org/cargo/reference/profiles.html for more on configur
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] profile name `debug` is reserved
To configure the default development profile, use the name `dev` as in [profile.dev]
See https://doc.rust-lang.org/cargo/reference/profiles.html for more on configuring profiles.
To configure the default development profile, use the name `dev` as in [profile.dev]
See https://doc.rust-lang.org/cargo/reference/profiles.html for more on configuring profiles.
--> Cargo.toml:8:25
|
8 | [profile.debug]
| ^^^^^
|
"#]])
.run();

View File

@ -53,7 +53,6 @@ fn rust_version_error() {
|
7 | rust-version = "^1.43"
| ^^^^^^^
|
"#]])
.run();

View File

@ -1,6 +1,5 @@
[ERROR] invalid multi-line basic string, expected `/`, characters
--> script:8:2
|
8 | 4 +
8 | 4+
| ^
|

View File

@ -1119,7 +1119,6 @@ fn new_warning_with_corrupt_ws() {
|
1 | asdf
| ^
|
[WARNING] compiling this new package may not work due to invalid workspace configuration
[NOTE] see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@ -1400,7 +1399,6 @@ fn error_if_parent_cargo_toml_is_invalid() {
|
1 | Totally not a TOML file
| ^
|
"#]])
.run();