Update tests

This commit is contained in:
Oli Scherer 2023-04-20 15:19:36 +00:00
parent 514b6d04bb
commit 5bd97ac17a
258 changed files with 1740 additions and 1063 deletions

View File

@ -1,6 +1,6 @@
error: package `cargo_common_metadata_fail` is missing `package.description` metadata
|
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
|
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
error: package `cargo_common_metadata_fail` is missing `either package.license or package.license_file` metadata
@ -12,5 +12,4 @@ error: package `cargo_common_metadata_fail` is missing `package.keywords` metada
error: package `cargo_common_metadata_fail` is missing `package.categories` metadata
error: aborting due to 6 previous errors
error: could not compile `cargo_common_metadata_fail` (bin "cargo_common_metadata_fail") due to 6 previous errors

View File

@ -1,6 +1,6 @@
error: package `cargo_common_metadata_fail_publish` is missing `package.description` metadata
|
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
|
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
error: package `cargo_common_metadata_fail_publish` is missing `either package.license or package.license_file` metadata
@ -12,5 +12,4 @@ error: package `cargo_common_metadata_fail_publish` is missing `package.keywords
error: package `cargo_common_metadata_fail_publish` is missing `package.categories` metadata
error: aborting due to 6 previous errors
error: could not compile `cargo_common_metadata_fail_publish` (bin "cargo_common_metadata_fail_publish") due to 6 previous errors

View File

@ -1,6 +1,6 @@
error: package `cargo_common_metadata_fail_publish_true` is missing `package.description` metadata
|
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
|
= note: `-D clippy::cargo-common-metadata` implied by `-D warnings`
error: package `cargo_common_metadata_fail_publish_true` is missing `either package.license or package.license_file` metadata
@ -12,5 +12,4 @@ error: package `cargo_common_metadata_fail_publish_true` is missing `package.key
error: package `cargo_common_metadata_fail_publish_true` is missing `package.categories` metadata
error: aborting due to 6 previous errors
error: could not compile `cargo_common_metadata_fail_publish_true` (bin "cargo_common_metadata_fail_publish_true") due to 6 previous errors

View File

@ -0,0 +1,21 @@
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.59.0` from `clippy.toml`
error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`
error: could not compile `fail-both-diff` (bin "fail-both-diff") due to 2 previous errors; 1 warning emitted

View File

@ -1,22 +0,0 @@
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.59.0` from `clippy.toml`
error: unnecessary structure name repetition
--> $DIR/main.rs:6:21
|
LL | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> $DIR/main.rs:1:9
|
LL | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> $DIR/main.rs:7:9
|
LL | Foo
| ^^^ help: use the applicable keyword: `Self`
error: aborting due to 2 previous errors; 1 warning emitted

View File

@ -0,0 +1,19 @@
error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`
error: could not compile `fail-both-same` (bin "fail-both-same") due to 2 previous errors

View File

@ -1,20 +0,0 @@
error: unnecessary structure name repetition
--> $DIR/main.rs:6:21
|
LL | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> $DIR/main.rs:1:9
|
LL | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> $DIR/main.rs:7:9
|
LL | Foo
| ^^^ help: use the applicable keyword: `Self`
error: aborting due to 2 previous errors

View File

@ -0,0 +1,19 @@
error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`
error: could not compile `fail-cargo` (bin "fail-cargo") due to 2 previous errors

View File

@ -1,20 +0,0 @@
error: unnecessary structure name repetition
--> $DIR/main.rs:6:21
|
LL | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> $DIR/main.rs:1:9
|
LL | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> $DIR/main.rs:7:9
|
LL | Foo
| ^^^ help: use the applicable keyword: `Self`
error: aborting due to 2 previous errors

View File

@ -0,0 +1,19 @@
error: unnecessary structure name repetition
--> src/main.rs:6:21
|
6 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> src/main.rs:1:9
|
1 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> src/main.rs:7:9
|
7 | Foo
| ^^^ help: use the applicable keyword: `Self`
error: could not compile `fail-clippy` (bin "fail-clippy") due to 2 previous errors

View File

@ -1,20 +1,19 @@
error: unnecessary structure name repetition
--> $DIR/main.rs:6:21
--> src/main.rs:11:21
|
LL | pub fn bar() -> Foo {
11 | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> $DIR/main.rs:1:9
--> src/main.rs:6:9
|
LL | #![deny(clippy::use_self)]
6 | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> $DIR/main.rs:7:9
--> src/main.rs:12:9
|
LL | Foo
12 | Foo
| ^^^ help: use the applicable keyword: `Self`
error: aborting due to 2 previous errors
error: could not compile `fail-file-attr` (bin "fail-file-attr") due to 2 previous errors

View File

@ -1,20 +0,0 @@
error: unnecessary structure name repetition
--> $DIR/main.rs:11:21
|
LL | pub fn bar() -> Foo {
| ^^^ help: use the applicable keyword: `Self`
|
note: the lint level is defined here
--> $DIR/main.rs:6:9
|
LL | #![deny(clippy::use_self)]
| ^^^^^^^^^^^^^^^^
error: unnecessary structure name repetition
--> $DIR/main.rs:12:9
|
LL | Foo
| ^^^ help: use the applicable keyword: `Self`
error: aborting due to 2 previous errors

View File

@ -1,4 +1,2 @@
warning: the MSRV in `clippy.toml` and `Cargo.toml` differ; using `1.13.0` from `clippy.toml`
warning: 1 warning emitted

View File

@ -0,0 +1,52 @@
error: file is loaded as a module multiple times: `src/b.rs`
--> src/main.rs:5:1
|
5 | mod b;
| ^^^^^^ first loaded here
6 | / #[path = "b.rs"]
7 | | mod b2;
| |_______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
= note: `-D clippy::duplicate-mod` implied by `-D warnings`
error: file is loaded as a module multiple times: `src/c.rs`
--> src/main.rs:9:1
|
9 | mod c;
| ^^^^^^ first loaded here
10 | / #[path = "c.rs"]
11 | | mod c2;
| |_______^ loaded again here
12 | / #[path = "c.rs"]
13 | | mod c3;
| |_______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
error: file is loaded as a module multiple times: `src/d.rs`
--> src/main.rs:18:1
|
18 | mod d;
| ^^^^^^ first loaded here
19 | / #[path = "d.rs"]
20 | | mod d2;
| |_______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
error: file is loaded as a module multiple times: `src/from_other_module.rs`
--> src/main.rs:15:1
|
15 | mod from_other_module;
| ^^^^^^^^^^^^^^^^^^^^^^ first loaded here
|
::: src/other_module/mod.rs:1:1
|
1 | / #[path = "../from_other_module.rs"]
2 | | mod m;
| |______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
error: could not compile `duplicate_mod` (bin "duplicate_mod") due to 4 previous errors

View File

@ -1,53 +0,0 @@
error: file is loaded as a module multiple times: `$DIR/b.rs`
--> $DIR/main.rs:5:1
|
LL | mod b;
| ^^^^^^ first loaded here
LL | / #[path = "b.rs"]
LL | | mod b2;
| |_______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
= note: `-D clippy::duplicate-mod` implied by `-D warnings`
error: file is loaded as a module multiple times: `$DIR/c.rs`
--> $DIR/main.rs:9:1
|
LL | mod c;
| ^^^^^^ first loaded here
LL | / #[path = "c.rs"]
LL | | mod c2;
| |_______^ loaded again here
LL | / #[path = "c.rs"]
LL | | mod c3;
| |_______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
error: file is loaded as a module multiple times: `$DIR/d.rs`
--> $DIR/main.rs:18:1
|
LL | mod d;
| ^^^^^^ first loaded here
LL | / #[path = "d.rs"]
LL | | mod d2;
| |_______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
error: file is loaded as a module multiple times: `$DIR/from_other_module.rs`
--> $DIR/main.rs:15:1
|
LL | mod from_other_module;
| ^^^^^^^^^^^^^^^^^^^^^^ first loaded here
|
::: $DIR/other_module/mod.rs:1:1
|
LL | / #[path = "../from_other_module.rs"]
LL | | mod m;
| |______^ loaded again here
|
= help: replace all but one `mod` item with `use` items
error: aborting due to 4 previous errors

View File

@ -0,0 +1,43 @@
error: the "no-" prefix in the feature name "no-qaq" is negative
|
= help: consider renaming the feature to "qaq", but make sure the feature adds functionality
= note: `-D clippy::negative-feature-names` implied by `-D warnings`
error: the "no_" prefix in the feature name "no_qaq" is negative
|
= help: consider renaming the feature to "qaq", but make sure the feature adds functionality
error: the "not-" prefix in the feature name "not-orz" is negative
|
= help: consider renaming the feature to "orz", but make sure the feature adds functionality
error: the "not_" prefix in the feature name "not_orz" is negative
|
= help: consider renaming the feature to "orz", but make sure the feature adds functionality
error: the "-support" suffix in the feature name "qvq-support" is redundant
|
= help: consider renaming the feature to "qvq"
= note: `-D clippy::redundant-feature-names` implied by `-D warnings`
error: the "_support" suffix in the feature name "qvq_support" is redundant
|
= help: consider renaming the feature to "qvq"
error: the "use-" prefix in the feature name "use-qwq" is redundant
|
= help: consider renaming the feature to "qwq"
error: the "use_" prefix in the feature name "use_qwq" is redundant
|
= help: consider renaming the feature to "qwq"
error: the "with-" prefix in the feature name "with-owo" is redundant
|
= help: consider renaming the feature to "owo"
error: the "with_" prefix in the feature name "with_owo" is redundant
|
= help: consider renaming the feature to "owo"
error: could not compile `feature_name` (bin "feature_name") due to 10 previous errors

View File

@ -1,44 +0,0 @@
error: the "no-" prefix in the feature name "no-qaq" is negative
|
= help: consider renaming the feature to "qaq", but make sure the feature adds functionality
= note: `-D clippy::negative-feature-names` implied by `-D warnings`
error: the "no_" prefix in the feature name "no_qaq" is negative
|
= help: consider renaming the feature to "qaq", but make sure the feature adds functionality
error: the "not-" prefix in the feature name "not-orz" is negative
|
= help: consider renaming the feature to "orz", but make sure the feature adds functionality
error: the "not_" prefix in the feature name "not_orz" is negative
|
= help: consider renaming the feature to "orz", but make sure the feature adds functionality
error: the "-support" suffix in the feature name "qvq-support" is redundant
|
= help: consider renaming the feature to "qvq"
= note: `-D clippy::redundant-feature-names` implied by `-D warnings`
error: the "_support" suffix in the feature name "qvq_support" is redundant
|
= help: consider renaming the feature to "qvq"
error: the "use-" prefix in the feature name "use-qwq" is redundant
|
= help: consider renaming the feature to "qwq"
error: the "use_" prefix in the feature name "use_qwq" is redundant
|
= help: consider renaming the feature to "qwq"
error: the "with-" prefix in the feature name "with-owo" is redundant
|
= help: consider renaming the feature to "owo"
error: the "with_" prefix in the feature name "with_owo" is redundant
|
= help: consider renaming the feature to "owo"
error: aborting due to 10 previous errors

View File

@ -0,0 +1,18 @@
error: `mod.rs` files are required, found `src/bad/inner.rs`
--> src/bad/inner.rs:1:1
|
1 | pub mod stuff;
| ^
|
= help: move `src/bad/inner.rs` to `src/bad/inner/mod.rs`
= note: `-D clippy::self-named-module-files` implied by `-D warnings`
error: `mod.rs` files are required, found `src/bad/inner/stuff.rs`
--> src/bad/inner/stuff.rs:1:1
|
1 | pub mod most;
| ^
|
= help: move `src/bad/inner/stuff.rs` to `src/bad/inner/stuff/mod.rs`
error: could not compile `fail-mod` (bin "fail-mod") due to 2 previous errors

View File

@ -1,19 +0,0 @@
error: `mod.rs` files are required, found `bad/inner.rs`
--> $DIR/bad/inner.rs:1:1
|
LL | pub mod stuff;
| ^
|
= help: move `bad/inner.rs` to `bad/inner/mod.rs`
= note: `-D clippy::self-named-module-files` implied by `-D warnings`
error: `mod.rs` files are required, found `bad/inner/stuff.rs`
--> $DIR/bad/inner/stuff.rs:1:1
|
LL | pub mod most;
| ^
|
= help: move `bad/inner/stuff.rs` to `bad/inner/stuff/mod.rs`
error: aborting due to 2 previous errors

View File

@ -0,0 +1,10 @@
error: `mod.rs` files are required, found `src/bad.rs`
--> src/bad.rs:1:1
|
1 | pub mod inner;
| ^
|
= help: move `src/bad.rs` to `src/bad/mod.rs`
= note: `-D clippy::self-named-module-files` implied by `-D warnings`
error: could not compile `fail-mod-remap` (bin "fail-mod-remap") due to previous error

View File

@ -1,11 +0,0 @@
error: `mod.rs` files are required, found `bad.rs`
--> /remapped/module_style/fail_mod_remap/src/bad.rs:1:1
|
LL | pub mod inner;
| ^
|
= help: move `bad.rs` to `bad/mod.rs`
= note: `-D clippy::self-named-module-files` implied by `-D warnings`
error: aborting due to previous error

View File

@ -0,0 +1,10 @@
error: `mod.rs` files are not allowed, found `src/bad/mod.rs`
--> src/bad/mod.rs:1:1
|
1 | pub struct Thing;
| ^
|
= help: move `src/bad/mod.rs` to `src/bad.rs`
= note: `-D clippy::mod-module-files` implied by `-D warnings`
error: could not compile `fail-no-mod` (bin "fail-no-mod") due to previous error

View File

@ -1,11 +0,0 @@
error: `mod.rs` files are not allowed, found `bad/mod.rs`
--> $DIR/bad/mod.rs:1:1
|
LL | pub struct Thing;
| ^
|
= help: move `bad/mod.rs` to `bad.rs`
= note: `-D clippy::mod-module-files` implied by `-D warnings`
error: aborting due to previous error

View File

@ -0,0 +1,2 @@
warning: using config file `$DIR/$DIR/.clippy.toml`, `$DIR/$DIR/clippy.toml` will be ignored

View File

@ -1,4 +0,0 @@
warning: using config file `$SRC_DIR/.clippy.toml`, `$SRC_DIR/clippy.toml` will be ignored
warning: 1 warning emitted

View File

@ -0,0 +1,5 @@
error: multiple versions for dependency `winapi`: 0.2.8, 0.3.9
|
= note: `-D clippy::multiple-crate-versions` implied by `-D warnings`
error: could not compile `multiple_crate_versions` (bin "multiple_crate_versions") due to previous error

View File

@ -1,6 +0,0 @@
error: multiple versions for dependency `winapi`: 0.2.8, 0.3.9
|
= note: `-D clippy::multiple-crate-versions` implied by `-D warnings`
error: aborting due to previous error

View File

@ -1,3 +1,3 @@
#!/bin/bash
echo "Please use 'cargo dev bless' instead."
echo "Please use 'cargo bless' instead."

View File

@ -0,0 +1,5 @@
error: wildcard dependency for `regex`
|
= note: `-D clippy::wildcard-dependencies` implied by `-D warnings`
error: could not compile `wildcard_dependencies` (bin "wildcard_dependencies") due to previous error

View File

@ -1,6 +0,0 @@
error: wildcard dependency for `regex`
|
= note: `-D clippy::wildcard-dependencies` implied by `-D warnings`
error: aborting due to previous error

View File

@ -7,7 +7,7 @@ note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy
note: rustc <version> running on <target>
note: compiler flags: -C prefer-dynamic -Z ui-testing
note: compiler flags: -Z ui-testing
query stack during panic:
thread panicked while processing panic. aborting.

View File

@ -1 +1,3 @@
//@error-in-other-file: error reading Clippy's configuration file: expected `.`, `=`
fn main() {}

View File

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

View File

@ -1 +1,3 @@
//@error-in-other-file: invalid type: integer `42`, expected a sequence
fn main() {}

View File

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

View File

@ -1,11 +1,11 @@
warning: error reading Clippy's configuration file: deprecated field `cyclomatic-complexity-threshold`. Please use `cognitive-complexity-threshold` instead
--> $DIR/clippy.toml:2:1
--> $DIR/$DIR/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/clippy.toml:3:1
--> $DIR/$DIR/clippy.toml:3:1
|
LL | blacklisted-names = [ "..", "wibble" ]
| ^^^^^^^^^^^^^^^^^

View File

@ -1 +1,3 @@
//@error-in-other-file: duplicate key `cognitive-complexity-threshold`
fn main() {}

View File

@ -1,5 +1,5 @@
error: error reading Clippy's configuration file: duplicate key `cognitive-complexity-threshold` in document root
--> $DIR/clippy.toml:2:1
--> $DIR/$DIR/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/clippy.toml:3:1
--> $DIR/$DIR/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/clippy.toml:3:1
--> $DIR/$DIR/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/clippy.toml:4:1
--> $DIR/$DIR/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/clippy.toml:2:1
--> $DIR/$DIR/clippy.toml:2:1
|
LL | cyclomatic-complexity-threshold = 3
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -1,9 +1,5 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
// NOTE: Copied from `ui/auxiliary/proc_macros.rs`, couldn't get `../` to work for some reason
#![crate_type = "proc-macro"]
#![feature(let_chains)]
#![feature(proc_macro_span)]
#![allow(clippy::excessive_nesting, dead_code)]

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macros.rs
//@aux-build:proc_macros.rs:proc-macro
#![rustfmt::skip]
#![feature(custom_inner_attributes)]
#![allow(unused)]

View File

@ -1,3 +1,5 @@
//@error-in-other-file: `invalid.version` is not a valid Rust version
#![allow(clippy::redundant_clone)]
fn main() {}

View File

@ -1,5 +1,5 @@
#![allow(clippy::excessive_precision)]
#[deny(clippy::unreadable_literal)]
#![warn(clippy::unreadable_literal)]
fn allow_inconsistent_digit_grouping() {
#![allow(clippy::inconsistent_digit_grouping)]

View File

@ -6,5 +6,13 @@ LL | let _fail1 = 100_200_300.123456789;
|
= note: `-D clippy::inconsistent-digit-grouping` implied by `-D warnings`
error: aborting due to previous error
error: long literal lacking separators
--> $DIR/test.rs:22:18
|
LL | let _fail2 = 100200300.300200100;
| ^^^^^^^^^^^^^^^^^^^ help: consider: `100_200_300.300_200_100`
|
= note: `-D clippy::unreadable-literal` implied by `-D warnings`
error: aborting due to 2 previous errors

View File

@ -3,6 +3,7 @@
fn below_limit() {
let slice: Option<&[u32]> = Some(&[1, 2, 3]);
if let Some(slice) = slice {
//~^ ERROR: binding can be a slice pattern
// This would usually not be linted but is included now due to the
// index limit in the config file
println!("{}", slice[7]);

View File

@ -41,7 +41,7 @@ fn match_like_matches() {
fn match_same_arms() {
match (1, 2, 3) {
(1, .., 3) => 42,
(.., 3) => 42, //~ ERROR match arms have same body
(.., 3) => 42,
_ => 0,
};
}
@ -49,7 +49,7 @@ fn match_same_arms() {
fn match_same_arms2() {
let _ = match Some(42) {
Some(_) => 24,
None => 24, //~ ERROR match arms have same body
None => 24,
};
}

View File

@ -1,8 +1,3 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::TokenStream;

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macro_derive.rs
//@aux-build:proc_macro_derive.rs:proc-macro
//@run-rustfix
#![warn(clippy::nonstandard_macro_braces)]

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macro_derive.rs
//@aux-build:proc_macro_derive.rs:proc-macro
//@run-rustfix
#![warn(clippy::nonstandard_macro_braces)]

View File

@ -13,6 +13,7 @@
const ARR: [i32; 2] = [1, 2];
const REF: &i32 = &ARR[idx()]; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
const REF_ERR: &i32 = &ARR[idx4()]; // Ok, let rustc handle const contexts.
//~^ ERROR: failed
const fn idx() -> usize {
1
@ -34,6 +35,8 @@ fn main() {
x[const { idx4() }]; // Ok, let rustc's `unconditional_panic` lint handle `usize` indexing on arrays.
const { &ARR[idx()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
//
//~^^ ERROR: failed
let y = &x;
y[0]; // Ok, referencing shouldn't affect this lint. See the issue 6021

View File

@ -1,17 +1,17 @@
error[E0080]: evaluation of `main::{constant#3}` failed
--> $DIR/test.rs:36:14
--> $DIR/test.rs:37: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 used
--> $DIR/test.rs:36:5
--> $DIR/test.rs:37:5
|
LL | const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
| ^^^^^^^^^^^^^^^^^^^^^^
error: indexing may panic
--> $DIR/test.rs:27:5
--> $DIR/test.rs:28:5
|
LL | x[index];
| ^^^^^^^^
@ -20,7 +20,7 @@ LL | x[index];
= note: `-D clippy::indexing-slicing` implied by `-D warnings`
error: indexing may panic
--> $DIR/test.rs:43:5
--> $DIR/test.rs:46:5
|
LL | v[0];
| ^^^^
@ -28,7 +28,7 @@ LL | v[0];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/test.rs:44:5
--> $DIR/test.rs:47:5
|
LL | v[10];
| ^^^^^
@ -36,7 +36,7 @@ LL | v[10];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/test.rs:45:5
--> $DIR/test.rs:48:5
|
LL | v[1 << 3];
| ^^^^^^^^^
@ -44,7 +44,7 @@ LL | v[1 << 3];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/test.rs:51:5
--> $DIR/test.rs:54:5
|
LL | v[N];
| ^^^^
@ -52,7 +52,7 @@ LL | v[N];
= help: consider using `.get(n)` or `.get_mut(n)` instead
error: indexing may panic
--> $DIR/test.rs:52:5
--> $DIR/test.rs:55:5
|
LL | v[M];
| ^^^^

View File

@ -1,7 +1,7 @@
//@normalize-stderr-test: "\(\d+ byte\)" -> "(N byte)"
//@normalize-stderr-test: "\(limit: \d+ byte\)" -> "(limit: N byte)"
#![deny(clippy::trivially_copy_pass_by_ref)]
#![warn(clippy::trivially_copy_pass_by_ref)]
#[derive(Copy, Clone)]
struct Foo(u8);

View File

@ -4,11 +4,7 @@ error: this argument (N byte) is passed by reference, but would be more efficien
LL | fn bad(x: &u16, y: &Foo) {}
| ^^^^ help: consider passing by value instead: `u16`
|
note: the lint level is defined here
--> $DIR/test.rs:4:9
|
LL | #![deny(clippy::trivially_copy_pass_by_ref)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `-D clippy::trivially-copy-pass-by-ref` implied by `-D warnings`
error: this argument (N byte) is passed by reference, but would be more efficient if passed by value (limit: N byte)
--> $DIR/test.rs:14:20

View File

@ -1,3 +1,3 @@
//@error-pattern: unknown field `foobar`, expected one of
//@error-in-other-file: unknown field `foobar`, expected one of
fn main() {}

View File

@ -61,7 +61,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/clippy.toml:2:1
--> $DIR/$DIR/clippy.toml:2:1
|
LL | foobar = 42
| ^^^^^^
@ -129,7 +129,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/clippy.toml:4:1
--> $DIR/$DIR/clippy.toml:4:1
|
LL | barfoo = 53
| ^^^^^^

View File

@ -1,8 +1,3 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::{Delimiter, Group, Ident, TokenStream, TokenTree};

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macro_unsafe.rs
//@aux-build:proc_macro_unsafe.rs:proc-macro
#![warn(clippy::undocumented_unsafe_blocks, clippy::unnecessary_safety_comment)]
#![allow(deref_nullptr, clippy::let_unit_value, clippy::missing_safety_doc)]

View File

@ -7,7 +7,7 @@
clippy::useless_vec
)]
#![warn(clippy::unwrap_used)]
#![deny(clippy::get_unwrap)]
#![warn(clippy::get_unwrap)]
use std::collections::BTreeMap;
use std::collections::HashMap;

View File

@ -4,11 +4,7 @@ error: called `.get().unwrap()` on a slice. Using `[]` is more clear and more co
LL | let _ = boxed_slice.get(1).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `&boxed_slice[1]`
|
note: the lint level is defined here
--> $DIR/unwrap_used.rs:10:9
|
LL | #![deny(clippy::get_unwrap)]
| ^^^^^^^^^^^^^^^^^^
= note: `-D clippy::get-unwrap` implied by `-D warnings`
error: used `unwrap()` on an `Option` value
--> $DIR/unwrap_used.rs:40:17

View File

@ -1,3 +1,3 @@
#!/bin/bash
echo "Please use 'cargo dev bless' instead."
echo "Please use 'cargo bless' instead."

View File

@ -1,5 +1,5 @@
//@run-rustfix
//@aux-build:proc_macros.rs
//@aux-build:proc_macros.rs:proc-macro
#![allow(unused)]
#![warn(clippy::allow_attributes)]
#![feature(lint_reasons)]

View File

@ -1,5 +1,5 @@
//@run-rustfix
//@aux-build:proc_macros.rs
//@aux-build:proc_macros.rs:proc-macro
#![allow(unused)]
#![warn(clippy::allow_attributes)]
#![feature(lint_reasons)]

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macros.rs
//@aux-build:proc_macros.rs:proc-macro
#![feature(lint_reasons)]
#![deny(clippy::allow_attributes_without_reason)]
#![allow(unfulfilled_lint_expectations)]

View File

@ -1,6 +1,6 @@
//@run-rustfix
//@edition:2018
//@aux-build:proc_macros.rs
//@aux-build:proc_macros.rs:proc-macro
#![feature(exclusive_range_pattern)]
#![feature(stmt_expr_attributes)]

View File

@ -1,6 +1,6 @@
//@run-rustfix
//@edition:2018
//@aux-build:proc_macros.rs
//@aux-build:proc_macros.rs:proc-macro
#![feature(exclusive_range_pattern)]
#![feature(stmt_expr_attributes)]

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macro_derive.rs
//@aux-build:proc_macro_derive.rs:proc-macro
#![allow(
clippy::assign_op_pattern,

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macros.rs
//@aux-build:proc_macros.rs:proc-macro
#![warn(clippy::as_conversions)]
#![allow(clippy::borrow_as_ptr, unused)]

View File

@ -1,5 +1,5 @@
//@only-x86_64
//@ignore-aarch64
//@only-target-x86_64
//@ignore-target-aarch64
#[warn(clippy::inline_asm_x86_intel_syntax)]
mod warn_intel {

View File

@ -1,3 +1,5 @@
//@aux-build:macro_rules.rs
extern crate macro_rules;
// STMT

View File

@ -1,7 +1,3 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(repr128, proc_macro_hygiene, proc_macro_quote, box_patterns)]
#![allow(incomplete_features)]
#![allow(clippy::useless_conversion, clippy::uninlined_format_args)]

View File

@ -1,7 +1,3 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(repr128, proc_macro_quote)]
#![allow(incomplete_features)]
#![allow(clippy::field_reassign_with_default)]

View File

@ -1,8 +1,3 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::{token_stream, Delimiter, Group, Ident, Span, TokenStream, TokenTree};

View File

@ -1,8 +1,3 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
#![crate_type = "proc-macro"]
extern crate proc_macro;
use proc_macro::{Delimiter, Group, Ident, TokenStream, TokenTree};

View File

@ -1,7 +1,3 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
#![crate_type = "proc-macro"]
#![feature(let_chains)]
#![feature(proc_macro_span)]
#![allow(clippy::needless_if, dead_code)]

View File

@ -1,5 +1,5 @@
//@run-rustfix
//@aux-build: proc_macros.rs
//@aux-build: proc_macros.rs:proc-macro
#![allow(dead_code, unused_variables)]

View File

@ -1,5 +1,5 @@
//@run-rustfix
//@aux-build: proc_macros.rs
//@aux-build: proc_macros.rs:proc-macro
#![allow(dead_code, unused_variables)]

View File

@ -1,6 +1,6 @@
//@aux-build:helper.rs
#![warn(clippy::borrow_interior_mutable_const)]
#![deny(clippy::borrow_interior_mutable_const)]
#![allow(clippy::declare_interior_mutable_const)]
// this file (mostly) replicates its `declare` counterpart. Please see it for more discussions.
@ -19,7 +19,7 @@ const UNFROZEN_VARIANT: OptionalCell = OptionalCell::Unfrozen(Cell::new(true));
const FROZEN_VARIANT: OptionalCell = OptionalCell::Frozen;
fn borrow_optional_cell() {
let _ = &UNFROZEN_VARIANT; //~ ERROR interior mutability
let _ = &UNFROZEN_VARIANT; //~ ERROR: interior mutability
let _ = &FROZEN_VARIANT;
}
@ -34,11 +34,11 @@ trait AssocConsts {
// This is the "suboptimal behavior" mentioned in `is_value_unfrozen`
// caused by a similar reason to unfrozen types without any default values
// get linted even if it has frozen variants'.
let _ = &Self::TO_BE_FROZEN_VARIANT; //~ ERROR interior mutable
let _ = &Self::TO_BE_FROZEN_VARIANT; //~ ERROR: interior mutability
// The lint ignores default values because an impl of this trait can set
// an unfrozen variant to `DEFAULTED_ON_FROZEN_VARIANT` and use the default impl for `function`.
let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT; //~ ERROR interior mutable
let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT; //~ ERROR: interior mutability
}
}
@ -47,9 +47,9 @@ impl AssocConsts for u64 {
const TO_BE_FROZEN_VARIANT: OptionalCell = OptionalCell::Frozen;
fn function() {
let _ = &<Self as AssocConsts>::TO_BE_UNFROZEN_VARIANT; //~ ERROR interior mutable
let _ = &<Self as AssocConsts>::TO_BE_UNFROZEN_VARIANT; //~ ERROR: interior mutability
let _ = &<Self as AssocConsts>::TO_BE_FROZEN_VARIANT;
let _ = &Self::DEFAULTED_ON_UNFROZEN_VARIANT; //~ ERROR interior mutable
let _ = &Self::DEFAULTED_ON_UNFROZEN_VARIANT; //~ ERROR: interior mutability
let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT;
}
}
@ -67,11 +67,11 @@ trait AssocTypes {
impl AssocTypes for u64 {
type ToBeUnfrozen = AtomicUsize;
const TO_BE_UNFROZEN_VARIANT: Option<Self::ToBeUnfrozen> = Some(Self::ToBeUnfrozen::new(4)); //~ ERROR interior mutable
const TO_BE_UNFROZEN_VARIANT: Option<Self::ToBeUnfrozen> = Some(Self::ToBeUnfrozen::new(4));
const TO_BE_FROZEN_VARIANT: Option<Self::ToBeUnfrozen> = None;
fn function() {
let _ = &<Self as AssocTypes>::TO_BE_UNFROZEN_VARIANT; //~ ERROR interior mutable
let _ = &<Self as AssocTypes>::TO_BE_UNFROZEN_VARIANT; //~ ERROR: interior mutability
let _ = &<Self as AssocTypes>::TO_BE_FROZEN_VARIANT;
}
}
@ -83,19 +83,19 @@ enum BothOfCellAndGeneric<T> {
}
impl<T> BothOfCellAndGeneric<T> {
const UNFROZEN_VARIANT: BothOfCellAndGeneric<T> = BothOfCellAndGeneric::Unfrozen(Cell::new(std::ptr::null())); //~ ERROR interior mutable
const GENERIC_VARIANT: BothOfCellAndGeneric<T> = BothOfCellAndGeneric::Generic(std::ptr::null()); //~ ERROR interior mutable
const UNFROZEN_VARIANT: BothOfCellAndGeneric<T> = BothOfCellAndGeneric::Unfrozen(Cell::new(std::ptr::null()));
const GENERIC_VARIANT: BothOfCellAndGeneric<T> = BothOfCellAndGeneric::Generic(std::ptr::null());
const FROZEN_VARIANT: BothOfCellAndGeneric<T> = BothOfCellAndGeneric::Frozen(5);
fn function() {
let _ = &Self::UNFROZEN_VARIANT; //~ ERROR interior mutability
let _ = &Self::GENERIC_VARIANT; //~ ERROR interior mutability
let _ = &Self::UNFROZEN_VARIANT; //~ ERROR: interior mutability
let _ = &Self::GENERIC_VARIANT; //~ ERROR: interior mutability
let _ = &Self::FROZEN_VARIANT;
}
}
fn main() {
// constants defined in foreign crates
let _ = &helper::WRAPPED_PRIVATE_UNFROZEN_VARIANT; //~ ERROR interior mutability
let _ = &helper::WRAPPED_PRIVATE_UNFROZEN_VARIANT; //~ ERROR: interior mutability
let _ = &helper::WRAPPED_PRIVATE_FROZEN_VARIANT;
}

View File

@ -1,16 +1,20 @@
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:22:14
|
LL | let _ = &UNFROZEN_VARIANT; //~ ERROR interior mutability
LL | let _ = &UNFROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
= note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings`
note: the lint level is defined here
--> $DIR/enums.rs:3:9
|
LL | #![deny(clippy::borrow_interior_mutable_const)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:37:18
|
LL | let _ = &Self::TO_BE_FROZEN_VARIANT; //~ ERROR interior mutable
LL | let _ = &Self::TO_BE_FROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -18,7 +22,7 @@ LL | let _ = &Self::TO_BE_FROZEN_VARIANT; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:41:18
|
LL | let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT; //~ ERROR interior mutable
LL | let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -26,7 +30,7 @@ LL | let _ = &Self::DEFAULTED_ON_FROZEN_VARIANT; //~ ERROR interior muta
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:50:18
|
LL | let _ = &<Self as AssocConsts>::TO_BE_UNFROZEN_VARIANT; //~ ERROR interior mutable
LL | let _ = &<Self as AssocConsts>::TO_BE_UNFROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -34,7 +38,7 @@ LL | let _ = &<Self as AssocConsts>::TO_BE_UNFROZEN_VARIANT; //~ ERROR i
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:52:18
|
LL | let _ = &Self::DEFAULTED_ON_UNFROZEN_VARIANT; //~ ERROR interior mutable
LL | let _ = &Self::DEFAULTED_ON_UNFROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -42,7 +46,7 @@ LL | let _ = &Self::DEFAULTED_ON_UNFROZEN_VARIANT; //~ ERROR interior mu
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:74:18
|
LL | let _ = &<Self as AssocTypes>::TO_BE_UNFROZEN_VARIANT; //~ ERROR interior mutable
LL | let _ = &<Self as AssocTypes>::TO_BE_UNFROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -50,7 +54,7 @@ LL | let _ = &<Self as AssocTypes>::TO_BE_UNFROZEN_VARIANT; //~ ERROR in
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:91:18
|
LL | let _ = &Self::UNFROZEN_VARIANT; //~ ERROR interior mutability
LL | let _ = &Self::UNFROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -58,7 +62,7 @@ LL | let _ = &Self::UNFROZEN_VARIANT; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:92:18
|
LL | let _ = &Self::GENERIC_VARIANT; //~ ERROR interior mutability
LL | let _ = &Self::GENERIC_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -66,7 +70,7 @@ LL | let _ = &Self::GENERIC_VARIANT; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/enums.rs:99:14
|
LL | let _ = &helper::WRAPPED_PRIVATE_UNFROZEN_VARIANT; //~ ERROR interior mutability
LL | let _ = &helper::WRAPPED_PRIVATE_UNFROZEN_VARIANT;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here

View File

@ -1,4 +1,4 @@
#![warn(clippy::borrow_interior_mutable_const)]
#![deny(clippy::borrow_interior_mutable_const)]
#![allow(clippy::declare_interior_mutable_const, clippy::needless_borrow)]
#![allow(const_item_mutation)]
@ -51,14 +51,14 @@ impl<T> std::ops::Deref for StaticRef<T> {
const CELL_REF: StaticRef<(UnsafeCell<u32>,)> = unsafe { StaticRef::new(std::ptr::null()) };
fn main() {
ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability
assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability
ATOMIC.store(1, Ordering::SeqCst); //~ ERROR: interior mutability
assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR: interior mutability
let _once = ONCE_INIT;
let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
let _once_ref = &ONCE_INIT; //~ ERROR: interior mutability
let _once_ref_2 = &&ONCE_INIT; //~ ERROR: interior mutability
let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR: interior mutability
let _once_mut = &mut ONCE_INIT; //~ ERROR: interior mutability
let _atomic_into_inner = ATOMIC.into_inner();
// these should be all fine.
let _twice = (ONCE_INIT, ONCE_INIT);
@ -69,23 +69,23 @@ fn main() {
let _ref_array_once = &[ONCE_INIT, ONCE_INIT][0];
// referencing projection is still bad.
let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
let _ = &ATOMIC_TUPLE; //~ ERROR: interior mutability
let _ = &ATOMIC_TUPLE.0; //~ ERROR: interior mutability
let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR: interior mutability
let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR: interior mutability
let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR: interior mutability
let _ = &*ATOMIC_TUPLE.1;
let _ = &ATOMIC_TUPLE.2;
let _ = (&&&&ATOMIC_TUPLE).0;
let _ = (&&&&ATOMIC_TUPLE).2;
let _ = ATOMIC_TUPLE.0;
let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
let _ = ATOMIC_TUPLE.0[0]; //~ ERROR: interior mutability
let _ = ATOMIC_TUPLE.1.into_iter();
let _ = ATOMIC_TUPLE.2;
let _ = &{ ATOMIC_TUPLE };
CELL.set(2); //~ ERROR interior mutability
assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
CELL.set(2); //~ ERROR: interior mutability
assert_eq!(CELL.get(), 6); //~ ERROR: interior mutability
assert_eq!(INTEGER, 8);
assert!(STRING.is_empty());

View File

@ -1,16 +1,20 @@
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:54:5
|
LL | ATOMIC.store(1, Ordering::SeqCst); //~ ERROR interior mutability
LL | ATOMIC.store(1, Ordering::SeqCst);
| ^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
= note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings`
note: the lint level is defined here
--> $DIR/others.rs:1:9
|
LL | #![deny(clippy::borrow_interior_mutable_const)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:55:16
|
LL | assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutability
LL | assert_eq!(ATOMIC.load(Ordering::SeqCst), 5);
| ^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -18,7 +22,7 @@ LL | assert_eq!(ATOMIC.load(Ordering::SeqCst), 5); //~ ERROR interior mutabi
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:58:22
|
LL | let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
LL | let _once_ref = &ONCE_INIT;
| ^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -26,7 +30,7 @@ LL | let _once_ref = &ONCE_INIT; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:59:25
|
LL | let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
LL | let _once_ref_2 = &&ONCE_INIT;
| ^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -34,7 +38,7 @@ LL | let _once_ref_2 = &&ONCE_INIT; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:60:27
|
LL | let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
LL | let _once_ref_4 = &&&&ONCE_INIT;
| ^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -42,7 +46,7 @@ LL | let _once_ref_4 = &&&&ONCE_INIT; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:61:26
|
LL | let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
LL | let _once_mut = &mut ONCE_INIT;
| ^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -50,7 +54,7 @@ LL | let _once_mut = &mut ONCE_INIT; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:72:14
|
LL | let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
LL | let _ = &ATOMIC_TUPLE;
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -58,7 +62,7 @@ LL | let _ = &ATOMIC_TUPLE; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:73:14
|
LL | let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
LL | let _ = &ATOMIC_TUPLE.0;
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -66,7 +70,7 @@ LL | let _ = &ATOMIC_TUPLE.0; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:74:19
|
LL | let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
LL | let _ = &(&&&&ATOMIC_TUPLE).0;
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -74,7 +78,7 @@ LL | let _ = &(&&&&ATOMIC_TUPLE).0; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:75:14
|
LL | let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
LL | let _ = &ATOMIC_TUPLE.0[0];
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -82,7 +86,7 @@ LL | let _ = &ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:76:13
|
LL | let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mutability
LL | let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst);
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -90,7 +94,7 @@ LL | let _ = ATOMIC_TUPLE.0[0].load(Ordering::SeqCst); //~ ERROR interior mu
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:82:13
|
LL | let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
LL | let _ = ATOMIC_TUPLE.0[0];
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -98,7 +102,7 @@ LL | let _ = ATOMIC_TUPLE.0[0]; //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:87:5
|
LL | CELL.set(2); //~ ERROR interior mutability
LL | CELL.set(2);
| ^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -106,7 +110,7 @@ LL | CELL.set(2); //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/others.rs:88:16
|
LL | assert_eq!(CELL.get(), 6); //~ ERROR interior mutability
LL | assert_eq!(CELL.get(), 6);
| ^^^^
|
= help: assign this const to a local or static variable, and use the variable here

View File

@ -1,4 +1,4 @@
#![warn(clippy::borrow_interior_mutable_const)]
#![deny(clippy::borrow_interior_mutable_const)]
#![allow(clippy::declare_interior_mutable_const)]
// this file replicates its `declare` counterpart. Please see it for more discussions.
@ -12,7 +12,7 @@ trait ConcreteTypes {
const STRING: String;
fn function() {
let _ = &Self::ATOMIC; //~ ERROR interior mutable
let _ = &Self::ATOMIC; //~ ERROR: interior mutability
let _ = &Self::STRING;
}
}
@ -23,7 +23,7 @@ impl ConcreteTypes for u64 {
fn function() {
// Lint this again since implementers can choose not to borrow it.
let _ = &Self::ATOMIC; //~ ERROR interior mutable
let _ = &Self::ATOMIC; //~ ERROR: interior mutability
let _ = &Self::STRING;
}
}
@ -48,7 +48,7 @@ impl<T: ConstDefault> GenericTypes<T, AtomicUsize> for Vec<T> {
fn function() {
let _ = &Self::TO_REMAIN_GENERIC;
let _ = &Self::TO_BE_CONCRETE; //~ ERROR interior mutable
let _ = &Self::TO_BE_CONCRETE; //~ ERROR: interior mutability
}
}
@ -83,8 +83,8 @@ impl<T: ConstDefault> AssocTypes for Vec<T> {
fn function() {
let _ = &Self::TO_BE_FROZEN;
let _ = &Self::TO_BE_UNFROZEN; //~ ERROR interior mutable
let _ = &Self::WRAPPED_TO_BE_UNFROZEN; //~ ERROR interior mutable
let _ = &Self::TO_BE_UNFROZEN; //~ ERROR: interior mutability
let _ = &Self::WRAPPED_TO_BE_UNFROZEN; //~ ERROR: interior mutability
let _ = &Self::WRAPPED_TO_BE_GENERIC_PARAM;
}
}
@ -106,7 +106,7 @@ where
fn function() {
let _ = &Self::NOT_BOUNDED;
let _ = &Self::BOUNDED; //~ ERROR interior mutable
let _ = &Self::BOUNDED; //~ ERROR: interior mutability
}
}
@ -119,7 +119,7 @@ where
fn function() {
let _ = &Self::NOT_BOUNDED;
let _ = &Self::BOUNDED; //~ ERROR interior mutable
let _ = &Self::BOUNDED; //~ ERROR: interior mutability
}
}
@ -148,8 +148,8 @@ impl SelfType for AtomicUsize {
const WRAPPED_SELF: Option<Self> = Some(AtomicUsize::new(21));
fn function() {
let _ = &Self::SELF; //~ ERROR interior mutable
let _ = &Self::WRAPPED_SELF; //~ ERROR interior mutable
let _ = &Self::SELF; //~ ERROR: interior mutability
let _ = &Self::WRAPPED_SELF; //~ ERROR: interior mutability
}
}
@ -159,7 +159,7 @@ trait BothOfCellAndGeneric<T> {
fn function() {
let _ = &Self::DIRECT;
let _ = &Self::INDIRECT; //~ ERROR interior mutable
let _ = &Self::INDIRECT; //~ ERROR: interior mutability
}
}
@ -169,7 +169,7 @@ impl<T: ConstDefault> BothOfCellAndGeneric<T> for Vec<T> {
fn function() {
let _ = &Self::DIRECT;
let _ = &Self::INDIRECT; //~ ERROR interior mutable
let _ = &Self::INDIRECT; //~ ERROR: interior mutability
}
}
@ -188,15 +188,15 @@ where
const BOUNDED_ASSOC_TYPE: T::ToBeBounded = AtomicUsize::new(19);
fn function() {
let _ = &Self::ATOMIC; //~ ERROR interior mutable
let _ = &Self::ATOMIC; //~ ERROR: interior mutability
let _ = &Self::COW;
let _ = &Self::GENERIC_TYPE;
let _ = &Self::ASSOC_TYPE;
let _ = &Self::BOUNDED_ASSOC_TYPE; //~ ERROR interior mutable
let _ = &Self::BOUNDED_ASSOC_TYPE; //~ ERROR: interior mutability
}
}
fn main() {
u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability
u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR: interior mutability
assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR: interior mutability
}

View File

@ -1,16 +1,20 @@
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:15:18
|
LL | let _ = &Self::ATOMIC; //~ ERROR interior mutable
LL | let _ = &Self::ATOMIC;
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
= note: `-D clippy::borrow-interior-mutable-const` implied by `-D warnings`
note: the lint level is defined here
--> $DIR/traits.rs:1:9
|
LL | #![deny(clippy::borrow_interior_mutable_const)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:26:18
|
LL | let _ = &Self::ATOMIC; //~ ERROR interior mutable
LL | let _ = &Self::ATOMIC;
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -18,7 +22,7 @@ LL | let _ = &Self::ATOMIC; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:51:18
|
LL | let _ = &Self::TO_BE_CONCRETE; //~ ERROR interior mutable
LL | let _ = &Self::TO_BE_CONCRETE;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -26,7 +30,7 @@ LL | let _ = &Self::TO_BE_CONCRETE; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:86:18
|
LL | let _ = &Self::TO_BE_UNFROZEN; //~ ERROR interior mutable
LL | let _ = &Self::TO_BE_UNFROZEN;
| ^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -34,7 +38,7 @@ LL | let _ = &Self::TO_BE_UNFROZEN; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:87:18
|
LL | let _ = &Self::WRAPPED_TO_BE_UNFROZEN; //~ ERROR interior mutable
LL | let _ = &Self::WRAPPED_TO_BE_UNFROZEN;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -42,7 +46,7 @@ LL | let _ = &Self::WRAPPED_TO_BE_UNFROZEN; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:109:18
|
LL | let _ = &Self::BOUNDED; //~ ERROR interior mutable
LL | let _ = &Self::BOUNDED;
| ^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -50,7 +54,7 @@ LL | let _ = &Self::BOUNDED; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:122:18
|
LL | let _ = &Self::BOUNDED; //~ ERROR interior mutable
LL | let _ = &Self::BOUNDED;
| ^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -58,7 +62,7 @@ LL | let _ = &Self::BOUNDED; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:151:18
|
LL | let _ = &Self::SELF; //~ ERROR interior mutable
LL | let _ = &Self::SELF;
| ^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -66,7 +70,7 @@ LL | let _ = &Self::SELF; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:152:18
|
LL | let _ = &Self::WRAPPED_SELF; //~ ERROR interior mutable
LL | let _ = &Self::WRAPPED_SELF;
| ^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -74,7 +78,7 @@ LL | let _ = &Self::WRAPPED_SELF; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:162:18
|
LL | let _ = &Self::INDIRECT; //~ ERROR interior mutable
LL | let _ = &Self::INDIRECT;
| ^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -82,7 +86,7 @@ LL | let _ = &Self::INDIRECT; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:172:18
|
LL | let _ = &Self::INDIRECT; //~ ERROR interior mutable
LL | let _ = &Self::INDIRECT;
| ^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -90,7 +94,7 @@ LL | let _ = &Self::INDIRECT; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:191:18
|
LL | let _ = &Self::ATOMIC; //~ ERROR interior mutable
LL | let _ = &Self::ATOMIC;
| ^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -98,7 +102,7 @@ LL | let _ = &Self::ATOMIC; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:195:18
|
LL | let _ = &Self::BOUNDED_ASSOC_TYPE; //~ ERROR interior mutable
LL | let _ = &Self::BOUNDED_ASSOC_TYPE;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -106,7 +110,7 @@ LL | let _ = &Self::BOUNDED_ASSOC_TYPE; //~ ERROR interior mutable
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:200:5
|
LL | u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
LL | u64::ATOMIC.store(5, Ordering::SeqCst);
| ^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here
@ -114,7 +118,7 @@ LL | u64::ATOMIC.store(5, Ordering::SeqCst); //~ ERROR interior mutability
error: a `const` item with interior mutability should not be borrowed
--> $DIR/traits.rs:201:16
|
LL | assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9); //~ ERROR interior mutability
LL | assert_eq!(u64::ATOMIC.load(Ordering::SeqCst), 9);
| ^^^^^^^^^^^
|
= help: assign this const to a local or static variable, and use the variable here

View File

@ -3,7 +3,7 @@
fn foo<u32>(a: u32) -> u32 {
42
// ^ rustc's type error
//~^ ERROR: mismatched types
}
fn main() {}

View File

@ -31,7 +31,7 @@ struct Foo;
impl PartialEq for Foo {
// Allow this here, because it emits the lint
// without a suggestion. This is tested in
// `tests/ui/cmp_owned/without_suggestion.rs`
// `$DIR/without_suggestion.rs`
#[allow(clippy::cmp_owned)]
fn eq(&self, other: &Self) -> bool {
self.to_owned() == *other

View File

@ -39,6 +39,14 @@ LL | fn bar() {
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:178:4
|
LL | fn dont_warn_on_tests() {
| ^^^^^^^^^^^^^^^^^^
|
= help: you could split it up into multiple smaller functions
error: the function has a cognitive complexity of (2/1)
--> $DIR/cognitive_complexity.rs:186:4
|
@ -151,5 +159,5 @@ LL | pub async fn async_method() {
|
= help: you could split it up into multiple smaller functions
error: aborting due to 19 previous errors
error: aborting due to 20 previous errors

View File

@ -1,13 +1,5 @@
//@compile-flags: --emit=link
//@no-prefer-dynamic
// ^ compiletest by default builds all aux files as dylibs, but we don't want that for proc-macro
// crates. If we don't set this, compiletest will override the `crate_type` attribute below and
// compile this as dylib. Removing this then causes the test to fail because a `dylib` crate can't
// contain a proc-macro.
#![feature(repr128)]
#![allow(incomplete_features)]
#![crate_type = "proc-macro"]
extern crate proc_macro;

View File

@ -1,4 +1,4 @@
//@aux-build:../../auxiliary/proc_macros.rs
//@aux-build:../auxiliary/proc_macros.rs:proc-macro
extern crate proc_macros;

View File

@ -1,4 +1,4 @@
//@aux-build:proc_macro_crash.rs
//@aux-build:proc_macro_crash.rs:proc-macro
#![warn(clippy::suspicious_else_formatting)]

View File

@ -7,5 +7,5 @@ pub trait Foo {
impl<T: Foo> Foo for Vec<T> {
const OOB: i32 = [1][1] + T::OOB;
//~^ ERROR operation will panic
//~^ ERROR: operation will panic
}

View File

@ -1,9 +1,3 @@
error[E0601]: `main` function not found in crate `ice_6250`
--> $DIR/ice-6250.rs:16:2
|
LL | }
| ^ consider adding a `main` function to `$DIR/ice-6250.rs`
error[E0308]: mismatched types
--> $DIR/ice-6250.rs:12:14
|
@ -29,7 +23,6 @@ help: consider adding `let`
LL | let Some(reference) = cache.data.get(key) {
| +++
error: aborting due to 3 previous errors
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0308, E0601.
For more information about an error, try `rustc --explain E0308`.
For more information about this error, try `rustc --explain E0308`.

View File

@ -1,9 +1,3 @@
error[E0601]: `main` function not found in crate `ice_6251`
--> $DIR/ice-6251.rs:6:2
|
LL | }
| ^ consider adding a `main` function to `$DIR/ice-6251.rs`
error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
--> $DIR/ice-6251.rs:4:45
|
@ -35,7 +29,7 @@ LL | fn bug<T>() -> impl Iterator<Item = [(); { |x: [u8]| x }]> {
= note: expected type `usize`
found closure `[closure@$DIR/ice-6251.rs:4:44: 4:53]`
error: aborting due to 4 previous errors
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0277, E0308, E0601.
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.

View File

@ -4,7 +4,6 @@
macro_rules! define_other_core {
( ) => {
extern crate std as core;
//~^ ERROR macro-expanded `extern crate` items cannot shadow names passed with `--extern`
};
}
@ -13,3 +12,4 @@ fn main() {
}
define_other_core!();
//~^ ERROR: macro-expanded `extern crate` items cannot shadow names passed with `--extern`

View File

@ -10,6 +10,6 @@ impl dyn TT {
#[rustfmt::skip]
fn main() {
let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
//[nll]~^ ERROR: borrowed data escapes outside of closure
let f = |x: &dyn TT| x.func();
//~^ ERROR: borrowed data escapes outside of closure
}

View File

@ -1,7 +1,7 @@
error[E0521]: borrowed data escapes outside of closure
--> $DIR/ice-6256.rs:13:26
|
LL | let f = |x: &dyn TT| x.func(); //[default]~ ERROR: mismatched types
LL | let f = |x: &dyn TT| x.func();
| - - ^^^^^^^^
| | | |
| | | `x` escapes the closure body here

View File

@ -1,6 +1,6 @@
//@compile-flags: -Clink-arg=-nostartfiles
//@ignore-macos
//@ignore-windows
//@ignore-target-apple
//@ignore-target-windows
#![feature(lang_items, start, libc)]
#![no_std]

View File

@ -4,7 +4,7 @@ macro_rules! foo {
};
}
#[path = foo!()] //~ ERROR malformed `path` attribute
#[path = foo!()] //~ ERROR: malformed `path` attribute
mod abc {}
fn main() {}

View File

@ -1,7 +1,7 @@
error: malformed `path` attribute input
--> $DIR/ice-96721.rs:7:1
|
LL | #[path = foo!()] //~ ERROR malformed `path` attribute
LL | #[path = foo!()]
| ^^^^^^^^^^^^^^^^ help: must be of the form: `#[path = "file"]`
error: aborting due to previous error

View File

@ -1,4 +1,4 @@
//@ignore-macos
//@ignore-target-apple
#![feature(rustc_attrs)]

View File

@ -1,11 +0,0 @@
error: recursing into entrypoint `a`
--> $DIR/entrypoint_recursion.rs:10:5
|
LL | a();
| ^
|
= help: consider using another function for this recursion
= note: `-D clippy::main-recursion` implied by `-D warnings`
error: aborting due to previous error

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