Auto merge of #12306 - Alexendoo:dir-replacement, r=flip1995

Remove `$DIR` replacement

This won't cause problems because the old `$DIR` replacement was based on the parent of the test path, which for us is relative: 5471e0645a/tests/compile-test.rs (L122)

The new pattern being `"tests/{test_dir}"` is more clearly relative

That's why we have custom filters applied to the toml/cargo tests where absolute paths do appear in the output 5471e0645a/tests/compile-test.rs (L198-L202)

Removing it allows clicking the paths in the terminal

changelog: none

r? `@flip1995`
This commit is contained in:
bors 2024-02-19 09:20:07 +00:00
commit 74f611f7fc
932 changed files with 9170 additions and 9171 deletions

4
.github/driver.sh vendored
View file

@ -32,7 +32,7 @@ test "$sysroot" = $desired_sysroot
)
# Check that the --sysroot argument is only passed once via arg_file.txt (SYSROOT is ignored)
(
(
echo "fn main() {}" > target/driver_test.rs
echo "--sysroot="$(./target/debug/clippy-driver --print sysroot)"" > arg_file.txt
echo "--verbose" >> arg_file.txt
@ -45,7 +45,7 @@ unset CARGO_MANIFEST_DIR
# Run a lint and make sure it produces the expected output. It's also expected to exit with code 1
# FIXME: How to match the clippy invocation in compile-test.rs?
./target/debug/clippy-driver -Dwarnings -Aunused -Zui-testing --emit metadata --crate-type bin tests/ui/double_neg.rs 2>double_neg.stderr && exit 1
sed -e "s,tests/ui,\$DIR," -e "/= help: for/d" double_neg.stderr > normalized.stderr
sed -e "/= help: for/d" double_neg.stderr > normalized.stderr
diff -u normalized.stderr tests/ui/double_neg.stderr
# make sure "clippy-driver --rustc --arg" and "rustc --arg" behave the same

View file

@ -82,7 +82,7 @@ The output looks something like this (from the example earlier):
```text
error: an inclusive range would be more readable
--> $DIR/range_plus_minus_one.rs:37:14
--> tests/ui/range_plus_minus_one.rs:37:14
|
LL | for _ in 1..1 + 1 {}
| ^^^^^^^^ help: use: `1..=1`
@ -135,14 +135,14 @@ Examples:
```text
error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
--> $DIR/drop_forget_ref.rs:10:5
--> tests/ui/drop_forget_ref.rs:10:5
|
10 | forget(&SomeStruct);
| ^^^^^^^^^^^^^^^^^^^
|
= note: `-D clippy::forget-ref` implied by `-D warnings`
note: argument has type &SomeStruct
--> $DIR/drop_forget_ref.rs:10:12
--> tests/ui/drop_forget_ref.rs:10:12
|
10 | forget(&SomeStruct);
| ^^^^^^^^^^^
@ -158,7 +158,7 @@ Example:
```text
error: constant division of 0.0 with 0.0 will always result in NaN
--> $DIR/zero_div_zero.rs:6:25
--> tests/ui/zero_div_zero.rs:6:25
|
6 | let other_f64_nan = 0.0f64 / 0.0;
| ^^^^^^^^^^^^
@ -176,7 +176,7 @@ Example:
```text
error: This `.fold` can be more succinctly expressed as `.any`
--> $DIR/methods.rs:390:13
--> tests/ui/methods.rs:390:13
|
390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`

View file

@ -97,19 +97,19 @@ failures:
---- compile_test stdout ----
normalized stderr:
error: function called "foo"
--> $DIR/foo_functions.rs:6:12
--> tests/ui/foo_functions.rs:6:12
|
LL | pub fn foo(&self) {}
| ^^^
|
= note: `-D clippy::foo-functions` implied by `-D warnings`
error: function called "foo"
--> $DIR/foo_functions.rs:13:8
--> tests/ui/foo_functions.rs:13:8
|
LL | fn foo(&self) {}
| ^^^
error: function called "foo"
--> $DIR/foo_functions.rs:19:4
--> tests/ui/foo_functions.rs:19:4
|
LL | fn foo() {}
| ^^^

View file

@ -40,7 +40,7 @@ fn docs_link(diag: &mut Diagnostic, lint: &'static Lint) {
///
/// ```ignore
/// error: usage of mem::forget on Drop type
/// --> $DIR/mem_forget.rs:17:5
/// --> tests/ui/mem_forget.rs:17:5
/// |
/// 17 | std::mem::forget(seven);
/// | ^^^^^^^^^^^^^^^^^^^^^^^
@ -65,7 +65,7 @@ pub fn span_lint<T: LintContext>(cx: &T, lint: &'static Lint, sp: impl Into<Mult
///
/// ```text
/// error: constant division of 0.0 with 0.0 will always result in NaN
/// --> $DIR/zero_div_zero.rs:6:25
/// --> tests/ui/zero_div_zero.rs:6:25
/// |
/// 6 | let other_f64_nan = 0.0f64 / 0.0;
/// | ^^^^^^^^^^^^
@ -103,14 +103,14 @@ pub fn span_lint_and_help<T: LintContext>(
///
/// ```text
/// error: calls to `std::mem::forget` with a reference instead of an owned value. Forgetting a reference does nothing.
/// --> $DIR/drop_forget_ref.rs:10:5
/// --> tests/ui/drop_forget_ref.rs:10:5
/// |
/// 10 | forget(&SomeStruct);
/// | ^^^^^^^^^^^^^^^^^^^
/// |
/// = note: `-D clippy::forget-ref` implied by `-D warnings`
/// note: argument has type &SomeStruct
/// --> $DIR/drop_forget_ref.rs:10:12
/// --> tests/ui/drop_forget_ref.rs:10:12
/// |
/// 10 | forget(&SomeStruct);
/// | ^^^^^^^^^^^
@ -186,7 +186,7 @@ pub fn span_lint_hir_and_then(
///
/// ```text
/// error: This `.fold` can be more succinctly expressed as `.any`
/// --> $DIR/methods.rs:390:13
/// --> tests/ui/methods.rs:390:13
/// |
/// 390 | let _ = (0..3).fold(false, |acc, x| acc || x > 2);
/// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `.any(|x| x > 2)`

View file

@ -126,7 +126,6 @@ fn base_config(test_dir: &str) -> (Config, Args) {
}))
.into();
config.comment_defaults.base().diagnostic_code_prefix = Some(Spanned::dummy("clippy::".into())).into();
config.filter(&format!("tests/{test_dir}"), "$$DIR");
config.with_args(&args);
let current_exe_path = env::current_exe().unwrap();
let deps_path = current_exe_path.parent().unwrap();

View file

@ -1,2 +1,2 @@
warning: using config file `$DIR/$DIR/multiple_config_files/warn/.clippy.toml`, `$DIR/$DIR/multiple_config_files/warn/clippy.toml` will be ignored
warning: using config file `$DIR/tests/ui-cargo/multiple_config_files/warn/.clippy.toml`, `$DIR/tests/ui-cargo/multiple_config_files/warn/clippy.toml` will be ignored

View file

@ -1,5 +1,5 @@
error: this item has an invalid `clippy::version` attribute
--> $DIR/check_clippy_version_attribute.rs:40:1
--> tests/ui-internal/check_clippy_version_attribute.rs:40:1
|
LL | / declare_tool_lint! {
LL | | #[clippy::version = "1.2.3.4.5.6"]
@ -12,7 +12,7 @@ LL | | }
|
= help: please use a valid semantic version, see `doc/adding_lints.md`
note: the lint level is defined here
--> $DIR/check_clippy_version_attribute.rs:1:9
--> tests/ui-internal/check_clippy_version_attribute.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^
@ -20,7 +20,7 @@ LL | #![deny(clippy::internal)]
= note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
error: this item has an invalid `clippy::version` attribute
--> $DIR/check_clippy_version_attribute.rs:48:1
--> tests/ui-internal/check_clippy_version_attribute.rs:48:1
|
LL | / declare_tool_lint! {
LL | | #[clippy::version = "I'm a string"]
@ -35,7 +35,7 @@ LL | | }
= note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
error: this lint is missing the `clippy::version` attribute or version value
--> $DIR/check_clippy_version_attribute.rs:59:1
--> tests/ui-internal/check_clippy_version_attribute.rs:59:1
|
LL | / declare_tool_lint! {
LL | | #[clippy::version]
@ -51,7 +51,7 @@ LL | | }
= note: this error originates in the macro `$crate::declare_tool_lint` which comes from the expansion of the macro `declare_tool_lint` (in Nightly builds, run with -Z macro-backtrace for more info)
error: this lint is missing the `clippy::version` attribute or version value
--> $DIR/check_clippy_version_attribute.rs:67:1
--> tests/ui-internal/check_clippy_version_attribute.rs:67:1
|
LL | / declare_tool_lint! {
LL | | pub clippy::MISSING_ATTRIBUTE_TWO,

View file

@ -1,5 +1,5 @@
error: non-standard lint formulation
--> $DIR/check_formulation.rs:23:5
--> tests/ui-internal/check_formulation.rs:23:5
|
LL | /// Check for lint formulations that are correct
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -9,7 +9,7 @@ LL | /// Check for lint formulations that are correct
= help: to override `-D warnings` add `#[allow(clippy::almost_standard_lint_formulation)]`
error: non-standard lint formulation
--> $DIR/check_formulation.rs:33:5
--> tests/ui-internal/check_formulation.rs:33:5
|
LL | /// Detects uses of incorrect formulations
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: this call is collapsible
--> $DIR/collapsible_span_lint_calls.rs:35:9
--> tests/ui-internal/collapsible_span_lint_calls.rs:35:9
|
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
LL | | db.span_suggestion(expr.span, help_msg, sugg.to_string(), Applicability::MachineApplicable);
@ -7,14 +7,14 @@ LL | | });
| |__________^ help: collapse into: `span_lint_and_sugg(cx, TEST_LINT, expr.span, lint_msg, help_msg, sugg.to_string(), Applicability::MachineApplicable)`
|
note: the lint level is defined here
--> $DIR/collapsible_span_lint_calls.rs:1:9
--> tests/ui-internal/collapsible_span_lint_calls.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::collapsible_span_lint_calls)]` implied by `#[deny(clippy::internal)]`
error: this call is collapsible
--> $DIR/collapsible_span_lint_calls.rs:38:9
--> tests/ui-internal/collapsible_span_lint_calls.rs:38:9
|
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
LL | | db.span_help(expr.span, help_msg);
@ -22,7 +22,7 @@ LL | | });
| |__________^ help: collapse into: `span_lint_and_help(cx, TEST_LINT, expr.span, lint_msg, Some(expr.span), help_msg)`
error: this call is collapsible
--> $DIR/collapsible_span_lint_calls.rs:41:9
--> tests/ui-internal/collapsible_span_lint_calls.rs:41:9
|
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
LL | | db.help(help_msg);
@ -30,7 +30,7 @@ LL | | });
| |__________^ help: collapse into: `span_lint_and_help(cx, TEST_LINT, expr.span, lint_msg, None, help_msg)`
error: this call is collapsible
--> $DIR/collapsible_span_lint_calls.rs:44:9
--> tests/ui-internal/collapsible_span_lint_calls.rs:44:9
|
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
LL | | db.span_note(expr.span, note_msg);
@ -38,7 +38,7 @@ LL | | });
| |__________^ help: collapse into: `span_lint_and_note(cx, TEST_LINT, expr.span, lint_msg, Some(expr.span), note_msg)`
error: this call is collapsible
--> $DIR/collapsible_span_lint_calls.rs:47:9
--> tests/ui-internal/collapsible_span_lint_calls.rs:47:9
|
LL | / span_lint_and_then(cx, TEST_LINT, expr.span, lint_msg, |db| {
LL | | db.note(note_msg);

View file

@ -1,5 +1,5 @@
error: the lint `COOL_LINT_DEFAULT` has the default deprecation reason
--> $DIR/default_deprecation_reason.rs:8:1
--> tests/ui-internal/default_deprecation_reason.rs:8:1
|
LL | / declare_deprecated_lint! {
LL | | /// ### What it does
@ -11,7 +11,7 @@ LL | | }
| |_^
|
note: the lint level is defined here
--> $DIR/default_deprecation_reason.rs:1:9
--> tests/ui-internal/default_deprecation_reason.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: the lint `TEST_LINT_DEFAULT` has the default lint description
--> $DIR/default_lint.rs:18:1
--> tests/ui-internal/default_lint.rs:18:1
|
LL | / declare_tool_lint! {
LL | | pub clippy::TEST_LINT_DEFAULT,
@ -10,7 +10,7 @@ LL | | }
| |_^
|
note: the lint level is defined here
--> $DIR/default_lint.rs:1:9
--> tests/ui-internal/default_lint.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: use of a disallowed method `rustc_lint::context::LintContext::span_lint`
--> $DIR/disallow_span_lint.rs:14:5
--> tests/ui-internal/disallow_span_lint.rs:14:5
|
LL | cx.span_lint(lint, span, msg, |_| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -8,7 +8,7 @@ LL | cx.span_lint(lint, span, msg, |_| {});
= help: to override `-D warnings` add `#[allow(clippy::disallowed_methods)]`
error: use of a disallowed method `rustc_middle::ty::context::TyCtxt::node_span_lint`
--> $DIR/disallow_span_lint.rs:24:5
--> tests/ui-internal/disallow_span_lint.rs:24:5
|
LL | tcx.node_span_lint(lint, hir_id, span, msg, |_| {});
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,30 +1,30 @@
error: interning a defined symbol
--> $DIR/interning_defined_symbol.rs:17:13
--> tests/ui-internal/interning_defined_symbol.rs:17:13
|
LL | let _ = Symbol::intern("f32");
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::f32`
|
note: the lint level is defined here
--> $DIR/interning_defined_symbol.rs:1:9
--> tests/ui-internal/interning_defined_symbol.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::interning_defined_symbol)]` implied by `#[deny(clippy::internal)]`
error: interning a defined symbol
--> $DIR/interning_defined_symbol.rs:20:13
--> tests/ui-internal/interning_defined_symbol.rs:20:13
|
LL | let _ = sym!(f32);
| ^^^^^^^^^ help: try: `rustc_span::sym::f32`
error: interning a defined symbol
--> $DIR/interning_defined_symbol.rs:23:13
--> tests/ui-internal/interning_defined_symbol.rs:23:13
|
LL | let _ = Symbol::intern("proc-macro");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::proc_dash_macro`
error: interning a defined symbol
--> $DIR/interning_defined_symbol.rs:26:13
--> tests/ui-internal/interning_defined_symbol.rs:26:13
|
LL | let _ = Symbol::intern("self");
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::symbol::kw::SelfLower`

View file

@ -1,11 +1,11 @@
error: `extract_msrv_attr!` macro missing from `LateLintPass` implementation
--> $DIR/invalid_msrv_attr_impl.rs:28:1
--> tests/ui-internal/invalid_msrv_attr_impl.rs:28:1
|
LL | impl LateLintPass<'_> for Pass {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/invalid_msrv_attr_impl.rs:1:9
--> tests/ui-internal/invalid_msrv_attr_impl.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^
@ -17,7 +17,7 @@ LL + extract_msrv_attr!(LateContext);
|
error: `extract_msrv_attr!` macro missing from `EarlyLintPass` implementation
--> $DIR/invalid_msrv_attr_impl.rs:32:1
--> tests/ui-internal/invalid_msrv_attr_impl.rs:32:1
|
LL | impl EarlyLintPass for Pass {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: invalid path
--> $DIR/invalid_paths.rs:15:5
--> tests/ui-internal/invalid_paths.rs:15:5
|
LL | pub const TRANSMUTE: [&str; 4] = ["core", "intrinsics", "", "transmute"];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -8,13 +8,13 @@ LL | pub const TRANSMUTE: [&str; 4] = ["core", "intrinsics", "", "transmute"
= help: to override `-D warnings` add `#[allow(clippy::invalid_paths)]`
error: invalid path
--> $DIR/invalid_paths.rs:18:5
--> tests/ui-internal/invalid_paths.rs:18:5
|
LL | pub const BAD_CRATE_PATH: [&str; 2] = ["bad", "path"];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: invalid path
--> $DIR/invalid_paths.rs:21:5
--> tests/ui-internal/invalid_paths.rs:21:5
|
LL | pub const BAD_MOD_PATH: [&str; 2] = ["std", "xxx"];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: the lint `TEST_LINT` is not added to any `LintPass`
--> $DIR/lint_without_lint_pass.rs:12:1
--> tests/ui-internal/lint_without_lint_pass.rs:12:1
|
LL | / declare_tool_lint! {
LL | | pub clippy::TEST_LINT,
@ -10,7 +10,7 @@ LL | | }
| |_^
|
note: the lint level is defined here
--> $DIR/lint_without_lint_pass.rs:1:9
--> tests/ui-internal/lint_without_lint_pass.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^

View file

@ -1,11 +1,11 @@
error: usage of `outer_expn().expn_data()`
--> $DIR/outer_expn_data.rs:23:34
--> tests/ui-internal/outer_expn_data.rs:23:34
|
LL | let _ = expr.span.ctxt().outer_expn().expn_data();
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `outer_expn_data()`
|
note: the lint level is defined here
--> $DIR/outer_expn_data.rs:1:9
--> tests/ui-internal/outer_expn_data.rs:1:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^

View file

@ -1,72 +1,72 @@
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:36:13
--> tests/ui-internal/unnecessary_def_path.rs:36:13
|
LL | let _ = match_type(cx, ty, &OPTION);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
|
note: the lint level is defined here
--> $DIR/unnecessary_def_path.rs:2:9
--> tests/ui-internal/unnecessary_def_path.rs:2:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::unnecessary_def_path)]` implied by `#[deny(clippy::internal)]`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:37:13
--> tests/ui-internal/unnecessary_def_path.rs:37:13
|
LL | let _ = match_type(cx, ty, RESULT);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:38:13
--> tests/ui-internal/unnecessary_def_path.rs:38:13
|
LL | let _ = match_type(cx, ty, &["core", "result", "Result"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:42:13
--> tests/ui-internal/unnecessary_def_path.rs:42:13
|
LL | let _ = clippy_utils::ty::match_type(cx, ty, rc_path);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Rc)`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:44:13
--> tests/ui-internal/unnecessary_def_path.rs:44:13
|
LL | let _ = match_type(cx, ty, &paths::OPTION);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Option)`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:45:13
--> tests/ui-internal/unnecessary_def_path.rs:45:13
|
LL | let _ = match_type(cx, ty, paths::RESULT);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::Result)`
error: use of a def path to a `LangItem`
--> $DIR/unnecessary_def_path.rs:47:13
--> tests/ui-internal/unnecessary_def_path.rs:47:13
|
LL | let _ = match_type(cx, ty, &["alloc", "boxed", "Box"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_lang_item(cx, ty, LangItem::OwnedBox)`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:48:13
--> tests/ui-internal/unnecessary_def_path.rs:48:13
|
LL | let _ = match_type(cx, ty, &["core", "mem", "maybe_uninit", "MaybeUninit", "uninit"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_type_diagnostic_item(cx, ty, sym::maybe_uninit_uninit)`
error: use of a def path to a `LangItem`
--> $DIR/unnecessary_def_path.rs:50:13
--> tests/ui-internal/unnecessary_def_path.rs:50:13
|
LL | let _ = match_def_path(cx, did, &["alloc", "boxed", "Box"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OwnedBox) == Some(did)`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:51:13
--> tests/ui-internal/unnecessary_def_path.rs:51:13
|
LL | let _ = match_def_path(cx, did, &["core", "option", "Option"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.is_diagnostic_item(sym::Option, did)`
error: use of a def path to a `LangItem`
--> $DIR/unnecessary_def_path.rs:52:13
--> tests/ui-internal/unnecessary_def_path.rs:52:13
|
LL | let _ = match_def_path(cx, did, &["core", "option", "Option", "Some"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `cx.tcx.lang_items().get(LangItem::OptionSome) == Some(did)`
@ -74,25 +74,25 @@ LL | let _ = match_def_path(cx, did, &["core", "option", "Option", "Some"]);
= help: if this `DefId` came from a constructor expression or pattern then the parent `DefId` should be used instead
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:54:13
--> tests/ui-internal/unnecessary_def_path.rs:54:13
|
LL | let _ = match_trait_method(cx, expr, &["core", "convert", "AsRef"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_trait_method(cx, expr, sym::AsRef)`
error: use of a def path to a diagnostic item
--> $DIR/unnecessary_def_path.rs:56:13
--> tests/ui-internal/unnecessary_def_path.rs:56:13
|
LL | let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_path_diagnostic_item(cx, expr, sym::Option)`
error: use of a def path to a `LangItem`
--> $DIR/unnecessary_def_path.rs:57:13
--> tests/ui-internal/unnecessary_def_path.rs:57:13
|
LL | let _ = is_expr_path_def_path(cx, expr, &["core", "iter", "traits", "Iterator", "next"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `path_res(cx, expr).opt_def_id().map_or(false, |id| cx.tcx.lang_items().get(LangItem::IteratorNext) == Some(id))`
error: use of a def path to a `LangItem`
--> $DIR/unnecessary_def_path.rs:58:13
--> tests/ui-internal/unnecessary_def_path.rs:58:13
|
LL | let _ = is_expr_path_def_path(cx, expr, &["core", "option", "Option", "Some"]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `is_res_lang_ctor(cx, path_res(cx, expr), LangItem::OptionSome)`

View file

@ -1,5 +1,5 @@
error: hardcoded path to a diagnostic item
--> $DIR/unnecessary_def_path_hardcoded_path.rs:10:36
--> tests/ui-internal/unnecessary_def_path_hardcoded_path.rs:10:36
|
LL | const DEREF_TRAIT: [&str; 4] = ["core", "ops", "deref", "Deref"];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -9,7 +9,7 @@ LL | const DEREF_TRAIT: [&str; 4] = ["core", "ops", "deref", "Deref"];
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_def_path)]`
error: hardcoded path to a language item
--> $DIR/unnecessary_def_path_hardcoded_path.rs:11:40
--> tests/ui-internal/unnecessary_def_path_hardcoded_path.rs:11:40
|
LL | const DEREF_MUT_TRAIT: [&str; 4] = ["core", "ops", "deref", "DerefMut"];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -17,7 +17,7 @@ LL | const DEREF_MUT_TRAIT: [&str; 4] = ["core", "ops", "deref", "DerefMut"]
= help: convert all references to use `LangItem::DerefMut`
error: hardcoded path to a diagnostic item
--> $DIR/unnecessary_def_path_hardcoded_path.rs:12:43
--> tests/ui-internal/unnecessary_def_path_hardcoded_path.rs:12:43
|
LL | const DEREF_TRAIT_METHOD: [&str; 5] = ["core", "ops", "deref", "Deref", "deref"];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,36 +1,36 @@
error: unnecessary `Symbol` to string conversion
--> $DIR/unnecessary_symbol_str.rs:15:5
--> tests/ui-internal/unnecessary_symbol_str.rs:15:5
|
LL | Symbol::intern("foo").as_str() == "clippy";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::sym::clippy`
|
note: the lint level is defined here
--> $DIR/unnecessary_symbol_str.rs:2:9
--> tests/ui-internal/unnecessary_symbol_str.rs:2:9
|
LL | #![deny(clippy::internal)]
| ^^^^^^^^^^^^^^^^
= note: `#[deny(clippy::unnecessary_symbol_str)]` implied by `#[deny(clippy::internal)]`
error: unnecessary `Symbol` to string conversion
--> $DIR/unnecessary_symbol_str.rs:16:5
--> tests/ui-internal/unnecessary_symbol_str.rs:16:5
|
LL | Symbol::intern("foo").to_string() == "self";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") == rustc_span::symbol::kw::SelfLower`
error: unnecessary `Symbol` to string conversion
--> $DIR/unnecessary_symbol_str.rs:17:5
--> tests/ui-internal/unnecessary_symbol_str.rs:17:5
|
LL | Symbol::intern("foo").to_ident_string() != "Self";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Symbol::intern("foo") != rustc_span::symbol::kw::SelfUpper`
error: unnecessary `Symbol` to string conversion
--> $DIR/unnecessary_symbol_str.rs:18:5
--> tests/ui-internal/unnecessary_symbol_str.rs:18:5
|
LL | &*Ident::empty().as_str() == "clippy";
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Ident::empty().name == rustc_span::sym::clippy`
error: unnecessary `Symbol` to string conversion
--> $DIR/unnecessary_symbol_str.rs:19:5
--> tests/ui-internal/unnecessary_symbol_str.rs:19:5
|
LL | "clippy" == Ident::empty().to_string();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `rustc_span::sym::clippy == Ident::empty().name`

View file

@ -1,5 +1,5 @@
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:40:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:40:5
|
LL | std::f32::MAX;
| ^^^^^^^^^^^^^
@ -8,19 +8,19 @@ LL | std::f32::MAX;
= help: to override `-D warnings` add `#[allow(clippy::absolute_paths)]`
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:41:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:41:5
|
LL | core::f32::MAX;
| ^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:42:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:42:5
|
LL | ::core::f32::MAX;
| ^^^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:58:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:58:5
|
LL | ::std::f32::MAX;
| ^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:40:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:40:5
|
LL | std::f32::MAX;
| ^^^^^^^^^^^^^
@ -8,61 +8,61 @@ LL | std::f32::MAX;
= help: to override `-D warnings` add `#[allow(clippy::absolute_paths)]`
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:41:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:41:5
|
LL | core::f32::MAX;
| ^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:42:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:42:5
|
LL | ::core::f32::MAX;
| ^^^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:43:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:43:5
|
LL | crate::a::b::c::C;
| ^^^^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:44:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:44:5
|
LL | crate::a::b::c::d::e::f::F;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:45:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:45:5
|
LL | crate::a::A;
| ^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:46:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:46:5
|
LL | crate::a::b::B;
| ^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:47:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:47:5
|
LL | crate::a::b::c::C::ZERO;
| ^^^^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:48:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:48:5
|
LL | helper::b::c::d::e::f();
| ^^^^^^^^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:49:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:49:5
|
LL | ::helper::b::c::d::e::f();
| ^^^^^^^^^^^^^^^^^^^^^^^
error: consider bringing this path into scope with the `use` keyword
--> $DIR/absolute_paths/absolute_paths.rs:58:5
--> tests/ui-toml/absolute_paths/absolute_paths.rs:58:5
|
LL | ::std::f32::MAX;
| ^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: variables can be used directly in the `format!` string
--> $DIR/allow_mixed_uninlined_format_args/uninlined_format_args.rs:9:5
--> tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs:9:5
|
LL | println!("val='{}'", local_i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -13,7 +13,7 @@ LL + println!("val='{local_i32}'");
|
error: variables can be used directly in the `format!` string
--> $DIR/allow_mixed_uninlined_format_args/uninlined_format_args.rs:10:5
--> tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs:10:5
|
LL | println!("Hello {} is {:.*}", "x", local_i32, local_f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -25,7 +25,7 @@ LL + println!("Hello {} is {local_f64:.local_i32$}", "x");
|
error: literal with an empty format string
--> $DIR/allow_mixed_uninlined_format_args/uninlined_format_args.rs:10:35
--> tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs:10:35
|
LL | println!("Hello {} is {:.*}", "x", local_i32, local_f64);
| ^^^
@ -39,7 +39,7 @@ LL + println!("Hello x is {:.*}", local_i32, local_f64);
|
error: variables can be used directly in the `format!` string
--> $DIR/allow_mixed_uninlined_format_args/uninlined_format_args.rs:11:5
--> tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs:11:5
|
LL | println!("Hello {} is {:.*}", local_i32, 5, local_f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -51,7 +51,7 @@ LL + println!("Hello {local_i32} is {local_f64:.*}", 5);
|
error: variables can be used directly in the `format!` string
--> $DIR/allow_mixed_uninlined_format_args/uninlined_format_args.rs:12:5
--> tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs:12:5
|
LL | println!("Hello {} is {2:.*}", local_i32, 5, local_f64);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -63,7 +63,7 @@ LL + println!("Hello {local_i32} is {local_f64:.*}", 5);
|
error: variables can be used directly in the `format!` string
--> $DIR/allow_mixed_uninlined_format_args/uninlined_format_args.rs:13:5
--> tests/ui-toml/allow_mixed_uninlined_format_args/uninlined_format_args.rs:13:5
|
LL | println!("{}, {}", local_i32, local_opt.unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:69:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:69:13
|
LL | let _ = Baz + Baz;
| ^^^^^^^^^
@ -8,49 +8,49 @@ LL | let _ = Baz + Baz;
= help: to override `-D warnings` add `#[allow(clippy::arithmetic_side_effects)]`
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:80:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:80:13
|
LL | let _ = 1i32 + Baz;
| ^^^^^^^^^^
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:83:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:83:13
|
LL | let _ = 1i64 + Foo;
| ^^^^^^^^^^
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:87:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:87:13
|
LL | let _ = 1i64 + Baz;
| ^^^^^^^^^^
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:98:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:98:13
|
LL | let _ = Baz + 1i32;
| ^^^^^^^^^^
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:101:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:101:13
|
LL | let _ = Foo + 1i64;
| ^^^^^^^^^^
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:105:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:105:13
|
LL | let _ = Baz + 1i64;
| ^^^^^^^^^^
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:114:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:114:13
|
LL | let _ = -Bar;
| ^^^^
error: arithmetic operation that can potentially result in unexpected side-effects
--> $DIR/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:116:13
--> tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs:116:13
|
LL | let _ = -Baz;
| ^^^^

View file

@ -1,5 +1,5 @@
error: large array defined as const
--> $DIR/array_size_threshold/array_size_threshold.rs:4:1
--> tests/ui-toml/array_size_threshold/array_size_threshold.rs:4:1
|
LL | const ABOVE: [u8; 11] = [0; 11];
| -----^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -10,7 +10,7 @@ LL | const ABOVE: [u8; 11] = [0; 11];
= help: to override `-D warnings` add `#[allow(clippy::large_const_arrays)]`
error: allocating a local array larger than 10 bytes
--> $DIR/array_size_threshold/array_size_threshold.rs:4:25
--> tests/ui-toml/array_size_threshold/array_size_threshold.rs:4:25
|
LL | const ABOVE: [u8; 11] = [0; 11];
| ^^^^^^^
@ -20,7 +20,7 @@ LL | const ABOVE: [u8; 11] = [0; 11];
= help: to override `-D warnings` add `#[allow(clippy::large_stack_arrays)]`
error: allocating a local array larger than 10 bytes
--> $DIR/array_size_threshold/array_size_threshold.rs:8:17
--> tests/ui-toml/array_size_threshold/array_size_threshold.rs:8:17
|
LL | let above = [0u8; 11];
| ^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: `std::string::String` may not be held across an `await` point per `clippy.toml`
--> $DIR/await_holding_invalid_type/await_holding_invalid_type.rs:5:9
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:5:9
|
LL | let _x = String::from("hello");
| ^^
@ -9,13 +9,13 @@ LL | let _x = String::from("hello");
= help: to override `-D warnings` add `#[allow(clippy::await_holding_invalid_type)]`
error: `std::net::Ipv4Addr` may not be held across an `await` point per `clippy.toml`
--> $DIR/await_holding_invalid_type/await_holding_invalid_type.rs:10:9
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:10:9
|
LL | let x = Ipv4Addr::new(127, 0, 0, 1);
| ^
error: `std::string::String` may not be held across an `await` point per `clippy.toml`
--> $DIR/await_holding_invalid_type/await_holding_invalid_type.rs:33:13
--> tests/ui-toml/await_holding_invalid_type/await_holding_invalid_type.rs:33:13
|
LL | let _x = String::from("hi!");
| ^^

View file

@ -1,5 +1,5 @@
error: error reading Clippy's configuration file: expected `.`, `=`
--> $DIR/$DIR/bad_toml/clippy.toml:1:4
--> $DIR/tests/ui-toml/bad_toml/clippy.toml:1:4
|
LL | fn this_is_obviously(not: a, toml: file) {
| ^

View file

@ -1,5 +1,5 @@
error: error reading Clippy's configuration file: invalid type: integer `42`, expected a sequence
--> $DIR/$DIR/bad_toml_type/clippy.toml:1:20
--> $DIR/tests/ui-toml/bad_toml_type/clippy.toml:1:20
|
LL | disallowed-names = 42
| ^^

View file

@ -1,17 +1,17 @@
warning: error reading Clippy's configuration file: deprecated field `cyclomatic-complexity-threshold`. Please use `cognitive-complexity-threshold` instead
--> $DIR/$DIR/conf_deprecated_key/clippy.toml:2:1
--> $DIR/tests/ui-toml/conf_deprecated_key/clippy.toml:2:1
|
LL | cyclomatic-complexity-threshold = 2
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: error reading Clippy's configuration file: deprecated field `blacklisted-names`. Please use `disallowed-names` instead
--> $DIR/$DIR/conf_deprecated_key/clippy.toml:3:1
--> $DIR/tests/ui-toml/conf_deprecated_key/clippy.toml:3:1
|
LL | blacklisted-names = [ "..", "wibble" ]
| ^^^^^^^^^^^^^^^^^
error: the function has a cognitive complexity of (3/2)
--> $DIR/conf_deprecated_key/conf_deprecated_key.rs:6:4
--> tests/ui-toml/conf_deprecated_key/conf_deprecated_key.rs:6:4
|
LL | fn cognitive_complexity() {
| ^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:5:22
--> tests/ui-toml/dbg_macro/dbg_macro.rs:5:22
|
LL | if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n }
| ^^^^^^^^^^^^^^^^^^^^^^
@ -12,7 +12,7 @@ LL | if let Some(n) = n.checked_sub(4) { n } else { n }
| ~~~~~~~~~~~~~~~~
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:9:8
--> tests/ui-toml/dbg_macro/dbg_macro.rs:9:8
|
LL | if dbg!(n <= 1) {
| ^^^^^^^^^^^^
@ -23,7 +23,7 @@ LL | if n <= 1 {
| ~~~~~~
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:10:9
--> tests/ui-toml/dbg_macro/dbg_macro.rs:10:9
|
LL | dbg!(1)
| ^^^^^^^
@ -34,7 +34,7 @@ LL | 1
|
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:12:9
--> tests/ui-toml/dbg_macro/dbg_macro.rs:12:9
|
LL | dbg!(n * factorial(n - 1))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -45,7 +45,7 @@ LL | n * factorial(n - 1)
|
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:17:5
--> tests/ui-toml/dbg_macro/dbg_macro.rs:17:5
|
LL | dbg!(42);
| ^^^^^^^^
@ -56,7 +56,7 @@ LL | 42;
| ~~
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:18:5
--> tests/ui-toml/dbg_macro/dbg_macro.rs:18:5
|
LL | dbg!(dbg!(dbg!(42)));
| ^^^^^^^^^^^^^^^^^^^^
@ -67,7 +67,7 @@ LL | dbg!(dbg!(42));
| ~~~~~~~~~~~~~~
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:19:14
--> tests/ui-toml/dbg_macro/dbg_macro.rs:19:14
|
LL | foo(3) + dbg!(factorial(4));
| ^^^^^^^^^^^^^^^^^^
@ -78,7 +78,7 @@ LL | foo(3) + factorial(4);
| ~~~~~~~~~~~~
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:20:5
--> tests/ui-toml/dbg_macro/dbg_macro.rs:20:5
|
LL | dbg!(1, 2, dbg!(3, 4));
| ^^^^^^^^^^^^^^^^^^^^^^
@ -89,7 +89,7 @@ LL | (1, 2, dbg!(3, 4));
| ~~~~~~~~~~~~~~~~~~
error: the `dbg!` macro is intended as a debugging tool
--> $DIR/dbg_macro/dbg_macro.rs:21:5
--> tests/ui-toml/dbg_macro/dbg_macro.rs:21:5
|
LL | dbg!(1, 2, 3, 4, 5);
| ^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: integer literal has a better hexadecimal representation
--> $DIR/decimal_literal_representation/decimal_literal_representation.rs:4:13
--> tests/ui-toml/decimal_literal_representation/decimal_literal_representation.rs:4:13
|
LL | let _ = 16777215;
| ^^^^^^^^ help: consider: `0x00FF_FFFF`

View file

@ -1,5 +1,5 @@
error: use of a disallowed macro `std::println`
--> $DIR/disallowed_macros/disallowed_macros.rs:13:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:13:5
|
LL | println!("one");
| ^^^^^^^^^^^^^^^
@ -8,25 +8,25 @@ LL | println!("one");
= help: to override `-D warnings` add `#[allow(clippy::disallowed_macros)]`
error: use of a disallowed macro `std::println`
--> $DIR/disallowed_macros/disallowed_macros.rs:14:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:14:5
|
LL | println!("two");
| ^^^^^^^^^^^^^^^
error: use of a disallowed macro `std::cfg`
--> $DIR/disallowed_macros/disallowed_macros.rs:15:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:15:5
|
LL | cfg!(unix);
| ^^^^^^^^^^
error: use of a disallowed macro `std::vec`
--> $DIR/disallowed_macros/disallowed_macros.rs:16:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:16:5
|
LL | vec![1, 2, 3];
| ^^^^^^^^^^^^^
error: use of a disallowed macro `serde::Serialize`
--> $DIR/disallowed_macros/disallowed_macros.rs:18:14
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:18:14
|
LL | #[derive(Serialize)]
| ^^^^^^^^^
@ -34,43 +34,43 @@ LL | #[derive(Serialize)]
= note: no serializing (from clippy.toml)
error: use of a disallowed macro `macros::expr`
--> $DIR/disallowed_macros/disallowed_macros.rs:21:13
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:21:13
|
LL | let _ = macros::expr!();
| ^^^^^^^^^^^^^^^
error: use of a disallowed macro `macros::stmt`
--> $DIR/disallowed_macros/disallowed_macros.rs:22:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:22:5
|
LL | macros::stmt!();
| ^^^^^^^^^^^^^^^
error: use of a disallowed macro `macros::pat`
--> $DIR/disallowed_macros/disallowed_macros.rs:23:9
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:23:9
|
LL | let macros::pat!() = 1;
| ^^^^^^^^^^^^^^
error: use of a disallowed macro `macros::ty`
--> $DIR/disallowed_macros/disallowed_macros.rs:24:12
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:24:12
|
LL | let _: macros::ty!() = "";
| ^^^^^^^^^^^^^
error: use of a disallowed macro `macros::item`
--> $DIR/disallowed_macros/disallowed_macros.rs:25:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:25:5
|
LL | macros::item!();
| ^^^^^^^^^^^^^^^
error: use of a disallowed macro `macros::binop`
--> $DIR/disallowed_macros/disallowed_macros.rs:26:13
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:26:13
|
LL | let _ = macros::binop!(1);
| ^^^^^^^^^^^^^^^^^
error: use of a disallowed macro `macros::attr`
--> $DIR/disallowed_macros/disallowed_macros.rs:31:1
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:31:1
|
LL | / macros::attr! {
LL | | struct S;
@ -78,25 +78,25 @@ LL | | }
| |_^
error: use of a disallowed macro `macros::item`
--> $DIR/disallowed_macros/disallowed_macros.rs:36:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:36:5
|
LL | macros::item!();
| ^^^^^^^^^^^^^^^
error: use of a disallowed macro `macros::item`
--> $DIR/disallowed_macros/disallowed_macros.rs:40:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:40:5
|
LL | macros::item!();
| ^^^^^^^^^^^^^^^
error: use of a disallowed macro `macros::item`
--> $DIR/disallowed_macros/disallowed_macros.rs:44:5
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:44:5
|
LL | macros::item!();
| ^^^^^^^^^^^^^^^
error: use of a disallowed macro `proc_macros::Derive`
--> $DIR/disallowed_macros/disallowed_macros.rs:47:10
--> tests/ui-toml/disallowed_macros/disallowed_macros.rs:47:10
|
LL | #[derive(Derive)]
| ^^^^^^

View file

@ -1,5 +1,5 @@
error: use of a disallowed/placeholder name `foo`
--> $DIR/disallowed_names_append/disallowed_names.rs:5:9
--> tests/ui-toml/disallowed_names_append/disallowed_names.rs:5:9
|
LL | let foo = "bar";
| ^^^
@ -8,7 +8,7 @@ LL | let foo = "bar";
= help: to override `-D warnings` add `#[allow(clippy::disallowed_names)]`
error: use of a disallowed/placeholder name `ducks`
--> $DIR/disallowed_names_append/disallowed_names.rs:7:9
--> tests/ui-toml/disallowed_names_append/disallowed_names.rs:7:9
|
LL | let ducks = ["quack", "quack"];
| ^^^^^

View file

@ -1,5 +1,5 @@
error: use of a disallowed/placeholder name `ducks`
--> $DIR/disallowed_names_replace/disallowed_names.rs:7:9
--> tests/ui-toml/disallowed_names_replace/disallowed_names.rs:7:9
|
LL | let ducks = ["quack", "quack"];
| ^^^^^

View file

@ -1,5 +1,5 @@
error: identifier `カウンタ` has a Unicode script that is not allowed by configuration: Katakana
--> $DIR/disallowed_script_idents/disallowed_script_idents.rs:4:9
--> tests/ui-toml/disallowed_script_idents/disallowed_script_idents.rs:4:9
|
LL | let カウンタ = 10;
| ^^^^^^^^

View file

@ -1,5 +1,5 @@
error: item in documentation is missing backticks
--> $DIR/doc_valid_idents_append/doc_markdown.rs:9:5
--> tests/ui-toml/doc_valid_idents_append/doc_markdown.rs:9:5
|
LL | /// TestItemThingyOfCoolness might sound cool but is not on the list and should be linted.
| ^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: item in documentation is missing backticks
--> $DIR/doc_valid_idents_replace/doc_markdown.rs:6:5
--> tests/ui-toml/doc_valid_idents_replace/doc_markdown.rs:6:5
|
LL | /// OAuth and LaTeX are inside Clippy's default list.
| ^^^^^
@ -12,7 +12,7 @@ LL | /// `OAuth` and LaTeX are inside Clippy's default list.
| ~~~~~~~
error: item in documentation is missing backticks
--> $DIR/doc_valid_idents_replace/doc_markdown.rs:6:15
--> tests/ui-toml/doc_valid_idents_replace/doc_markdown.rs:6:15
|
LL | /// OAuth and LaTeX are inside Clippy's default list.
| ^^^^^
@ -23,7 +23,7 @@ LL | /// OAuth and `LaTeX` are inside Clippy's default list.
| ~~~~~~~
error: item in documentation is missing backticks
--> $DIR/doc_valid_idents_replace/doc_markdown.rs:9:5
--> tests/ui-toml/doc_valid_idents_replace/doc_markdown.rs:9:5
|
LL | /// TestItemThingyOfCoolness might sound cool but is not on the list and should be linted.
| ^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: error reading Clippy's configuration file: duplicate key `cognitive-complexity-threshold` in document root
--> $DIR/$DIR/duplicated_keys/clippy.toml:2:1
--> $DIR/tests/ui-toml/duplicated_keys/clippy.toml:2:1
|
LL | cognitive-complexity-threshold = 4
| ^

View file

@ -1,11 +1,11 @@
error: error reading Clippy's configuration file: duplicate field `cognitive_complexity_threshold` (provided as `cyclomatic_complexity_threshold`)
--> $DIR/$DIR/duplicated_keys_deprecated/clippy.toml:3:1
--> $DIR/tests/ui-toml/duplicated_keys_deprecated/clippy.toml:3:1
|
LL | cyclomatic-complexity-threshold = 3
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: error reading Clippy's configuration file: deprecated field `cyclomatic-complexity-threshold`. Please use `cognitive-complexity-threshold` instead
--> $DIR/$DIR/duplicated_keys_deprecated/clippy.toml:3:1
--> $DIR/tests/ui-toml/duplicated_keys_deprecated/clippy.toml:3:1
|
LL | cyclomatic-complexity-threshold = 3
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,11 +1,11 @@
error: error reading Clippy's configuration file: duplicate field `cognitive-complexity-threshold`
--> $DIR/$DIR/duplicated_keys_deprecated_2/clippy.toml:4:1
--> $DIR/tests/ui-toml/duplicated_keys_deprecated_2/clippy.toml:4:1
|
LL | cognitive-complexity-threshold = 4
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: error reading Clippy's configuration file: deprecated field `cyclomatic-complexity-threshold`. Please use `cognitive-complexity-threshold` instead
--> $DIR/$DIR/duplicated_keys_deprecated_2/clippy.toml:2:1
--> $DIR/tests/ui-toml/duplicated_keys_deprecated_2/clippy.toml:2:1
|
LL | cyclomatic-complexity-threshold = 3
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: large size difference between variants
--> $DIR/enum_variant_size/enum_variant_size.rs:5:1
--> tests/ui-toml/enum_variant_size/enum_variant_size.rs:5:1
|
LL | / enum Bad {
LL | |

View file

@ -1,5 +1,5 @@
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:21:25
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:21:25
|
LL | let w = { 3 };
| ^^^^^
@ -9,7 +9,7 @@ LL | let w = { 3 };
= help: to override `-D warnings` add `#[allow(clippy::excessive_nesting)]`
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:67:17
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:67:17
|
LL | / impl C {
LL | | pub fn c() {}
@ -19,7 +19,7 @@ LL | | }
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:81:25
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:81:25
|
LL | let x = { 1 }; // not a warning, but cc is
| ^^^^^
@ -27,7 +27,7 @@ LL | let x = { 1 }; // not a warning, but cc is
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:98:17
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:98:17
|
LL | / pub mod e {
LL | | pub mod f {}
@ -37,7 +37,7 @@ LL | | } // not here
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:111:18
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:111:18
|
LL | a_but_not({{{{{{{{0}}}}}}}});
| ^^^^^^^^^^^
@ -45,7 +45,7 @@ LL | a_but_not({{{{{{{{0}}}}}}}});
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:112:12
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:112:12
|
LL | a.a({{{{{{{{{0}}}}}}}}});
| ^^^^^^^^^^^^^
@ -53,7 +53,7 @@ LL | a.a({{{{{{{{{0}}}}}}}}});
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:113:12
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:113:12
|
LL | (0, {{{{{{{1}}}}}}});
| ^^^^^^^^^
@ -61,7 +61,7 @@ LL | (0, {{{{{{{1}}}}}}});
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:118:25
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:118:25
|
LL | if true {
| _________________________^
@ -74,7 +74,7 @@ LL | | }
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:130:29
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:130:29
|
LL | let z = (|| {
| _____________________________^
@ -86,7 +86,7 @@ LL | | })();
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:149:13
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:149:13
|
LL | y += {{{{{5}}}}};
| ^^^^^
@ -94,7 +94,7 @@ LL | y += {{{{{5}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:150:20
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:150:20
|
LL | let z = y + {{{{{{{{{5}}}}}}}}};
| ^^^^^^^^^^^^^
@ -102,7 +102,7 @@ LL | let z = y + {{{{{{{{{5}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:151:12
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:151:12
|
LL | [0, {{{{{{{{{{0}}}}}}}}}}];
| ^^^^^^^^^^^^^^^
@ -110,7 +110,7 @@ LL | [0, {{{{{{{{{{0}}}}}}}}}}];
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:152:25
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:152:25
|
LL | let mut xx = [0; {{{{{{{{100}}}}}}}}];
| ^^^^^^^^^^^^^
@ -118,7 +118,7 @@ LL | let mut xx = [0; {{{{{{{{100}}}}}}}}];
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:153:11
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:153:11
|
LL | xx[{{{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}}}];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -126,7 +126,7 @@ LL | xx[{{{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}}}];
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:154:13
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:154:13
|
LL | &mut {{{{{{{{{{y}}}}}}}}}};
| ^^^^^^^^^^^^^^^
@ -134,7 +134,7 @@ LL | &mut {{{{{{{{{{y}}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:156:17
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:156:17
|
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
| ^^^^
@ -142,7 +142,7 @@ LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:156:28
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:156:28
|
LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
| ^^^^^^^^^^
@ -150,7 +150,7 @@ LL | for i in {{{{xx}}}} {{{{{{{{}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:158:28
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:158:28
|
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
| ^^^^^^^^^^^^^
@ -158,7 +158,7 @@ LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:158:48
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:158:48
|
LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
| ^^^^^^^^
@ -166,7 +166,7 @@ LL | while let Some(i) = {{{{{{Some(1)}}}}}} {{{{{{{}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:160:14
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:160:14
|
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
| ^^^^^^^^^^^^^^
@ -174,7 +174,7 @@ LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:160:35
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:160:35
|
LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
| ^^^^^^^^^^^^
@ -182,7 +182,7 @@ LL | while {{{{{{{{true}}}}}}}} {{{{{{{{{}}}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:162:23
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:162:23
|
LL | let d = D { d: {{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}} };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -190,7 +190,7 @@ LL | let d = D { d: {{{{{{{{{{{{{{{{{{{{{{{3}}}}}}}}}}}}}}}}}}}}}}} };
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:164:8
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:164:8
|
LL | {{{{1;}}}}..{{{{{{3}}}}}};
| ^^^^
@ -198,7 +198,7 @@ LL | {{{{1;}}}}..{{{{{{3}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:164:20
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:164:20
|
LL | {{{{1;}}}}..{{{{{{3}}}}}};
| ^^^^^^^
@ -206,7 +206,7 @@ LL | {{{{1;}}}}..{{{{{{3}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:165:8
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:165:8
|
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
| ^^^^
@ -214,7 +214,7 @@ LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:165:21
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:165:21
|
LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -222,7 +222,7 @@ LL | {{{{1;}}}}..={{{{{{{{{{{{{{{{{{{{{{{{{{6}}}}}}}}}}}}}}}}}}}}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:166:10
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:166:10
|
LL | ..{{{{{{{5}}}}}}};
| ^^^^^^^^^
@ -230,7 +230,7 @@ LL | ..{{{{{{{5}}}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:167:11
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:167:11
|
LL | ..={{{{{3}}}}};
| ^^^^^
@ -238,7 +238,7 @@ LL | ..={{{{{3}}}}};
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:168:8
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:168:8
|
LL | {{{{{1;}}}}}..;
| ^^^^^^
@ -246,7 +246,7 @@ LL | {{{{{1;}}}}}..;
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:170:20
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:170:20
|
LL | loop { break {{{{1}}}} };
| ^^^^^
@ -254,7 +254,7 @@ LL | loop { break {{{{1}}}} };
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:171:13
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:171:13
|
LL | loop {{{{{{}}}}}}
| ^^^^^^
@ -262,7 +262,7 @@ LL | loop {{{{{{}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:173:14
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:173:14
|
LL | match {{{{{{true}}}}}} {
| ^^^^^^^^^^
@ -270,7 +270,7 @@ LL | match {{{{{{true}}}}}} {
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:174:20
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:174:20
|
LL | true => {{{{}}}},
| ^^
@ -278,7 +278,7 @@ LL | true => {{{{}}}},
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:175:21
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:175:21
|
LL | false => {{{{}}}},
| ^^
@ -286,7 +286,7 @@ LL | false => {{{{}}}},
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:181:17
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:181:17
|
LL | / {
LL | | println!("warning! :)");
@ -296,7 +296,7 @@ LL | | }
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:190:28
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:190:28
|
LL | async fn c() -> u32 {{{{{{{0}}}}}}}
| ^^^^^^^^^
@ -304,7 +304,7 @@ LL | async fn c() -> u32 {{{{{{{0}}}}}}}
= help: try refactoring your code to minimize nesting
error: this block is too nested
--> $DIR/excessive_nesting/excessive_nesting.rs:196:8
--> tests/ui-toml/excessive_nesting/excessive_nesting.rs:196:8
|
LL | {{{{b().await}}}};
| ^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: used `expect()` on an `Option` value
--> $DIR/expect_used/expect_used.rs:7:13
--> tests/ui-toml/expect_used/expect_used.rs:7:13
|
LL | let _ = opt.expect("");
| ^^^^^^^^^^^^^^
@ -9,7 +9,7 @@ LL | let _ = opt.expect("");
= help: to override `-D warnings` add `#[allow(clippy::expect_used)]`
error: used `expect()` on a `Result` value
--> $DIR/expect_used/expect_used.rs:12:13
--> tests/ui-toml/expect_used/expect_used.rs:12:13
|
LL | let _ = res.expect("");
| ^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: it is more concise to loop over references to containers instead of using explicit iteration methods
--> $DIR/explicit_iter_loop/explicit_iter_loop.rs:6:14
--> tests/ui-toml/explicit_iter_loop/explicit_iter_loop.rs:6:14
|
LL | for _ in rmvec.iter() {}
| ^^^^^^^^^^^^ help: to write this more concisely, try: `&*rmvec`
@ -8,7 +8,7 @@ LL | for _ in rmvec.iter() {}
= help: to override `-D warnings` add `#[allow(clippy::explicit_iter_loop)]`
error: it is more concise to loop over references to containers instead of using explicit iteration methods
--> $DIR/explicit_iter_loop/explicit_iter_loop.rs:8:14
--> tests/ui-toml/explicit_iter_loop/explicit_iter_loop.rs:8:14
|
LL | for _ in rmvec.iter_mut() {}
| ^^^^^^^^^^^^^^^^ help: to write this more concisely, try: `&mut *rmvec`

View file

@ -1,5 +1,5 @@
error: more than 1 bools in function parameters
--> $DIR/fn_params_excessive_bools/test.rs:4:1
--> tests/ui-toml/fn_params_excessive_bools/test.rs:4:1
|
LL | fn g(_: bool, _: bool) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: this function has too many lines (2/1)
--> $DIR/functions_maxlines/test.rs:19:1
--> tests/ui-toml/functions_maxlines/test.rs:19:1
|
LL | / fn too_many_lines() {
LL | | println!("This is bad.");
@ -11,7 +11,7 @@ LL | | }
= help: to override `-D warnings` add `#[allow(clippy::too_many_lines)]`
error: this function has too many lines (4/1)
--> $DIR/functions_maxlines/test.rs:25:1
--> tests/ui-toml/functions_maxlines/test.rs:25:1
|
LL | / async fn async_too_many_lines() {
LL | | println!("This is bad.");
@ -20,7 +20,7 @@ LL | | }
| |_^
error: this function has too many lines (4/1)
--> $DIR/functions_maxlines/test.rs:31:1
--> tests/ui-toml/functions_maxlines/test.rs:31:1
|
LL | / fn closure_too_many_lines() {
LL | | let _ = {
@ -31,7 +31,7 @@ LL | | }
| |_^
error: this function has too many lines (2/1)
--> $DIR/functions_maxlines/test.rs:53:1
--> tests/ui-toml/functions_maxlines/test.rs:53:1
|
LL | / fn comment_before_code() {
LL | | let _ = "test";

View file

@ -1,11 +1,11 @@
error: this `if` has the same condition as a previous `if`
--> $DIR/ifs_same_cond/ifs_same_cond.rs:15:15
--> tests/ui-toml/ifs_same_cond/ifs_same_cond.rs:15:15
|
LL | } else if x.get() {
| ^^^^^^^
|
note: same as this
--> $DIR/ifs_same_cond/ifs_same_cond.rs:13:8
--> tests/ui-toml/ifs_same_cond/ifs_same_cond.rs:13:8
|
LL | if x.get() {
| ^^^^^^^

View file

@ -1,5 +1,5 @@
error: `impl Trait` used as a function parameter
--> $DIR/impl_trait_in_params/impl_trait_in_params.rs:14:13
--> tests/ui-toml/impl_trait_in_params/impl_trait_in_params.rs:14:13
|
LL | fn t(_: impl Trait);
| ^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: error reading Clippy's configuration file: not a valid Rust version
--> $DIR/$DIR/invalid_min_rust_version/clippy.toml:1:8
--> $DIR/tests/ui-toml/invalid_min_rust_version/clippy.toml:1:8
|
LL | msrv = "invalid.version"
| ^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: all fields have the same postfix: `data`
--> $DIR/item_name_repetitions/threshold5/item_name_repetitions.rs:9:1
--> tests/ui-toml/item_name_repetitions/threshold5/item_name_repetitions.rs:9:1
|
LL | / struct Data2 {
LL | |
@ -15,7 +15,7 @@ LL | | }
= help: to override `-D warnings` add `#[allow(clippy::struct_field_names)]`
error: all variants have the same postfix: `Foo`
--> $DIR/item_name_repetitions/threshold5/item_name_repetitions.rs:23:1
--> tests/ui-toml/item_name_repetitions/threshold5/item_name_repetitions.rs:23:1
|
LL | / enum Foo2 {
LL | |

View file

@ -1,5 +1,5 @@
error: large future with a size of 1026 bytes
--> $DIR/large_futures/large_futures.rs:18:5
--> tests/ui-toml/large_futures/large_futures.rs:18:5
|
LL | should_warn().await;
| ^^^^^^^^^^^^^ help: consider `Box::pin` on it: `Box::pin(should_warn())`

View file

@ -1,5 +1,5 @@
error: attempted to include a large file
--> $DIR/large_include_file/large_include_file.rs:13:43
--> tests/ui-toml/large_include_file/large_include_file.rs:13:43
|
LL | const TOO_BIG_INCLUDE_BYTES: &[u8; 654] = include_bytes!("too_big.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -10,7 +10,7 @@ LL | const TOO_BIG_INCLUDE_BYTES: &[u8; 654] = include_bytes!("too_big.txt");
= note: this error originates in the macro `include_bytes` (in Nightly builds, run with -Z macro-backtrace for more info)
error: attempted to include a large file
--> $DIR/large_include_file/large_include_file.rs:14:35
--> tests/ui-toml/large_include_file/large_include_file.rs:14:35
|
LL | const TOO_BIG_INCLUDE_STR: &str = include_str!("too_big.txt");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: this function allocates a large amount of stack space
--> $DIR/large_stack_frames/large_stack_frames.rs:12:1
--> tests/ui-toml/large_stack_frames/large_stack_frames.rs:12:1
|
LL | / fn f2() {
LL | |

View file

@ -1,5 +1,5 @@
error: this argument (513 byte) is passed by value, but might be more efficient if passed by reference (limit: 512 byte)
--> $DIR/large_types_passed_by_value/large_types_passed_by_value.rs:4:11
--> tests/ui-toml/large_types_passed_by_value/large_types_passed_by_value.rs:4:11
|
LL | fn f2(_v: [u8; 513]) {}
| ^^^^^^^^^ help: consider passing by reference instead: `&[u8; 513]`

View file

@ -1,5 +1,5 @@
error: digits grouped inconsistently by underscores
--> $DIR/lint_decimal_readability/test.rs:19:18
--> tests/ui-toml/lint_decimal_readability/test.rs:19:18
|
LL | let _fail1 = 100_200_300.123456789;
| ^^^^^^^^^^^^^^^^^^^^^ help: consider: `100_200_300.123_456_789`
@ -8,7 +8,7 @@ LL | let _fail1 = 100_200_300.123456789;
= help: to override `-D warnings` add `#[allow(clippy::inconsistent_digit_grouping)]`
error: long literal lacking separators
--> $DIR/lint_decimal_readability/test.rs:22:18
--> tests/ui-toml/lint_decimal_readability/test.rs:22:18
|
LL | let _fail2 = 100200300.300200100;
| ^^^^^^^^^^^^^^^^^^^ help: consider: `100_200_300.300_200_100`

View file

@ -1,5 +1,5 @@
error: this could be rewritten as `let...else`
--> $DIR/manual_let_else/manual_let_else.rs:9:5
--> tests/ui-toml/manual_let_else/manual_let_else.rs:9:5
|
LL | / let x = match Foo::A(1) {
LL | |

View file

@ -1,11 +1,11 @@
error: this binding can be a slice pattern to avoid indexing
--> $DIR/max_suggested_slice_pattern_length/index_refutable_slice.rs:5:17
--> tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.rs:5:17
|
LL | if let Some(slice) = slice {
| ^^^^^
|
note: the lint level is defined here
--> $DIR/max_suggested_slice_pattern_length/index_refutable_slice.rs:1:9
--> tests/ui-toml/max_suggested_slice_pattern_length/index_refutable_slice.rs:1:9
|
LL | #![deny(clippy::index_refutable_slice)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: this ident is too short (1 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:6:41
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:6:41
|
LL | use extern_types::{Aaa, LONGER, M, N as W};
| ^
@ -8,43 +8,43 @@ LL | use extern_types::{Aaa, LONGER, M, N as W};
= help: to override `-D warnings` add `#[allow(clippy::min_ident_chars)]`
error: this ident is too short (1 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:8:11
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:8:11
|
LL | pub const N: u32 = 0;
| ^
error: this ident is too short (3 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:13:5
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:13:5
|
LL | aaa: Aaa,
| ^^^
error: this ident is too short (3 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:18:9
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:18:9
|
LL | let vvv = 1;
| ^^^
error: this ident is too short (3 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:19:9
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:19:9
|
LL | let uuu = 1;
| ^^^
error: this ident is too short (1 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:20:14
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:20:14
|
LL | let (mut a, mut b) = (1, 2);
| ^
error: this ident is too short (1 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:20:21
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:20:21
|
LL | let (mut a, mut b) = (1, 2);
| ^
error: this ident is too short (1 <= 3)
--> $DIR/min_ident_chars/min_ident_chars.rs:21:9
--> tests/ui-toml/min_ident_chars/min_ident_chars.rs:21:9
|
LL | for i in 0..1000 {}
| ^

View file

@ -1,5 +1,5 @@
error: you are using an explicit closure for cloning elements
--> $DIR/min_rust_version/min_rust_version.rs:74:26
--> tests/ui-toml/min_rust_version/min_rust_version.rs:74:26
|
LL | let _: Option<u64> = Some(&16).map(|b| *b);
| ^^^^^^^^^^^^^^^^^^^^^ help: consider calling the dedicated `cloned` method: `Some(&16).cloned()`

View file

@ -1,5 +1,5 @@
error: this import should be renamed
--> $DIR/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:5:20
--> tests/ui-toml/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:5:20
|
LL | use std::process::{exit as wrong_exit, Child as Kid};
| ^^^^^^^^^^^^^^^^^^ help: try: `exit as goodbye`
@ -8,31 +8,31 @@ LL | use std::process::{exit as wrong_exit, Child as Kid};
= help: to override `-D warnings` add `#[allow(clippy::missing_enforced_import_renames)]`
error: this import should be renamed
--> $DIR/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:6:1
--> tests/ui-toml/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:6:1
|
LL | use std::thread::sleep;
| ^^^^^^^^^^^^^^^^^^^^^^ help: try: `use std::thread::sleep as thread_sleep`
error: this import should be renamed
--> $DIR/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:9:11
--> tests/ui-toml/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:9:11
|
LL | any::{type_name, Any},
| ^^^^^^^^^ help: try: `type_name as ident`
error: this import should be renamed
--> $DIR/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:10:5
--> tests/ui-toml/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:10:5
|
LL | clone,
| ^^^^^ help: try: `clone as foo`
error: this import should be renamed
--> $DIR/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:11:5
--> tests/ui-toml/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:11:5
|
LL | sync :: Mutex,
| ^^^^^^^^^^^^^ help: try: `sync :: Mutex as StdMutie`
error: this import should be renamed
--> $DIR/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:15:5
--> tests/ui-toml/missing_enforced_import_rename/conf_missing_enforced_import_rename.rs:15:5
|
LL | use std::collections::BTreeMap as OopsWrongRename;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `use std::collections::BTreeMap as Map`

View file

@ -1,5 +1,5 @@
error: module has the same name as its containing module
--> $DIR/module_inception/module_inception.rs:6:9
--> tests/ui-toml/module_inception/module_inception.rs:6:9
|
LL | / pub mod bar2 {
LL | | pub mod foo2 {}
@ -10,7 +10,7 @@ LL | | }
= help: to override `-D warnings` add `#[allow(clippy::module_inception)]`
error: module has the same name as its containing module
--> $DIR/module_inception/module_inception.rs:11:5
--> tests/ui-toml/module_inception/module_inception.rs:11:5
|
LL | / pub mod foo2 {
LL | | pub mod bar2 {}

View file

@ -1,5 +1,5 @@
error: you are using modulo operator on types that might have different signs
--> $DIR/modulo_arithmetic/modulo_arithmetic.rs:6:13
--> tests/ui-toml/modulo_arithmetic/modulo_arithmetic.rs:6:13
|
LL | let c = a % b == 0;
| ^^^^^
@ -10,7 +10,7 @@ LL | let c = a % b == 0;
= help: to override `-D warnings` add `#[allow(clippy::modulo_arithmetic)]`
error: you are using modulo operator on types that might have different signs
--> $DIR/modulo_arithmetic/modulo_arithmetic.rs:7:13
--> tests/ui-toml/modulo_arithmetic/modulo_arithmetic.rs:7:13
|
LL | let c = a % b != 0;
| ^^^^^
@ -19,7 +19,7 @@ LL | let c = a % b != 0;
= note: or consider using `rem_euclid` or similar function
error: you are using modulo operator on types that might have different signs
--> $DIR/modulo_arithmetic/modulo_arithmetic.rs:8:18
--> tests/ui-toml/modulo_arithmetic/modulo_arithmetic.rs:8:18
|
LL | let c = 0 == a % b;
| ^^^^^
@ -28,7 +28,7 @@ LL | let c = 0 == a % b;
= note: or consider using `rem_euclid` or similar function
error: you are using modulo operator on types that might have different signs
--> $DIR/modulo_arithmetic/modulo_arithmetic.rs:9:18
--> tests/ui-toml/modulo_arithmetic/modulo_arithmetic.rs:9:18
|
LL | let c = 0 != a % b;
| ^^^^^

View file

@ -1,5 +1,5 @@
error: use of irregular braces for `vec!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:43:13
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:43:13
|
LL | let _ = vec! {1, 2, 3};
| ^^^^^^^^^^^^^^ help: consider writing: `vec![1, 2, 3]`
@ -8,31 +8,31 @@ LL | let _ = vec! {1, 2, 3};
= help: to override `-D warnings` add `#[allow(clippy::nonstandard_macro_braces)]`
error: use of irregular braces for `format!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:44:13
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:44:13
|
LL | let _ = format!["ugh {} stop being such a good compiler", "hello"];
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `format!("ugh {} stop being such a good compiler", "hello")`
error: use of irregular braces for `matches!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:45:13
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:45:13
|
LL | let _ = matches!{{}, ()};
| ^^^^^^^^^^^^^^^^ help: consider writing: `matches!({}, ())`
error: use of irregular braces for `quote!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:46:13
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:46:13
|
LL | let _ = quote!(let x = 1;);
| ^^^^^^^^^^^^^^^^^^ help: consider writing: `quote!{let x = 1;}`
error: use of irregular braces for `quote::quote!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:47:13
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:47:13
|
LL | let _ = quote::quote!(match match match);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `quote::quote!{match match match}`
error: use of irregular braces for `vec!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:18:9
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:18:9
|
LL | vec!{0, 0, 0}
| ^^^^^^^^^^^^^ help: consider writing: `vec![0, 0, 0]`
@ -43,13 +43,13 @@ LL | let _ = test!(); // trigger when macro def is inside our own crate
= note: this error originates in the macro `test` (in Nightly builds, run with -Z macro-backtrace for more info)
error: use of irregular braces for `type_pos!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:56:12
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:56:12
|
LL | let _: type_pos!(usize) = vec![];
| ^^^^^^^^^^^^^^^^ help: consider writing: `type_pos![usize]`
error: use of irregular braces for `eprint!` macro
--> $DIR/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:58:5
--> tests/ui-toml/nonstandard_macro_braces/conf_nonstandard_macro_braces.rs:58:5
|
LL | eprint!("test if user config overrides defaults");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider writing: `eprint!["test if user config overrides defaults"]`

View file

@ -1,5 +1,5 @@
error: use of `print!`
--> $DIR/print_macro/print_macro.rs:6:5
--> tests/ui-toml/print_macro/print_macro.rs:6:5
|
LL | print!("{n}");
| ^^^^^^^^^^^^^
@ -8,7 +8,7 @@ LL | print!("{n}");
= help: to override `-D warnings` add `#[allow(clippy::print_stdout)]`
error: use of `eprint!`
--> $DIR/print_macro/print_macro.rs:7:5
--> tests/ui-toml/print_macro/print_macro.rs:7:5
|
LL | eprint!("{n}");
| ^^^^^^^^^^^^^^

View file

@ -1,58 +1,58 @@
error: safe function's docs have unnecessary `# Safety` section
--> $DIR/private-doc-errors/doc_lints.rs:12:1
--> tests/ui-toml/private-doc-errors/doc_lints.rs:12:1
|
LL | fn you_dont_see_me() {
| ^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/private-doc-errors/doc_lints.rs:2:5
--> tests/ui-toml/private-doc-errors/doc_lints.rs:2:5
|
LL | clippy::unnecessary_safety_doc,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: safe function's docs have unnecessary `# Safety` section
--> $DIR/private-doc-errors/doc_lints.rs:23:5
--> tests/ui-toml/private-doc-errors/doc_lints.rs:23:5
|
LL | pub fn only_crate_wide_accessible() -> Result<(), ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: docs for function returning `Result` missing `# Errors` section
--> $DIR/private-doc-errors/doc_lints.rs:23:5
--> tests/ui-toml/private-doc-errors/doc_lints.rs:23:5
|
LL | pub fn only_crate_wide_accessible() -> Result<(), ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> $DIR/private-doc-errors/doc_lints.rs:3:5
--> tests/ui-toml/private-doc-errors/doc_lints.rs:3:5
|
LL | clippy::missing_errors_doc,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: safe function's docs have unnecessary `# Safety` section
--> $DIR/private-doc-errors/doc_lints.rs:38:5
--> tests/ui-toml/private-doc-errors/doc_lints.rs:38:5
|
LL | fn private(&self) {
| ^^^^^^^^^^^^^^^^^
error: docs for function which may panic missing `# Panics` section
--> $DIR/private-doc-errors/doc_lints.rs:38:5
--> tests/ui-toml/private-doc-errors/doc_lints.rs:38:5
|
LL | fn private(&self) {
| ^^^^^^^^^^^^^^^^^
|
note: first possible panic found here
--> $DIR/private-doc-errors/doc_lints.rs:41:9
--> tests/ui-toml/private-doc-errors/doc_lints.rs:41:9
|
LL | panic!();
| ^^^^^^^^
note: the lint level is defined here
--> $DIR/private-doc-errors/doc_lints.rs:4:5
--> tests/ui-toml/private-doc-errors/doc_lints.rs:4:5
|
LL | clippy::missing_panics_doc
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: unsafe function's docs miss `# Safety` section
--> $DIR/private-doc-errors/doc_lints.rs:49:9
--> tests/ui-toml/private-doc-errors/doc_lints.rs:49:9
|
LL | pub unsafe fn f() {}
| ^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: missing documentation for a function
--> $DIR/pub_crate_missing_docs/pub_crate_missing_doc.rs:13:5
--> tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs:13:5
|
LL | pub(crate) fn crate_no_docs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -8,25 +8,25 @@ LL | pub(crate) fn crate_no_docs() {}
= help: to override `-D warnings` add `#[allow(clippy::missing_docs_in_private_items)]`
error: missing documentation for a function
--> $DIR/pub_crate_missing_docs/pub_crate_missing_doc.rs:16:5
--> tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs:16:5
|
LL | pub(super) fn super_no_docs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a function
--> $DIR/pub_crate_missing_docs/pub_crate_missing_doc.rs:24:9
--> tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs:24:9
|
LL | pub(crate) fn sub_crate_no_docs() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a struct field
--> $DIR/pub_crate_missing_docs/pub_crate_missing_doc.rs:34:9
--> tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs:34:9
|
LL | pub(crate) crate_field_no_docs: (),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a struct
--> $DIR/pub_crate_missing_docs/pub_crate_missing_doc.rs:40:5
--> tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs:40:5
|
LL | / pub(crate) struct CrateStructNoDocs {
LL | | /// some docs
@ -38,13 +38,13 @@ LL | | }
| |_____^
error: missing documentation for a struct field
--> $DIR/pub_crate_missing_docs/pub_crate_missing_doc.rs:43:9
--> tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs:43:9
|
LL | pub(crate) crate_field_no_docs: (),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a type alias
--> $DIR/pub_crate_missing_docs/pub_crate_missing_doc.rs:52:1
--> tests/ui-toml/pub_crate_missing_docs/pub_crate_missing_doc.rs:52:1
|
LL | type CrateTypedefNoDocs = String;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:15:9
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:15:9
|
LL | pub _b: u8,
| ^^^^^^
@ -9,7 +9,7 @@ LL | pub _b: u8,
= help: to override `-D warnings` add `#[allow(clippy::pub_underscore_fields)]`
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:23:13
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:23:13
|
LL | pub(in crate::inner) _f: Option<()>,
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -17,7 +17,7 @@ LL | pub(in crate::inner) _f: Option<()>,
= help: consider removing the underscore, or making the field private
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:27:13
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:27:13
|
LL | pub _g: String,
| ^^^^^^
@ -25,7 +25,7 @@ LL | pub _g: String,
= help: consider removing the underscore, or making the field private
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:34:9
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:34:9
|
LL | pub _a: usize,
| ^^^^^^
@ -33,7 +33,7 @@ LL | pub _a: usize,
= help: consider removing the underscore, or making the field private
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:41:9
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:41:9
|
LL | pub _c: i64,
| ^^^^^^
@ -41,7 +41,7 @@ LL | pub _c: i64,
= help: consider removing the underscore, or making the field private
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:44:9
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:44:9
|
LL | pub _e: Option<u8>,
| ^^^^^^
@ -49,7 +49,7 @@ LL | pub _e: Option<u8>,
= help: consider removing the underscore, or making the field private
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:57:9
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:57:9
|
LL | pub(crate) _b: Option<String>,
| ^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: field marked as public but also inferred as unused because it's prefixed with `_`
--> $DIR/pub_underscore_fields/pub_underscore_fields.rs:15:9
--> tests/ui-toml/pub_underscore_fields/pub_underscore_fields.rs:15:9
|
LL | pub _b: u8,
| ^^^^^^

View file

@ -1,5 +1,5 @@
error: the `Err`-variant returned from this function is very large
--> $DIR/result_large_err/result_large_err.rs:6:12
--> tests/ui-toml/result_large_err/result_large_err.rs:6:12
|
LL | fn f2() -> Result<(), [u8; 512]> {
| ^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 512 bytes

View file

@ -1,5 +1,5 @@
error: consider moving the `;` outside the block for consistent formatting
--> $DIR/semicolon_block/both.rs:42:5
--> tests/ui-toml/semicolon_block/both.rs:42:5
|
LL | { unit_fn_block(); }
| ^^^^^^^^^^^^^^^^^^^^
@ -13,7 +13,7 @@ LL + { unit_fn_block() };
|
error: consider moving the `;` outside the block for consistent formatting
--> $DIR/semicolon_block/both.rs:43:5
--> tests/ui-toml/semicolon_block/both.rs:43:5
|
LL | unsafe { unit_fn_block(); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -25,7 +25,7 @@ LL + unsafe { unit_fn_block() };
|
error: consider moving the `;` inside the block for consistent formatting
--> $DIR/semicolon_block/both.rs:48:5
--> tests/ui-toml/semicolon_block/both.rs:48:5
|
LL | / {
LL | | unit_fn_block();
@ -42,7 +42,7 @@ LL ~ }
|
error: consider moving the `;` outside the block for consistent formatting
--> $DIR/semicolon_block/both.rs:62:5
--> tests/ui-toml/semicolon_block/both.rs:62:5
|
LL | { m!(()); }
| ^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: consider moving the `;` inside the block for consistent formatting
--> $DIR/semicolon_block/semicolon_inside_block.rs:47:5
--> tests/ui-toml/semicolon_block/semicolon_inside_block.rs:47:5
|
LL | / {
LL | | unit_fn_block();

View file

@ -1,5 +1,5 @@
error: consider moving the `;` outside the block for consistent formatting
--> $DIR/semicolon_block/semicolon_outside_block.rs:41:5
--> tests/ui-toml/semicolon_block/semicolon_outside_block.rs:41:5
|
LL | { unit_fn_block(); }
| ^^^^^^^^^^^^^^^^^^^^
@ -13,7 +13,7 @@ LL + { unit_fn_block() };
|
error: consider moving the `;` outside the block for consistent formatting
--> $DIR/semicolon_block/semicolon_outside_block.rs:42:5
--> tests/ui-toml/semicolon_block/semicolon_outside_block.rs:42:5
|
LL | unsafe { unit_fn_block(); }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -25,7 +25,7 @@ LL + unsafe { unit_fn_block() };
|
error: consider moving the `;` outside the block for consistent formatting
--> $DIR/semicolon_block/semicolon_outside_block.rs:61:5
--> tests/ui-toml/semicolon_block/semicolon_outside_block.rs:61:5
|
LL | { m!(()); }
| ^^^^^^^^^^^

View file

@ -1,11 +1,11 @@
error: some fields in `NoGeneric` are not safe to be sent to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:11:1
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:11:1
|
LL | unsafe impl Send for NoGeneric {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: it is not safe to send field `rc_is_not_send` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:8:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:8:5
|
LL | rc_is_not_send: Rc<String>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -14,75 +14,75 @@ LL | rc_is_not_send: Rc<String>,
= help: to override `-D warnings` add `#[allow(clippy::non_send_fields_in_send_ty)]`
error: some fields in `MultiField<T>` are not safe to be sent to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:19:1
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:19:1
|
LL | unsafe impl<T> Send for MultiField<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: it is not safe to send field `field1` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:14:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:14:5
|
LL | field1: T,
| ^^^^^^^^^
= help: add `T: Send` bound in `Send` impl
note: it is not safe to send field `field2` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:15:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:15:5
|
LL | field2: T,
| ^^^^^^^^^
= help: add `T: Send` bound in `Send` impl
note: it is not safe to send field `field3` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:16:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:16:5
|
LL | field3: T,
| ^^^^^^^^^
= help: add `T: Send` bound in `Send` impl
error: some fields in `MyOption<T>` are not safe to be sent to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:26:1
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:26:1
|
LL | unsafe impl<T> Send for MyOption<T> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: it is not safe to send field `0` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:22:12
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:22:12
|
LL | MySome(T),
| ^
= help: add `T: Send` bound in `Send` impl
error: some fields in `HeuristicTest` are not safe to be sent to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:41:1
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:41:1
|
LL | unsafe impl Send for HeuristicTest {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: it is not safe to send field `field1` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:34:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:34:5
|
LL | field1: Vec<*const NonSend>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field2` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:35:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:35:5
|
LL | field2: [*const NonSend; 3],
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field3` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:36:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:36:5
|
LL | field3: (*const NonSend, *const NonSend, *const NonSend),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field4` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:37:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:37:5
|
LL | field4: (*const NonSend, Rc<u8>),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: use a thread-safe type that implements `Send`
note: it is not safe to send field `field5` to another thread
--> $DIR/strict_non_send_fields_in_send_ty/test.rs:38:5
--> tests/ui-toml/strict_non_send_fields_in_send_ty/test.rs:38:5
|
LL | field5: Vec<Vec<*const NonSend>>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: more than 0 bools in a struct
--> $DIR/struct_excessive_bools/test.rs:3:1
--> tests/ui-toml/struct_excessive_bools/test.rs:3:1
|
LL | / struct S {
LL | | a: bool,

View file

@ -1,17 +1,17 @@
error[E0080]: evaluation of `main::{constant#3}` failed
--> $DIR/suppress_lint_in_const/test.rs:38:14
--> tests/ui-toml/suppress_lint_in_const/test.rs:38:14
|
LL | const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
| ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
note: erroneous constant encountered
--> $DIR/suppress_lint_in_const/test.rs:38:5
--> tests/ui-toml/suppress_lint_in_const/test.rs:38:5
|
LL | const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
| ^^^^^^^^^^^^^^^^^^^^^^
error: indexing may panic
--> $DIR/suppress_lint_in_const/test.rs:29:5
--> tests/ui-toml/suppress_lint_in_const/test.rs:29:5
|
LL | x[index];
| ^^^^^^^^
@ -21,7 +21,7 @@ LL | x[index];
= help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]`
error: indexing may panic
--> $DIR/suppress_lint_in_const/test.rs:47:5
--> tests/ui-toml/suppress_lint_in_const/test.rs:47:5
|
LL | v[0];
| ^^^^
@ -29,7 +29,7 @@ LL | v[0];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/suppress_lint_in_const/test.rs:48:5
--> tests/ui-toml/suppress_lint_in_const/test.rs:48:5
|
LL | v[10];
| ^^^^^
@ -37,7 +37,7 @@ LL | v[10];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/suppress_lint_in_const/test.rs:49:5
--> tests/ui-toml/suppress_lint_in_const/test.rs:49:5
|
LL | v[1 << 3];
| ^^^^^^^^^
@ -45,7 +45,7 @@ LL | v[1 << 3];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/suppress_lint_in_const/test.rs:55:5
--> tests/ui-toml/suppress_lint_in_const/test.rs:55:5
|
LL | v[N];
| ^^^^
@ -53,7 +53,7 @@ LL | v[N];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/suppress_lint_in_const/test.rs:56:5
--> tests/ui-toml/suppress_lint_in_const/test.rs:56:5
|
LL | v[M];
| ^^^^
@ -61,7 +61,7 @@ LL | v[M];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error[E0080]: evaluation of constant value failed
--> $DIR/suppress_lint_in_const/test.rs:16:24
--> tests/ui-toml/suppress_lint_in_const/test.rs:16:24
|
LL | const REF_ERR: &i32 = &ARR[idx4()]; // Ok, let rustc handle const contexts.
| ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4

View file

@ -1,5 +1,5 @@
error: use of a disallowed/placeholder name `toto`
--> $DIR/toml_disallow/conf_french_disallowed_name.rs:6:9
--> tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs:6:9
|
LL | fn test(toto: ()) {}
| ^^^^
@ -8,37 +8,37 @@ LL | fn test(toto: ()) {}
= help: to override `-D warnings` add `#[allow(clippy::disallowed_names)]`
error: use of a disallowed/placeholder name `toto`
--> $DIR/toml_disallow/conf_french_disallowed_name.rs:9:9
--> tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs:9:9
|
LL | let toto = 42;
| ^^^^
error: use of a disallowed/placeholder name `tata`
--> $DIR/toml_disallow/conf_french_disallowed_name.rs:10:9
--> tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs:10:9
|
LL | let tata = 42;
| ^^^^
error: use of a disallowed/placeholder name `titi`
--> $DIR/toml_disallow/conf_french_disallowed_name.rs:11:9
--> tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs:11:9
|
LL | let titi = 42;
| ^^^^
error: use of a disallowed/placeholder name `toto`
--> $DIR/toml_disallow/conf_french_disallowed_name.rs:17:10
--> tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs:17:10
|
LL | (toto, Some(tata), titi @ Some(_)) => (),
| ^^^^
error: use of a disallowed/placeholder name `tata`
--> $DIR/toml_disallow/conf_french_disallowed_name.rs:17:21
--> tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs:17:21
|
LL | (toto, Some(tata), titi @ Some(_)) => (),
| ^^^^
error: use of a disallowed/placeholder name `titi`
--> $DIR/toml_disallow/conf_french_disallowed_name.rs:17:28
--> tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs:17:28
|
LL | (toto, Some(tata), titi @ Some(_)) => (),
| ^^^^

View file

@ -1,5 +1,5 @@
error: use of a disallowed method `regex::Regex::new`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:35:14
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:35:14
|
LL | let re = Regex::new(r"ab.*c").unwrap();
| ^^^^^^^^^^^^^^^^^^^^
@ -8,7 +8,7 @@ LL | let re = Regex::new(r"ab.*c").unwrap();
= help: to override `-D warnings` add `#[allow(clippy::disallowed_methods)]`
error: use of a disallowed method `regex::Regex::is_match`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:36:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:36:5
|
LL | re.is_match("abc");
| ^^^^^^^^^^^^^^^^^^
@ -16,73 +16,73 @@ LL | re.is_match("abc");
= note: no matching allowed (from clippy.toml)
error: use of a disallowed method `std::iter::Iterator::sum`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:39:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:39:5
|
LL | a.iter().sum::<i32>();
| ^^^^^^^^^^^^^^^^^^^^^
error: use of a disallowed method `slice::sort_unstable`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:41:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:41:5
|
LL | a.sort_unstable();
| ^^^^^^^^^^^^^^^^^
error: use of a disallowed method `f32::clamp`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:43:13
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:43:13
|
LL | let _ = 2.0f32.clamp(3.0f32, 4.0f32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: use of a disallowed method `regex::Regex::new`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:46:61
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:46:61
|
LL | let indirect: fn(&str) -> Result<Regex, regex::Error> = Regex::new;
| ^^^^^^^^^^
error: use of a disallowed method `f32::clamp`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:49:28
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:49:28
|
LL | let in_call = Box::new(f32::clamp);
| ^^^^^^^^^^
error: use of a disallowed method `regex::Regex::new`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:50:53
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:50:53
|
LL | let in_method_call = ["^", "$"].into_iter().map(Regex::new);
| ^^^^^^^^^^
error: use of a disallowed method `futures::stream::select_all`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:53:31
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:53:31
|
LL | let same_name_as_module = select_all(vec![empty::<()>()]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: use of a disallowed method `conf_disallowed_methods::local_fn`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:55:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:55:5
|
LL | local_fn();
| ^^^^^^^^^^
error: use of a disallowed method `conf_disallowed_methods::local_mod::f`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:56:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:56:5
|
LL | local_mod::f();
| ^^^^^^^^^^^^^^
error: use of a disallowed method `conf_disallowed_methods::Struct::method`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:58:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:58:5
|
LL | s.method();
| ^^^^^^^^^^
error: use of a disallowed method `conf_disallowed_methods::Trait::provided_method`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:59:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:59:5
|
LL | s.provided_method();
| ^^^^^^^^^^^^^^^^^^^
error: use of a disallowed method `conf_disallowed_methods::Trait::implemented_method`
--> $DIR/toml_disallowed_methods/conf_disallowed_methods.rs:60:5
--> tests/ui-toml/toml_disallowed_methods/conf_disallowed_methods.rs:60:5
|
LL | s.implemented_method();
| ^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:7:1
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:7:1
|
LL | use std::sync::atomic::AtomicU32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -8,61 +8,61 @@ LL | use std::sync::atomic::AtomicU32;
= help: to override `-D warnings` add `#[allow(clippy::disallowed_types)]`
error: `std::time::Instant` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:8:1
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:8:1
|
LL | use std::time::Instant as Sneaky;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::time::Instant` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:12:33
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:12:33
|
LL | fn bad_return_type() -> fn() -> Sneaky {
| ^^^^^^
error: `std::time::Instant` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:16:28
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:16:28
|
LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {}
| ^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:16:39
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:16:39
|
LL | fn bad_arg_type(_: impl Fn(Sneaky) -> foo::atomic::AtomicU32) {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: `std::io::Read` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:18:22
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:18:22
|
LL | fn trait_obj(_: &dyn std::io::Read) {}
| ^^^^^^^^^^^^^
error: `usize` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:20:33
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:20:33
|
LL | fn full_and_single_path_prim(_: usize, _: bool) {}
| ^^^^^
error: `bool` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:20:43
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:20:43
|
LL | fn full_and_single_path_prim(_: usize, _: bool) {}
| ^^^^
error: `usize` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:22:28
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:22:28
|
LL | fn const_generics<const C: usize>() {}
| ^^^^^
error: `usize` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:24:24
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:24:24
|
LL | struct GenArg<const U: usize>([u8; U]);
| ^^^^^
error: `std::net::Ipv4Addr` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:28:10
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:28:10
|
LL | fn ip(_: std::net::Ipv4Addr) {}
| ^^^^^^^^^^^^^^^^^^
@ -70,61 +70,61 @@ LL | fn ip(_: std::net::Ipv4Addr) {}
= note: no IPv4 allowed (from clippy.toml)
error: `std::net::TcpListener` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:30:16
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:30:16
|
LL | fn listener(_: std::net::TcpListener) {}
| ^^^^^^^^^^^^^^^^^^^^^
error: `std::collections::HashMap` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:34:48
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:34:48
|
LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::collections::HashMap` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:34:12
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:34:12
|
LL | let _: std::collections::HashMap<(), ()> = std::collections::HashMap::new();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::time::Instant` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:35:13
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:35:13
|
LL | let _ = Sneaky::now();
| ^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:36:13
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:36:13
|
LL | let _ = foo::atomic::AtomicU32::new(0);
| ^^^^^^^^^^^^^^^^^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:37:17
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:37:17
|
LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `std::sync::atomic::AtomicU32` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:37:48
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:37:48
|
LL | static FOO: std::sync::atomic::AtomicU32 = foo::atomic::AtomicU32::new(1);
| ^^^^^^^^^^^^^^^^^^^^^^
error: `syn::TypePath` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:38:43
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:38:43
|
LL | let _: std::collections::BTreeMap<(), syn::TypePath> = Default::default();
| ^^^^^^^^^^^^^
error: `syn::Ident` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:39:13
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:39:13
|
LL | let _ = syn::Ident::new("", todo!());
| ^^^^^^^^^^
error: `usize` is not allowed according to config
--> $DIR/toml_disallowed_types/conf_disallowed_types.rs:41:12
--> tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs:41:12
|
LL | let _: usize = 64_usize;
| ^^^^^

View file

@ -1,5 +1,5 @@
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
--> $DIR/toml_trivially_copy/test.rs:15:11
--> tests/ui-toml/toml_trivially_copy/test.rs:15:11
|
LL | fn bad(x: &u16, y: &Foo) {}
| ^^^^ help: consider passing by value instead: `u16`
@ -8,7 +8,7 @@ LL | fn bad(x: &u16, y: &Foo) {}
= help: to override `-D warnings` add `#[allow(clippy::trivially_copy_pass_by_ref)]`
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
--> $DIR/toml_trivially_copy/test.rs:15:20
--> tests/ui-toml/toml_trivially_copy/test.rs:15:20
|
LL | fn bad(x: &u16, y: &Foo) {}
| ^^^^ help: consider passing by value instead: `Foo`

View file

@ -72,7 +72,7 @@ error: error reading Clippy's configuration file: unknown field `foobar`, expect
vec-box-size-threshold
verbose-bit-mask-threshold
warn-on-all-wildcard-imports
--> $DIR/$DIR/toml_unknown_key/clippy.toml:2:1
--> $DIR/tests/ui-toml/toml_unknown_key/clippy.toml:2:1
|
LL | foobar = 42
| ^^^^^^
@ -151,7 +151,7 @@ error: error reading Clippy's configuration file: unknown field `barfoo`, expect
vec-box-size-threshold
verbose-bit-mask-threshold
warn-on-all-wildcard-imports
--> $DIR/$DIR/toml_unknown_key/clippy.toml:4:1
--> $DIR/tests/ui-toml/toml_unknown_key/clippy.toml:4:1
|
LL | barfoo = 53
| ^^^^^^
@ -230,7 +230,7 @@ error: error reading Clippy's configuration file: unknown field `allow_mixed_uni
vec-box-size-threshold
verbose-bit-mask-threshold
warn-on-all-wildcard-imports
--> $DIR/$DIR/toml_unknown_key/clippy.toml:7:1
--> $DIR/tests/ui-toml/toml_unknown_key/clippy.toml:7:1
|
LL | allow_mixed_uninlined_format_args = true
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: perhaps you meant: `allow-mixed-uninlined-format-args`

View file

@ -1,5 +1,5 @@
error: local variable doesn't need to be boxed here
--> $DIR/too_large_for_stack/boxed_local.rs:1:6
--> tests/ui-toml/too_large_for_stack/boxed_local.rs:1:6
|
LL | fn f(x: Box<[u8; 500]>) {}
| ^

View file

@ -1,5 +1,5 @@
error: useless use of `vec!`
--> $DIR/too_large_for_stack/useless_vec.rs:4:13
--> tests/ui-toml/too_large_for_stack/useless_vec.rs:4:13
|
LL | let x = vec![0u8; 500];
| ^^^^^^^^^^^^^^ help: you can use an array directly: `[0u8; 500]`

View file

@ -1,5 +1,5 @@
error: this function has too many arguments (11/10)
--> $DIR/too_many_arguments/too_many_arguments.rs:4:1
--> tests/ui-toml/too_many_arguments/too_many_arguments.rs:4:1
|
LL | fn too_many(p1: u8, p2: u8, p3: u8, p4: u8, p5: u8, p6: u8, p7: u8, p8: u8, p9: u8, p10: u8, p11: u8) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: very complex type used. Consider factoring parts into `type` definitions
--> $DIR/type_complexity/type_complexity.rs:4:10
--> tests/ui-toml/type_complexity/type_complexity.rs:4:10
|
LL | fn f2(_: (u8, (u8, (u8, (u8, (u8, (u8, u8))))))) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: this type has already been used as a bound predicate
--> $DIR/type_repetition_in_bounds/main.rs:13:5
--> tests/ui-toml/type_repetition_in_bounds/main.rs:13:5
|
LL | T: Unpin + PartialEq,
| ^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:266:19
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:266:19
|
LL | /* Safety: */ unsafe {}
| ^^^^^^^^^
@ -9,7 +9,7 @@ LL | /* Safety: */ unsafe {}
= help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:270:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:270:5
|
LL | unsafe {}
| ^^^^^^^^^
@ -17,7 +17,7 @@ LL | unsafe {}
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:14
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
| ^^^^^^^^^^^^^
@ -25,7 +25,7 @@ LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:29
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:29
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
| ^^^^^^^^^^^^^
@ -33,7 +33,7 @@ LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:48
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:48
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
| ^^^^^^^^^^^^^
@ -41,7 +41,7 @@ LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:18
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:18
|
LL | let _ = (42, unsafe {}, "test", unsafe {});
| ^^^^^^^^^
@ -49,7 +49,7 @@ LL | let _ = (42, unsafe {}, "test", unsafe {});
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:37
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:37
|
LL | let _ = (42, unsafe {}, "test", unsafe {});
| ^^^^^^^^^
@ -57,7 +57,7 @@ LL | let _ = (42, unsafe {}, "test", unsafe {});
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:282:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:282:14
|
LL | let _ = *unsafe { &42 };
| ^^^^^^^^^^^^^^
@ -65,7 +65,7 @@ LL | let _ = *unsafe { &42 };
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:287:19
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:287:19
|
LL | let _ = match unsafe {} {
| ^^^^^^^^^
@ -73,7 +73,7 @@ LL | let _ = match unsafe {} {
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:293:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:293:14
|
LL | let _ = &unsafe {};
| ^^^^^^^^^
@ -81,7 +81,7 @@ LL | let _ = &unsafe {};
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:297:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:297:14
|
LL | let _ = [unsafe {}; 5];
| ^^^^^^^^^
@ -89,7 +89,7 @@ LL | let _ = [unsafe {}; 5];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:301:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:301:13
|
LL | let _ = unsafe {};
| ^^^^^^^^^
@ -97,7 +97,7 @@ LL | let _ = unsafe {};
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:311:8
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:311:8
|
LL | t!(unsafe {});
| ^^^^^^^^^
@ -105,7 +105,7 @@ LL | t!(unsafe {});
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:317:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:317:13
|
LL | unsafe {}
| ^^^^^^^^^
@ -117,7 +117,7 @@ LL | t!();
= note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:325:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:325:5
|
LL | unsafe {} // SAFETY:
| ^^^^^^^^^
@ -125,7 +125,7 @@ LL | unsafe {} // SAFETY:
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:329:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:329:5
|
LL | unsafe {
| ^^^^^^^^
@ -133,7 +133,7 @@ LL | unsafe {
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:339:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:339:5
|
LL | unsafe {};
| ^^^^^^^^^
@ -141,7 +141,7 @@ LL | unsafe {};
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:343:20
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:343:20
|
LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -149,7 +149,7 @@ LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:350:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:350:5
|
LL | unsafe impl A for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -157,7 +157,7 @@ LL | unsafe impl A for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:357:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:357:9
|
LL | unsafe impl B for (u32) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -165,7 +165,7 @@ LL | unsafe impl B for (u32) {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:378:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:378:13
|
LL | unsafe impl T for $t {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -177,7 +177,7 @@ LL | no_safety_comment!(());
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
|
LL | unsafe impl T for $t {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -189,7 +189,7 @@ LL | no_safety_comment!(());
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:411:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:411:5
|
LL | unsafe impl T for (i32) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -197,7 +197,7 @@ LL | unsafe impl T for (i32) {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
|
LL | unsafe impl T for $t {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -209,7 +209,7 @@ LL | no_safety_comment!(u32);
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:417:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:417:5
|
LL | unsafe impl T for (bool) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -217,7 +217,7 @@ LL | unsafe impl T for (bool) {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:463:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:463:5
|
LL | unsafe impl NoComment for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -225,7 +225,7 @@ LL | unsafe impl NoComment for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:467:19
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:467:19
|
LL | /* SAFETY: */ unsafe impl InlineComment for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -233,7 +233,7 @@ LL | /* SAFETY: */ unsafe impl InlineComment for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:471:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:471:5
|
LL | unsafe impl TrailingComment for () {} // SAFETY:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -241,13 +241,13 @@ LL | unsafe impl TrailingComment for () {} // SAFETY:
= help: consider adding a safety comment on the preceding line
error: constant item has unnecessary safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:475:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:475:5
|
LL | const BIG_NUMBER: i32 = 1000000;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:474:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:474:5
|
LL | // SAFETY:
| ^^^^^^^^^^
@ -255,7 +255,7 @@ LL | // SAFETY:
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_safety_comment)]`
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:476:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:476:5
|
LL | unsafe impl Interference for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -263,7 +263,7 @@ LL | unsafe impl Interference for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:483:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:483:5
|
LL | unsafe impl ImplInFn for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -271,7 +271,7 @@ LL | unsafe impl ImplInFn for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:492:1
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:492:1
|
LL | unsafe impl CrateRoot for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -279,7 +279,7 @@ LL | unsafe impl CrateRoot for () {}
= help: consider adding a safety comment on the preceding line
error: statement has unnecessary safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:505:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:505:5
|
LL | / let _ = {
LL | | if unsafe { true } {
@ -291,13 +291,13 @@ LL | | };
| |______^
|
help: consider removing the safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:504:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:504:5
|
LL | // SAFETY: this is more than one level away, so it should warn
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:506:12
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:506:12
|
LL | if unsafe { true } {
| ^^^^^^^^^^^^^^^
@ -305,7 +305,7 @@ LL | if unsafe { true } {
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:509:23
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:509:23
|
LL | let bar = unsafe {};
| ^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:266:19
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:266:19
|
LL | /* Safety: */ unsafe {}
| ^^^^^^^^^
@ -9,7 +9,7 @@ LL | /* Safety: */ unsafe {}
= help: to override `-D warnings` add `#[allow(clippy::undocumented_unsafe_blocks)]`
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:270:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:270:5
|
LL | unsafe {}
| ^^^^^^^^^
@ -17,7 +17,7 @@ LL | unsafe {}
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:14
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
| ^^^^^^^^^^^^^
@ -25,7 +25,7 @@ LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:29
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:29
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
| ^^^^^^^^^^^^^
@ -33,7 +33,7 @@ LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:48
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:274:48
|
LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
| ^^^^^^^^^^^^^
@ -41,7 +41,7 @@ LL | let _ = [unsafe { 14 }, unsafe { 15 }, 42, unsafe { 16 }];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:18
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:18
|
LL | let _ = (42, unsafe {}, "test", unsafe {});
| ^^^^^^^^^
@ -49,7 +49,7 @@ LL | let _ = (42, unsafe {}, "test", unsafe {});
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:37
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:278:37
|
LL | let _ = (42, unsafe {}, "test", unsafe {});
| ^^^^^^^^^
@ -57,7 +57,7 @@ LL | let _ = (42, unsafe {}, "test", unsafe {});
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:282:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:282:14
|
LL | let _ = *unsafe { &42 };
| ^^^^^^^^^^^^^^
@ -65,7 +65,7 @@ LL | let _ = *unsafe { &42 };
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:287:19
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:287:19
|
LL | let _ = match unsafe {} {
| ^^^^^^^^^
@ -73,7 +73,7 @@ LL | let _ = match unsafe {} {
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:293:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:293:14
|
LL | let _ = &unsafe {};
| ^^^^^^^^^
@ -81,7 +81,7 @@ LL | let _ = &unsafe {};
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:297:14
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:297:14
|
LL | let _ = [unsafe {}; 5];
| ^^^^^^^^^
@ -89,7 +89,7 @@ LL | let _ = [unsafe {}; 5];
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:301:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:301:13
|
LL | let _ = unsafe {};
| ^^^^^^^^^
@ -97,7 +97,7 @@ LL | let _ = unsafe {};
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:311:8
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:311:8
|
LL | t!(unsafe {});
| ^^^^^^^^^
@ -105,7 +105,7 @@ LL | t!(unsafe {});
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:317:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:317:13
|
LL | unsafe {}
| ^^^^^^^^^
@ -117,7 +117,7 @@ LL | t!();
= note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:325:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:325:5
|
LL | unsafe {} // SAFETY:
| ^^^^^^^^^
@ -125,7 +125,7 @@ LL | unsafe {} // SAFETY:
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:329:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:329:5
|
LL | unsafe {
| ^^^^^^^^
@ -133,7 +133,7 @@ LL | unsafe {
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:339:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:339:5
|
LL | unsafe {};
| ^^^^^^^^^
@ -141,7 +141,7 @@ LL | unsafe {};
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:343:20
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:343:20
|
LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -149,7 +149,7 @@ LL | println!("{}", unsafe { String::from_utf8_unchecked(vec![]) });
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:350:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:350:5
|
LL | unsafe impl A for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -157,7 +157,7 @@ LL | unsafe impl A for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:357:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:357:9
|
LL | unsafe impl B for (u32) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -165,7 +165,7 @@ LL | unsafe impl B for (u32) {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:378:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:378:13
|
LL | unsafe impl T for $t {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -177,7 +177,7 @@ LL | no_safety_comment!(());
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
|
LL | unsafe impl T for $t {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -189,7 +189,7 @@ LL | no_safety_comment!(());
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:411:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:411:5
|
LL | unsafe impl T for (i32) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -197,7 +197,7 @@ LL | unsafe impl T for (i32) {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:403:13
|
LL | unsafe impl T for $t {}
| ^^^^^^^^^^^^^^^^^^^^^^^
@ -209,7 +209,7 @@ LL | no_safety_comment!(u32);
= note: this error originates in the macro `no_safety_comment` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:417:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:417:5
|
LL | unsafe impl T for (bool) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -217,7 +217,7 @@ LL | unsafe impl T for (bool) {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:463:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:463:5
|
LL | unsafe impl NoComment for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -225,7 +225,7 @@ LL | unsafe impl NoComment for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:467:19
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:467:19
|
LL | /* SAFETY: */ unsafe impl InlineComment for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -233,7 +233,7 @@ LL | /* SAFETY: */ unsafe impl InlineComment for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:471:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:471:5
|
LL | unsafe impl TrailingComment for () {} // SAFETY:
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -241,13 +241,13 @@ LL | unsafe impl TrailingComment for () {} // SAFETY:
= help: consider adding a safety comment on the preceding line
error: constant item has unnecessary safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:475:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:475:5
|
LL | const BIG_NUMBER: i32 = 1000000;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
help: consider removing the safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:474:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:474:5
|
LL | // SAFETY:
| ^^^^^^^^^^
@ -255,7 +255,7 @@ LL | // SAFETY:
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_safety_comment)]`
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:476:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:476:5
|
LL | unsafe impl Interference for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -263,7 +263,7 @@ LL | unsafe impl Interference for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:483:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:483:5
|
LL | unsafe impl ImplInFn for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -271,7 +271,7 @@ LL | unsafe impl ImplInFn for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe impl missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:492:1
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:492:1
|
LL | unsafe impl CrateRoot for () {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -279,7 +279,7 @@ LL | unsafe impl CrateRoot for () {}
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:502:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:502:9
|
LL | unsafe {};
| ^^^^^^^^^
@ -287,7 +287,7 @@ LL | unsafe {};
= help: consider adding a safety comment on the preceding line
error: statement has unnecessary safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:505:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:505:5
|
LL | / let _ = {
LL | | if unsafe { true } {
@ -299,13 +299,13 @@ LL | | };
| |______^
|
help: consider removing the safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:504:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:504:5
|
LL | // SAFETY: this is more than one level away, so it should warn
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:506:12
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:506:12
|
LL | if unsafe { true } {
| ^^^^^^^^^^^^^^^
@ -313,7 +313,7 @@ LL | if unsafe { true } {
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:509:23
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:509:23
|
LL | let bar = unsafe {};
| ^^^^^^^^^
@ -321,7 +321,7 @@ LL | let bar = unsafe {};
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:527:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:527:9
|
LL | unsafe { a_function_with_a_very_long_name_to_break_the_line() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -329,7 +329,7 @@ LL | unsafe { a_function_with_a_very_long_name_to_break_the_line() };
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:531:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:531:9
|
LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -337,7 +337,7 @@ LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line()
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:535:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:535:9
|
LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -345,7 +345,7 @@ LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line()
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:541:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:541:5
|
LL | unsafe {}
| ^^^^^^^^^
@ -353,7 +353,7 @@ LL | unsafe {}
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:545:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:545:5
|
LL | unsafe {
| ^^^^^^^^
@ -361,7 +361,7 @@ LL | unsafe {
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:552:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:552:9
|
LL | unsafe { a_function_with_a_very_long_name_to_break_the_line() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -369,7 +369,7 @@ LL | unsafe { a_function_with_a_very_long_name_to_break_the_line() };
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:557:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:557:9
|
LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -377,7 +377,7 @@ LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line()
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:563:9
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:563:9
|
LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line() };
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -385,7 +385,7 @@ LL | unsafe { a_const_function_with_a_very_long_name_to_break_the_line()
= help: consider adding a safety comment on the preceding line
error: unsafe block missing a safety comment
--> $DIR/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:568:5
--> tests/ui-toml/undocumented_unsafe_blocks/undocumented_unsafe_blocks.rs:568:5
|
LL | unsafe {}
| ^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: boxed return of the sized type `[u8; 64]`
--> $DIR/unnecessary_box_returns/unnecessary_box_returns.rs:3:11
--> tests/ui-toml/unnecessary_box_returns/unnecessary_box_returns.rs:3:11
|
LL | fn f() -> Box<[u8; 64]> {
| ^^^^^^^^^^^^^ help: try: `[u8; 64]`

View file

@ -1,5 +1,5 @@
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:38:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:38:17
|
LL | let _ = boxed_slice.get(1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&boxed_slice[1]`
@ -8,7 +8,7 @@ LL | let _ = boxed_slice.get(1).unwrap();
= help: to override `-D warnings` add `#[allow(clippy::get_unwrap)]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:38:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:38:17
|
LL | let _ = boxed_slice.get(1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -19,13 +19,13 @@ LL | let _ = boxed_slice.get(1).unwrap();
= help: to override `-D warnings` add `#[allow(clippy::unwrap_used)]`
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:39:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:39:17
|
LL | let _ = some_slice.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&some_slice[0]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:39:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:39:17
|
LL | let _ = some_slice.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -34,13 +34,13 @@ LL | let _ = some_slice.get(0).unwrap();
= help: consider using `expect()` to provide a better panic message
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:40:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:40:17
|
LL | let _ = some_vec.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&some_vec[0]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:40:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:40:17
|
LL | let _ = some_vec.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^
@ -49,13 +49,13 @@ LL | let _ = some_vec.get(0).unwrap();
= help: consider using `expect()` to provide a better panic message
error: called `.get().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:41:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:41:17
|
LL | let _ = some_vecdeque.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&some_vecdeque[0]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:41:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:41:17
|
LL | let _ = some_vecdeque.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -64,13 +64,13 @@ LL | let _ = some_vecdeque.get(0).unwrap();
= help: consider using `expect()` to provide a better panic message
error: called `.get().unwrap()` on a HashMap. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:42:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:42:17
|
LL | let _ = some_hashmap.get(&1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&some_hashmap[&1]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:42:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:42:17
|
LL | let _ = some_hashmap.get(&1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -79,13 +79,13 @@ LL | let _ = some_hashmap.get(&1).unwrap();
= help: consider using `expect()` to provide a better panic message
error: called `.get().unwrap()` on a BTreeMap. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:43:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:43:17
|
LL | let _ = some_btreemap.get(&1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&some_btreemap[&1]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:43:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:43:17
|
LL | let _ = some_btreemap.get(&1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -94,13 +94,13 @@ LL | let _ = some_btreemap.get(&1).unwrap();
= help: consider using `expect()` to provide a better panic message
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:47:21
--> tests/ui-toml/unwrap_used/unwrap_used.rs:47:21
|
LL | let _: u8 = *boxed_slice.get(1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `boxed_slice[1]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:47:22
--> tests/ui-toml/unwrap_used/unwrap_used.rs:47:22
|
LL | let _: u8 = *boxed_slice.get(1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -109,13 +109,13 @@ LL | let _: u8 = *boxed_slice.get(1).unwrap();
= help: consider using `expect()` to provide a better panic message
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:52:9
--> tests/ui-toml/unwrap_used/unwrap_used.rs:52:9
|
LL | *boxed_slice.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `boxed_slice[0]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:52:10
--> tests/ui-toml/unwrap_used/unwrap_used.rs:52:10
|
LL | *boxed_slice.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -124,13 +124,13 @@ LL | *boxed_slice.get_mut(0).unwrap() = 1;
= help: consider using `expect()` to provide a better panic message
error: called `.get_mut().unwrap()` on a slice. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:53:9
--> tests/ui-toml/unwrap_used/unwrap_used.rs:53:9
|
LL | *some_slice.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `some_slice[0]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:53:10
--> tests/ui-toml/unwrap_used/unwrap_used.rs:53:10
|
LL | *some_slice.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -139,13 +139,13 @@ LL | *some_slice.get_mut(0).unwrap() = 1;
= help: consider using `expect()` to provide a better panic message
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:54:9
--> tests/ui-toml/unwrap_used/unwrap_used.rs:54:9
|
LL | *some_vec.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `some_vec[0]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:54:10
--> tests/ui-toml/unwrap_used/unwrap_used.rs:54:10
|
LL | *some_vec.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -154,13 +154,13 @@ LL | *some_vec.get_mut(0).unwrap() = 1;
= help: consider using `expect()` to provide a better panic message
error: called `.get_mut().unwrap()` on a VecDeque. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:55:9
--> tests/ui-toml/unwrap_used/unwrap_used.rs:55:9
|
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `some_vecdeque[0]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:55:10
--> tests/ui-toml/unwrap_used/unwrap_used.rs:55:10
|
LL | *some_vecdeque.get_mut(0).unwrap() = 1;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -169,13 +169,13 @@ LL | *some_vecdeque.get_mut(0).unwrap() = 1;
= help: consider using `expect()` to provide a better panic message
error: called `.get().unwrap()` on a Vec. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:67:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:67:17
|
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `some_vec[0..1]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:67:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:67:17
|
LL | let _ = some_vec.get(0..1).unwrap().to_vec();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -184,13 +184,13 @@ LL | let _ = some_vec.get(0..1).unwrap().to_vec();
= help: consider using `expect()` to provide a better panic message
error: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:68:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:68:17
|
LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `some_vec[0..1]`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used/unwrap_used.rs:68:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:68:17
|
LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -199,13 +199,13 @@ LL | let _ = some_vec.get_mut(0..1).unwrap().to_vec();
= help: consider using `expect()` to provide a better panic message
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:75:13
--> tests/ui-toml/unwrap_used/unwrap_used.rs:75:13
|
LL | let _ = boxed_slice.get(1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&boxed_slice[1]`
error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more concise
--> $DIR/unwrap_used/unwrap_used.rs:93:17
--> tests/ui-toml/unwrap_used/unwrap_used.rs:93:17
|
LL | let _ = Box::new([0]).get(1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&Box::new([0])[1]`

View file

@ -1,5 +1,5 @@
error: name `HTTPResponse` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:3:8
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:3:8
|
LL | struct HTTPResponse; // not linted by default, but with cfg option
| ^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `HttpResponse`
@ -8,73 +8,73 @@ LL | struct HTTPResponse; // not linted by default, but with cfg option
= help: to override `-D warnings` add `#[allow(clippy::upper_case_acronyms)]`
error: name `NS` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:8:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:8:5
|
LL | NS, // not linted
| ^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Ns`
error: name `CWR` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:9:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:9:5
|
LL | CWR,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Cwr`
error: name `ECE` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:10:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:10:5
|
LL | ECE,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Ece`
error: name `URG` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:11:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:11:5
|
LL | URG,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Urg`
error: name `ACK` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:12:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:12:5
|
LL | ACK,
| ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Ack`
error: name `PSH` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:13:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:13:5
|
LL | PSH,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Psh`
error: name `RST` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:14:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:14:5
|
LL | RST,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Rst`
error: name `SYN` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:15:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:15:5
|
LL | SYN,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Syn`
error: name `FIN` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:16:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:16:5
|
LL | FIN,
| ^^^ help: consider making the acronym lowercase, except the initial letter: `Fin`
error: name `GCCLLVMSomething` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:21:8
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:21:8
|
LL | struct GCCLLVMSomething;
| ^^^^^^^^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `GccllvmSomething`
error: name `WASD` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:38:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:38:5
|
LL | WASD(u8),
| ^^^^ help: consider making the acronym lowercase, except the initial letter: `Wasd`
error: name `WASDMixed` contains a capitalized acronym
--> $DIR/upper_case_acronyms_aggressive/upper_case_acronyms.rs:39:5
--> tests/ui-toml/upper_case_acronyms_aggressive/upper_case_acronyms.rs:39:5
|
LL | WASDMixed(String),
| ^^^^^^^^^ help: consider making the acronym lowercase, except the initial letter: `WasdMixed`

View file

@ -1,5 +1,5 @@
error: `Vec<T>` is already on the heap, the boxing is unnecessary
--> $DIR/vec_box_sized/test.rs:9:12
--> tests/ui-toml/vec_box_sized/test.rs:9:12
|
LL | struct Foo(Vec<Box<u8>>);
| ^^^^^^^^^^^^ help: try: `Vec<u8>`
@ -8,13 +8,13 @@ LL | struct Foo(Vec<Box<u8>>);
= help: to override `-D warnings` add `#[allow(clippy::vec_box)]`
error: `Vec<T>` is already on the heap, the boxing is unnecessary
--> $DIR/vec_box_sized/test.rs:10:12
--> tests/ui-toml/vec_box_sized/test.rs:10:12
|
LL | struct Bar(Vec<Box<u16>>);
| ^^^^^^^^^^^^^ help: try: `Vec<u16>`
error: `Vec<T>` is already on the heap, the boxing is unnecessary
--> $DIR/vec_box_sized/test.rs:14:18
--> tests/ui-toml/vec_box_sized/test.rs:14:18
|
LL | struct FooBarBaz(Vec<Box<C>>);
| ^^^^^^^^^^^ help: try: `Vec<C>`

View file

@ -1,5 +1,5 @@
error: bit mask could be simplified with a call to `trailing_zeros`
--> $DIR/verbose_bit_mask/verbose_bit_mask.rs:5:13
--> tests/ui-toml/verbose_bit_mask/verbose_bit_mask.rs:5:13
|
LL | let _ = v & 0b111111 == 0;
| ^^^^^^^^^^^^^^^^^ help: try: `v.trailing_zeros() >= 6`

View file

@ -1,5 +1,5 @@
error: usage of wildcard import
--> $DIR/wildcard_imports/wildcard_imports.rs:18:5
--> tests/ui-toml/wildcard_imports/wildcard_imports.rs:18:5
|
LL | use utils::*;
| ^^^^^^^^ help: try: `utils::{BAR, print}`
@ -8,13 +8,13 @@ LL | use utils::*;
= help: to override `-D warnings` add `#[allow(clippy::wildcard_imports)]`
error: usage of wildcard import
--> $DIR/wildcard_imports/wildcard_imports.rs:20:5
--> tests/ui-toml/wildcard_imports/wildcard_imports.rs:20:5
|
LL | use my_crate::utils::*;
| ^^^^^^^^^^^^^^^^^^ help: try: `my_crate::utils::my_util_fn`
error: usage of wildcard import
--> $DIR/wildcard_imports/wildcard_imports.rs:22:5
--> tests/ui-toml/wildcard_imports/wildcard_imports.rs:22:5
|
LL | use prelude::*;
| ^^^^^^^^^^ help: try: `prelude::FOO`

View file

@ -1,5 +1,5 @@
error: usage of wildcard import
--> $DIR/wildcard_imports_whitelist/wildcard_imports.rs:19:5
--> tests/ui-toml/wildcard_imports_whitelist/wildcard_imports.rs:19:5
|
LL | use utils_plus::*;
| ^^^^^^^^^^^^^ help: try: `utils_plus::do_something`

View file

@ -1,5 +1,5 @@
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:14:5
--> tests/ui/absurd-extreme-comparisons.rs:14:5
|
LL | u <= 0;
| ^^^^^^
@ -9,7 +9,7 @@ LL | u <= 0;
= help: to override `-D warnings` add `#[allow(clippy::absurd_extreme_comparisons)]`
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:16:5
--> tests/ui/absurd-extreme-comparisons.rs:16:5
|
LL | u <= Z;
| ^^^^^^
@ -17,7 +17,7 @@ LL | u <= Z;
= help: because `Z` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `u == Z` instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:18:5
--> tests/ui/absurd-extreme-comparisons.rs:18:5
|
LL | u < Z;
| ^^^^^
@ -25,7 +25,7 @@ LL | u < Z;
= help: because `Z` is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:20:5
--> tests/ui/absurd-extreme-comparisons.rs:20:5
|
LL | Z >= u;
| ^^^^^^
@ -33,7 +33,7 @@ LL | Z >= u;
= help: because `Z` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `Z == u` instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:22:5
--> tests/ui/absurd-extreme-comparisons.rs:22:5
|
LL | Z > u;
| ^^^^^
@ -41,7 +41,7 @@ LL | Z > u;
= help: because `Z` is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:24:5
--> tests/ui/absurd-extreme-comparisons.rs:24:5
|
LL | u > u32::MAX;
| ^^^^^^^^^^^^
@ -49,7 +49,7 @@ LL | u > u32::MAX;
= help: because `u32::MAX` is the maximum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:26:5
--> tests/ui/absurd-extreme-comparisons.rs:26:5
|
LL | u >= u32::MAX;
| ^^^^^^^^^^^^^
@ -57,7 +57,7 @@ LL | u >= u32::MAX;
= help: because `u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u == u32::MAX` instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:28:5
--> tests/ui/absurd-extreme-comparisons.rs:28:5
|
LL | u32::MAX < u;
| ^^^^^^^^^^^^
@ -65,7 +65,7 @@ LL | u32::MAX < u;
= help: because `u32::MAX` is the maximum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:30:5
--> tests/ui/absurd-extreme-comparisons.rs:30:5
|
LL | u32::MAX <= u;
| ^^^^^^^^^^^^^
@ -73,7 +73,7 @@ LL | u32::MAX <= u;
= help: because `u32::MAX` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u32::MAX == u` instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:32:5
--> tests/ui/absurd-extreme-comparisons.rs:32:5
|
LL | 1-1 > u;
| ^^^^^^^
@ -81,7 +81,7 @@ LL | 1-1 > u;
= help: because `1-1` is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:34:5
--> tests/ui/absurd-extreme-comparisons.rs:34:5
|
LL | u >= !0;
| ^^^^^^^
@ -89,7 +89,7 @@ LL | u >= !0;
= help: because `!0` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `u == !0` instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:36:5
--> tests/ui/absurd-extreme-comparisons.rs:36:5
|
LL | u <= 12 - 2*6;
| ^^^^^^^^^^^^^
@ -97,7 +97,7 @@ LL | u <= 12 - 2*6;
= help: because `12 - 2*6` is the minimum value for this type, the case where the two sides are not equal never occurs, consider using `u == 12 - 2*6` instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:39:5
--> tests/ui/absurd-extreme-comparisons.rs:39:5
|
LL | i < -127 - 1;
| ^^^^^^^^^^^^
@ -105,7 +105,7 @@ LL | i < -127 - 1;
= help: because `-127 - 1` is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:41:5
--> tests/ui/absurd-extreme-comparisons.rs:41:5
|
LL | i8::MAX >= i;
| ^^^^^^^^^^^^
@ -113,7 +113,7 @@ LL | i8::MAX >= i;
= help: because `i8::MAX` is the maximum value for this type, this comparison is always true
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:43:5
--> tests/ui/absurd-extreme-comparisons.rs:43:5
|
LL | 3-7 < i32::MIN;
| ^^^^^^^^^^^^^^
@ -121,7 +121,7 @@ LL | 3-7 < i32::MIN;
= help: because `i32::MIN` is the minimum value for this type, this comparison is always false
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:46:5
--> tests/ui/absurd-extreme-comparisons.rs:46:5
|
LL | b >= true;
| ^^^^^^^^^
@ -129,7 +129,7 @@ LL | b >= true;
= help: because `true` is the maximum value for this type, the case where the two sides are not equal never occurs, consider using `b == true` instead
error: this comparison involving the minimum or maximum element for this type contains a case that is always true or always false
--> $DIR/absurd-extreme-comparisons.rs:48:5
--> tests/ui/absurd-extreme-comparisons.rs:48:5
|
LL | false > b;
| ^^^^^^^^^
@ -137,7 +137,7 @@ LL | false > b;
= help: because `false` is the minimum value for this type, this comparison is always false
error: <-comparison of unit values detected. This will always be false
--> $DIR/absurd-extreme-comparisons.rs:52:5
--> tests/ui/absurd-extreme-comparisons.rs:52:5
|
LL | () < {};
| ^^^^^^^

View file

@ -1,5 +1,5 @@
error: #[allow] attribute found
--> $DIR/allow_attributes.rs:13:3
--> tests/ui/allow_attributes.rs:13:3
|
LL | #[allow(dead_code)]
| ^^^^^ help: replace it with: `expect`
@ -8,7 +8,7 @@ LL | #[allow(dead_code)]
= help: to override `-D warnings` add `#[allow(clippy::allow_attributes)]`
error: #[allow] attribute found
--> $DIR/allow_attributes.rs:22:30
--> tests/ui/allow_attributes.rs:22:30
|
LL | #[cfg_attr(panic = "unwind", allow(dead_code))]
| ^^^^^ help: replace it with: `expect`

View file

@ -1,18 +1,18 @@
error: `allow` attribute without specifying a reason
--> $DIR/allow_attributes_without_reason.rs:4:1
--> tests/ui/allow_attributes_without_reason.rs:4:1
|
LL | #![allow(unfulfilled_lint_expectations)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: try adding a reason at the end with `, reason = ".."`
note: the lint level is defined here
--> $DIR/allow_attributes_without_reason.rs:3:9
--> tests/ui/allow_attributes_without_reason.rs:3:9
|
LL | #![deny(clippy::allow_attributes_without_reason)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: `allow` attribute without specifying a reason
--> $DIR/allow_attributes_without_reason.rs:10:1
--> tests/ui/allow_attributes_without_reason.rs:10:1
|
LL | #[allow(dead_code)]
| ^^^^^^^^^^^^^^^^^^^
@ -20,7 +20,7 @@ LL | #[allow(dead_code)]
= help: try adding a reason at the end with `, reason = ".."`
error: `allow` attribute without specifying a reason
--> $DIR/allow_attributes_without_reason.rs:11:1
--> tests/ui/allow_attributes_without_reason.rs:11:1
|
LL | #[allow(dead_code, deprecated)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -28,7 +28,7 @@ LL | #[allow(dead_code, deprecated)]
= help: try adding a reason at the end with `, reason = ".."`
error: `expect` attribute without specifying a reason
--> $DIR/allow_attributes_without_reason.rs:12:1
--> tests/ui/allow_attributes_without_reason.rs:12:1
|
LL | #[expect(dead_code)]
| ^^^^^^^^^^^^^^^^^^^^

View file

@ -1,5 +1,5 @@
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:18:17
--> tests/ui/almost_complete_range.rs:18:17
|
LL | let _ = ('a') ..'z';
| ^^^^^^--^^^
@ -10,7 +10,7 @@ LL | let _ = ('a') ..'z';
= help: to override `-D warnings` add `#[allow(clippy::almost_complete_range)]`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:19:17
--> tests/ui/almost_complete_range.rs:19:17
|
LL | let _ = 'A' .. ('Z');
| ^^^^--^^^^^^
@ -18,7 +18,7 @@ LL | let _ = 'A' .. ('Z');
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:20:17
--> tests/ui/almost_complete_range.rs:20:17
|
LL | let _ = ((('0'))) .. ('9');
| ^^^^^^^^^^--^^^^^^
@ -26,7 +26,7 @@ LL | let _ = ((('0'))) .. ('9');
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:27:13
--> tests/ui/almost_complete_range.rs:27:13
|
LL | let _ = (b'a')..(b'z');
| ^^^^^^--^^^^^^
@ -34,7 +34,7 @@ LL | let _ = (b'a')..(b'z');
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:28:13
--> tests/ui/almost_complete_range.rs:28:13
|
LL | let _ = b'A'..b'Z';
| ^^^^--^^^^
@ -42,7 +42,7 @@ LL | let _ = b'A'..b'Z';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:29:13
--> tests/ui/almost_complete_range.rs:29:13
|
LL | let _ = b'0'..b'9';
| ^^^^--^^^^
@ -50,7 +50,7 @@ LL | let _ = b'0'..b'9';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:35:13
--> tests/ui/almost_complete_range.rs:35:13
|
LL | let _ = inline!('a')..'z';
| ^^^^^^^^^^^^--^^^
@ -58,7 +58,7 @@ LL | let _ = inline!('a')..'z';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:36:13
--> tests/ui/almost_complete_range.rs:36:13
|
LL | let _ = inline!('A')..'Z';
| ^^^^^^^^^^^^--^^^
@ -66,7 +66,7 @@ LL | let _ = inline!('A')..'Z';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:37:13
--> tests/ui/almost_complete_range.rs:37:13
|
LL | let _ = inline!('0')..'9';
| ^^^^^^^^^^^^--^^^
@ -74,7 +74,7 @@ LL | let _ = inline!('0')..'9';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:40:9
--> tests/ui/almost_complete_range.rs:40:9
|
LL | b'a'..b'z' if true => 1,
| ^^^^--^^^^
@ -82,7 +82,7 @@ LL | b'a'..b'z' if true => 1,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:41:9
--> tests/ui/almost_complete_range.rs:41:9
|
LL | b'A'..b'Z' if true => 2,
| ^^^^--^^^^
@ -90,7 +90,7 @@ LL | b'A'..b'Z' if true => 2,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:42:9
--> tests/ui/almost_complete_range.rs:42:9
|
LL | b'0'..b'9' if true => 3,
| ^^^^--^^^^
@ -98,7 +98,7 @@ LL | b'0'..b'9' if true => 3,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:50:9
--> tests/ui/almost_complete_range.rs:50:9
|
LL | 'a'..'z' if true => 1,
| ^^^--^^^
@ -106,7 +106,7 @@ LL | 'a'..'z' if true => 1,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:51:9
--> tests/ui/almost_complete_range.rs:51:9
|
LL | 'A'..'Z' if true => 2,
| ^^^--^^^
@ -114,7 +114,7 @@ LL | 'A'..'Z' if true => 2,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:52:9
--> tests/ui/almost_complete_range.rs:52:9
|
LL | '0'..'9' if true => 3,
| ^^^--^^^
@ -122,7 +122,7 @@ LL | '0'..'9' if true => 3,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:65:17
--> tests/ui/almost_complete_range.rs:65:17
|
LL | let _ = 'a'..'z';
| ^^^--^^^
@ -132,7 +132,7 @@ LL | let _ = 'a'..'z';
= note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:66:17
--> tests/ui/almost_complete_range.rs:66:17
|
LL | let _ = 'A'..'Z';
| ^^^--^^^
@ -142,7 +142,7 @@ LL | let _ = 'A'..'Z';
= note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:67:17
--> tests/ui/almost_complete_range.rs:67:17
|
LL | let _ = '0'..'9';
| ^^^--^^^
@ -152,7 +152,7 @@ LL | let _ = '0'..'9';
= note: this error originates in the macro `__inline_mac_fn_main` (in Nightly builds, run with -Z macro-backtrace for more info)
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:74:9
--> tests/ui/almost_complete_range.rs:74:9
|
LL | 'a'..'z' => 1,
| ^^^--^^^
@ -160,7 +160,7 @@ LL | 'a'..'z' => 1,
| help: use an inclusive range: `...`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:75:9
--> tests/ui/almost_complete_range.rs:75:9
|
LL | 'A'..'Z' => 2,
| ^^^--^^^
@ -168,7 +168,7 @@ LL | 'A'..'Z' => 2,
| help: use an inclusive range: `...`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:76:9
--> tests/ui/almost_complete_range.rs:76:9
|
LL | '0'..'9' => 3,
| ^^^--^^^
@ -176,7 +176,7 @@ LL | '0'..'9' => 3,
| help: use an inclusive range: `...`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:83:13
--> tests/ui/almost_complete_range.rs:83:13
|
LL | let _ = 'a'..'z';
| ^^^--^^^
@ -184,7 +184,7 @@ LL | let _ = 'a'..'z';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:84:13
--> tests/ui/almost_complete_range.rs:84:13
|
LL | let _ = 'A'..'Z';
| ^^^--^^^
@ -192,7 +192,7 @@ LL | let _ = 'A'..'Z';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:85:13
--> tests/ui/almost_complete_range.rs:85:13
|
LL | let _ = '0'..'9';
| ^^^--^^^
@ -200,7 +200,7 @@ LL | let _ = '0'..'9';
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:87:9
--> tests/ui/almost_complete_range.rs:87:9
|
LL | 'a'..'z' => 1,
| ^^^--^^^
@ -208,7 +208,7 @@ LL | 'a'..'z' => 1,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:88:9
--> tests/ui/almost_complete_range.rs:88:9
|
LL | 'A'..'Z' => 1,
| ^^^--^^^
@ -216,7 +216,7 @@ LL | 'A'..'Z' => 1,
| help: use an inclusive range: `..=`
error: almost complete ascii range
--> $DIR/almost_complete_range.rs:89:9
--> tests/ui/almost_complete_range.rs:89:9
|
LL | '0'..'9' => 3,
| ^^^--^^^

View file

@ -1,5 +1,5 @@
error: approximate value of `f{32, 64}::consts::E` found
--> $DIR/approx_const.rs:3:16
--> tests/ui/approx_const.rs:3:16
|
LL | let my_e = 2.7182;
| ^^^^^^
@ -9,7 +9,7 @@ LL | let my_e = 2.7182;
= help: to override `-D warnings` add `#[allow(clippy::approx_constant)]`
error: approximate value of `f{32, 64}::consts::E` found
--> $DIR/approx_const.rs:5:20
--> tests/ui/approx_const.rs:5:20
|
LL | let almost_e = 2.718;
| ^^^^^
@ -17,7 +17,7 @@ LL | let almost_e = 2.718;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_1_PI` found
--> $DIR/approx_const.rs:9:24
--> tests/ui/approx_const.rs:9:24
|
LL | let my_1_frac_pi = 0.3183;
| ^^^^^^
@ -25,7 +25,7 @@ LL | let my_1_frac_pi = 0.3183;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found
--> $DIR/approx_const.rs:13:28
--> tests/ui/approx_const.rs:13:28
|
LL | let my_frac_1_sqrt_2 = 0.70710678;
| ^^^^^^^^^^
@ -33,7 +33,7 @@ LL | let my_frac_1_sqrt_2 = 0.70710678;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_1_SQRT_2` found
--> $DIR/approx_const.rs:15:32
--> tests/ui/approx_const.rs:15:32
|
LL | let almost_frac_1_sqrt_2 = 0.70711;
| ^^^^^^^
@ -41,7 +41,7 @@ LL | let almost_frac_1_sqrt_2 = 0.70711;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_2_PI` found
--> $DIR/approx_const.rs:19:24
--> tests/ui/approx_const.rs:19:24
|
LL | let my_frac_2_pi = 0.63661977;
| ^^^^^^^^^^
@ -49,7 +49,7 @@ LL | let my_frac_2_pi = 0.63661977;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_2_SQRT_PI` found
--> $DIR/approx_const.rs:23:27
--> tests/ui/approx_const.rs:23:27
|
LL | let my_frac_2_sq_pi = 1.128379;
| ^^^^^^^^
@ -57,7 +57,7 @@ LL | let my_frac_2_sq_pi = 1.128379;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_PI_2` found
--> $DIR/approx_const.rs:27:24
--> tests/ui/approx_const.rs:27:24
|
LL | let my_frac_pi_2 = 1.57079632679;
| ^^^^^^^^^^^^^
@ -65,7 +65,7 @@ LL | let my_frac_pi_2 = 1.57079632679;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_PI_3` found
--> $DIR/approx_const.rs:31:24
--> tests/ui/approx_const.rs:31:24
|
LL | let my_frac_pi_3 = 1.04719755119;
| ^^^^^^^^^^^^^
@ -73,7 +73,7 @@ LL | let my_frac_pi_3 = 1.04719755119;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_PI_4` found
--> $DIR/approx_const.rs:35:24
--> tests/ui/approx_const.rs:35:24
|
LL | let my_frac_pi_4 = 0.785398163397;
| ^^^^^^^^^^^^^^
@ -81,7 +81,7 @@ LL | let my_frac_pi_4 = 0.785398163397;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_PI_6` found
--> $DIR/approx_const.rs:39:24
--> tests/ui/approx_const.rs:39:24
|
LL | let my_frac_pi_6 = 0.523598775598;
| ^^^^^^^^^^^^^^
@ -89,7 +89,7 @@ LL | let my_frac_pi_6 = 0.523598775598;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::FRAC_PI_8` found
--> $DIR/approx_const.rs:43:24
--> tests/ui/approx_const.rs:43:24
|
LL | let my_frac_pi_8 = 0.3926990816987;
| ^^^^^^^^^^^^^^^
@ -97,7 +97,7 @@ LL | let my_frac_pi_8 = 0.3926990816987;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::LN_10` found
--> $DIR/approx_const.rs:47:20
--> tests/ui/approx_const.rs:47:20
|
LL | let my_ln_10 = 2.302585092994046;
| ^^^^^^^^^^^^^^^^^
@ -105,7 +105,7 @@ LL | let my_ln_10 = 2.302585092994046;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::LN_2` found
--> $DIR/approx_const.rs:51:19
--> tests/ui/approx_const.rs:51:19
|
LL | let my_ln_2 = 0.6931471805599453;
| ^^^^^^^^^^^^^^^^^^
@ -113,7 +113,7 @@ LL | let my_ln_2 = 0.6931471805599453;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::LOG10_E` found
--> $DIR/approx_const.rs:55:22
--> tests/ui/approx_const.rs:55:22
|
LL | let my_log10_e = 0.4342944819032518;
| ^^^^^^^^^^^^^^^^^^
@ -121,7 +121,7 @@ LL | let my_log10_e = 0.4342944819032518;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::LOG2_E` found
--> $DIR/approx_const.rs:59:21
--> tests/ui/approx_const.rs:59:21
|
LL | let my_log2_e = 1.4426950408889634;
| ^^^^^^^^^^^^^^^^^^
@ -129,7 +129,7 @@ LL | let my_log2_e = 1.4426950408889634;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::LOG2_10` found
--> $DIR/approx_const.rs:63:19
--> tests/ui/approx_const.rs:63:19
|
LL | let log2_10 = 3.321928094887362;
| ^^^^^^^^^^^^^^^^^
@ -137,7 +137,7 @@ LL | let log2_10 = 3.321928094887362;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::LOG10_2` found
--> $DIR/approx_const.rs:67:19
--> tests/ui/approx_const.rs:67:19
|
LL | let log10_2 = 0.301029995663981;
| ^^^^^^^^^^^^^^^^^
@ -145,7 +145,7 @@ LL | let log10_2 = 0.301029995663981;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::PI` found
--> $DIR/approx_const.rs:71:17
--> tests/ui/approx_const.rs:71:17
|
LL | let my_pi = 3.1415;
| ^^^^^^
@ -153,7 +153,7 @@ LL | let my_pi = 3.1415;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::PI` found
--> $DIR/approx_const.rs:73:21
--> tests/ui/approx_const.rs:73:21
|
LL | let almost_pi = 3.14;
| ^^^^
@ -161,7 +161,7 @@ LL | let almost_pi = 3.14;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::SQRT_2` found
--> $DIR/approx_const.rs:77:18
--> tests/ui/approx_const.rs:77:18
|
LL | let my_sq2 = 1.4142;
| ^^^^^^
@ -169,7 +169,7 @@ LL | let my_sq2 = 1.4142;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::TAU` found
--> $DIR/approx_const.rs:81:18
--> tests/ui/approx_const.rs:81:18
|
LL | let my_tau = 6.2832;
| ^^^^^^
@ -177,7 +177,7 @@ LL | let my_tau = 6.2832;
= help: consider using the constant directly
error: approximate value of `f{32, 64}::consts::TAU` found
--> $DIR/approx_const.rs:83:22
--> tests/ui/approx_const.rs:83:22
|
LL | let almost_tau = 6.28;
| ^^^^

View file

@ -1,5 +1,5 @@
error: usage of an `Arc` that is not `Send` and `Sync`
--> $DIR/arc_with_non_send_sync.rs:35:13
--> tests/ui/arc_with_non_send_sync.rs:35:13
|
LL | let _ = Arc::new(RefCell::new(42));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -13,7 +13,7 @@ LL | let _ = Arc::new(RefCell::new(42));
= help: to override `-D warnings` add `#[allow(clippy::arc_with_non_send_sync)]`
error: usage of an `Arc` that is not `Send` and `Sync`
--> $DIR/arc_with_non_send_sync.rs:40:13
--> tests/ui/arc_with_non_send_sync.rs:40:13
|
LL | let _ = Arc::new(mutex.lock().unwrap());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -25,7 +25,7 @@ LL | let _ = Arc::new(mutex.lock().unwrap());
= note: wrap the inner type with a `Mutex` or implement `Send` and `Sync` for `MutexGuard<'_, i32>`
error: usage of an `Arc` that is not `Send` and `Sync`
--> $DIR/arc_with_non_send_sync.rs:44:13
--> tests/ui/arc_with_non_send_sync.rs:44:13
|
LL | let _ = Arc::new(&42 as *const i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some files were not shown because too many files have changed in this diff Show more