repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_config_files/no_warn/src/main.rs
src/tools/clippy/tests/ui-cargo/multiple_config_files/no_warn/src/main.rs
fn main() { println!("Hello, world!"); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_mod/src/lib.rs
src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_mod/src/lib.rs
#![warn(clippy::mod_module_files)] #[path = "bar/mod.rs"] pub mod foo;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_mod/src/bar/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_mod/src/bar/mod.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_no_mod/src/lib.rs
src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_no_mod/src/lib.rs
#![warn(clippy::self_named_module_files)] pub mod foo;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_no_mod/src/bar.rs
src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_no_mod/src/bar.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_no_mod/src/foo.rs
src/tools/clippy/tests/ui-cargo/module_style/with_path_attr_no_mod/src/foo.rs
#[path = "bar.rs"] mod bar;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/main.rs
src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/main.rs
#![warn(clippy::self_named_module_files)] mod bad; mod more; fn main() { let _ = bad::Thing; let _ = more::foo::Foo; let _ = more::inner::Inner; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/mod.rs
pub mod foo; pub mod inner;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/foo.rs
src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/foo.rs
pub struct Foo;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/inner/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/more/inner/mod.rs
pub struct Inner;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/bad/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/pass_mod/src/bad/mod.rs
pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/main.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/main.rs
#![warn(clippy::self_named_module_files)] mod bad; fn main() { let _ = bad::Thing; let _ = bad::inner::stuff::Inner; let _ = bad::inner::stuff::most::Snarks; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/inner.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/inner.rs
pub mod stuff;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/mod.rs
pub mod inner; pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/inner/stuff.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/inner/stuff.rs
pub mod most; pub struct Inner;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/inner/stuff/most.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod/src/bad/inner/stuff/most.rs
pub struct Snarks;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/main.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/main.rs
#![warn(clippy::mod_module_files)] mod bad; fn main() { let _ = bad::Thing; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/bad/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_no_mod/src/bad/mod.rs
pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad.rs
pub mod inner;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/main.rs
// FIXME: find a way to add rustflags to ui-cargo tests //@compile-flags: --remap-path-prefix {{src-base}}=/remapped #![warn(clippy::self_named_module_files)] mod bad; fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs
src/tools/clippy/tests/ui-cargo/module_style/fail_mod_remap/src/bad/inner.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/pass_no_mod/src/good.rs
src/tools/clippy/tests/ui-cargo/module_style/pass_no_mod/src/good.rs
pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/pass_no_mod/src/main.rs
src/tools/clippy/tests/ui-cargo/module_style/pass_no_mod/src/main.rs
#![warn(clippy::mod_module_files)] mod good; fn main() { let _ = good::Thing; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/lib.rs
src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/lib.rs
#![warn(clippy::self_named_module_files)] pub mod foo; pub mod other;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/foo.rs
src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/foo.rs
pub mod bar;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/other/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/other/mod.rs
pub mod foo;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/other/foo/mod.rs
src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/other/foo/mod.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/foo/bar.rs
src/tools/clippy/tests/ui-cargo/module_style/duplicated_mod_names_14697/src/foo/bar.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/segment_with_mod_name_10271_11916/src/lib.rs
src/tools/clippy/tests/ui-cargo/module_style/segment_with_mod_name_10271_11916/src/lib.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/segment_with_mod_name_10271_11916/foo/bar/src/lib.rs
src/tools/clippy/tests/ui-cargo/module_style/segment_with_mod_name_10271_11916/foo/bar/src/lib.rs
pub mod foo;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/module_style/segment_with_mod_name_10271_11916/foo/bar/src/foo.rs
src/tools/clippy/tests/ui-cargo/module_style/segment_with_mod_name_10271_11916/foo/bar/src/foo.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/wildcard_dependencies/fail/src/main.rs
src/tools/clippy/tests/ui-cargo/wildcard_dependencies/fail/src/main.rs
#![warn(clippy::wildcard_dependencies)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/wildcard_dependencies/pass/src/main.rs
src/tools/clippy/tests/ui-cargo/wildcard_dependencies/pass/src/main.rs
#![warn(clippy::wildcard_dependencies)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_common_metadata/fail/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_common_metadata/fail/src/main.rs
#![warn(clippy::cargo_common_metadata)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_common_metadata/pass/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_common_metadata/pass/src/main.rs
#![warn(clippy::cargo_common_metadata)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_common_metadata/fail_publish_true/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_common_metadata/fail_publish_true/src/main.rs
#![warn(clippy::cargo_common_metadata)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_common_metadata/fail_publish/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_common_metadata/fail_publish/src/main.rs
#![warn(clippy::cargo_common_metadata)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_common_metadata/pass_publish_empty/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_common_metadata/pass_publish_empty/src/main.rs
#![warn(clippy::cargo_common_metadata)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_common_metadata/pass_publish_false/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_common_metadata/pass_publish_false/src/main.rs
#![warn(clippy::cargo_common_metadata)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/crate_fail/src/b.rs
src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/crate_fail/src/b.rs
pub struct S; pub struct T; impl T { fn first() {} }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/crate_fail/src/main.rs
src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/crate_fail/src/main.rs
#![allow(dead_code)] #![deny(clippy::multiple_inherent_impl)] struct S; struct T; impl S { fn first() {} } impl S { //^ Must trigger fn second() {} } impl T { fn first() {} } mod a { use super::T; impl T { //^ Must trigger fn second() {} } } mod b; impl b::S { //^ ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/config_fail/src/main.rs
src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/config_fail/src/main.rs
#![allow(dead_code)] #![deny(clippy::multiple_inherent_impl)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/module_fail/src/c.rs
src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/module_fail/src/c.rs
pub struct S; struct T; impl S { fn first() {} } impl T { fn first() {} } impl T { //^ Must trigger fn second() {} }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/module_fail/src/main.rs
src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/module_fail/src/main.rs
#![allow(dead_code)] #![deny(clippy::multiple_inherent_impl)] struct S; impl S { fn first() {} } mod a { use super::S; impl S { //^ Must NOT trigger fn second() {} } } mod b { struct S; impl S { fn first() {} } impl S { //^ Must trigger fn ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/file_fail/src/c.rs
src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/file_fail/src/c.rs
pub struct S; struct T; impl S { fn first() {} } mod d { use super::T; impl T { fn first() {} } } mod e { use super::T; impl T { //^ Must trigger fn second() {} } }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/file_fail/src/main.rs
src/tools/clippy/tests/ui-cargo/multiple_inherent_impl/file_fail/src/main.rs
#![allow(dead_code)] #![deny(clippy::multiple_inherent_impl)] struct S; impl S { fn first() {} } mod a { use super::S; impl S { //^ Must trigger fn second() {} } } mod b { struct S; impl S { fn first() {} } impl S { //^ Must trigger fn seco...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_file_attr/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_file_attr/src/main.rs
// FIXME: this should produce a warning, because the attribute says 1.58 and the cargo.toml file // says 1.13 #![feature(custom_inner_attributes)] #![clippy::msrv = "1.58.0"] #![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_both_diff/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_both_diff/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_both_same/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_both_same/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_cargo/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_cargo/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/warn_both_diff/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/warn_both_diff/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_both_same/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_both_same/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_file_attr/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_file_attr/src/main.rs
#![feature(custom_inner_attributes)] #![clippy::msrv = "1.13.0"] #![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_clippy/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/fail_clippy/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_clippy/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_clippy/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_cargo/src/main.rs
src/tools/clippy/tests/ui-cargo/cargo_rust_version/pass_cargo/src/main.rs
#![deny(clippy::use_self)] pub struct Foo; impl Foo { pub fn bar() -> Foo { Foo } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/feature_name/fail/src/main.rs
src/tools/clippy/tests/ui-cargo/feature_name/fail/src/main.rs
#![warn(clippy::redundant_feature_names)] #![warn(clippy::negative_feature_names)] fn main() { // test code goes here }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/feature_name/pass/src/main.rs
src/tools/clippy/tests/ui-cargo/feature_name/pass/src/main.rs
#![warn(clippy::redundant_feature_names)] #![warn(clippy::negative_feature_names)] fn main() { // test code goes here }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-cargo/undocumented_unsafe_blocks/fail/src/main.rs
src/tools/clippy/tests/ui-cargo/undocumented_unsafe_blocks/fail/src/main.rs
// SAFETY: ... mod x {} // SAFETY: ... mod y {} fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/build.rs
src/tools/clippy/tests/workspace_test/build.rs
#![deny(clippy::print_stdout)] fn main() { // Test for #6041 println!("Hello"); print!("Hello"); }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/subcrate/src/lib.rs
src/tools/clippy/tests/workspace_test/subcrate/src/lib.rs
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/src/main.rs
src/tools/clippy/tests/workspace_test/src/main.rs
#![deny(rust_2018_idioms)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/main.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/main.rs
#![deny(clippy::self_named_module_files)] mod bad; mod more; extern crate dep_no_mod; fn main() { let _ = bad::Thing; let _ = more::foo::Foo; let _ = more::inner::Inner; let _ = dep_no_mod::foo::Thing; let _ = dep_no_mod::foo::hello::Hello; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/more/mod.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/more/mod.rs
pub mod foo; pub mod inner;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/more/foo.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/more/foo.rs
pub struct Foo;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/more/inner/mod.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/more/inner/mod.rs
pub struct Inner;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/bad/mod.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/src/bad/mod.rs
pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/dep_no_mod/src/lib.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/dep_no_mod/src/lib.rs
pub mod foo; pub fn foo() { let _ = foo::Thing; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/dep_no_mod/src/foo.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/dep_no_mod/src/foo.rs
pub mod hello; pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/dep_no_mod/src/foo/hello.rs
src/tools/clippy/tests/workspace_test/module_style/pass_mod_with_dep_in_subdir/dep_no_mod/src/foo/hello.rs
pub struct Hello;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/src/good.rs
src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/src/good.rs
pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/src/main.rs
src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/src/main.rs
#![deny(clippy::mod_module_files)] mod good; pub use dep_with_mod::with_mod::Thing; fn main() { let _ = good::Thing; let _ = dep_with_mod::with_mod::Thing; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/lib.rs
src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/lib.rs
pub mod with_mod; pub fn foo() { let _ = with_mod::Thing; let _ = with_mod::inner::stuff::Inner; let _ = with_mod::inner::stuff::most::Snarks; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/inner.rs
src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/inner.rs
pub mod stuff;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/mod.rs
src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/mod.rs
pub mod inner; pub struct Thing;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/inner/stuff.rs
src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/inner/stuff.rs
pub mod most; pub struct Inner;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/inner/stuff/most.rs
src/tools/clippy/tests/workspace_test/module_style/pass_no_mod_with_dep_in_subdir/dep_with_mod/src/with_mod/inner/stuff/most.rs
pub struct Snarks;
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/workspace_test/path_dep/src/lib.rs
src/tools/clippy/tests/workspace_test/path_dep/src/lib.rs
#![deny(clippy::empty_loop)] #[cfg(feature = "primary_package_test")] pub fn lint_me() { loop {} }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/manual_let_else/manual_let_else.rs
src/tools/clippy/tests/ui-toml/manual_let_else/manual_let_else.rs
#![warn(clippy::manual_let_else)] enum Foo { A(u8), B, } fn main() { let x = match Foo::A(1) { //~^ ERROR: this could be rewritten as `let...else` Foo::A(x) => x, Foo::B => return, }; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/absolute_paths/absolute_paths_2015.rs
src/tools/clippy/tests/ui-toml/absolute_paths/absolute_paths_2015.rs
//@revisions: default allow_crates //@[default]rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/absolute_paths/default //@[allow_crates]rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/absolute_paths/allow_crates //@[allow_crates]check-pass //@edition:2015 #![deny(clippy::absolute_paths)] mod m1 { pub mod m2 { pub struct X...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/absolute_paths/absolute_paths.rs
src/tools/clippy/tests/ui-toml/absolute_paths/absolute_paths.rs
//@aux-build:../../ui/auxiliary/proc_macros.rs //@revisions: default allow_crates allow_long no_short //@[default] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/absolute_paths/default //@[allow_crates] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/absolute_paths/allow_crates //@[allow_long] rustc-env:CLIPPY_CONF_DIR=tests/ui-toml/...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/disallowed_names_append/disallowed_names.rs
src/tools/clippy/tests/ui-toml/disallowed_names_append/disallowed_names.rs
#![warn(clippy::disallowed_names)] fn main() { // `foo` is part of the default configuration let foo = "bar"; //~^ disallowed_names // `ducks` was unrightfully disallowed let ducks = ["quack", "quack"]; //~^ disallowed_names // `fox` is okay let fox = ["what", "does", "the", "fox", "say...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/disallowed_macros/disallowed_macros.rs
src/tools/clippy/tests/ui-toml/disallowed_macros/disallowed_macros.rs
//@aux-build:macros.rs //@aux-build:proc_macros.rs #![allow(unused)] extern crate macros; extern crate proc_macros; use proc_macros::Derive; use serde::Serialize; fn main() { println!("one"); //~^ disallowed_macros println!("two"); //~^ disallowed_macros cfg!(unix); //~^ disallowed_macros ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/disallowed_macros/auxiliary/proc_macros.rs
src/tools/clippy/tests/ui-toml/disallowed_macros/auxiliary/proc_macros.rs
extern crate proc_macro; use proc_macro::Delimiter::{Brace, Bracket, Parenthesis}; use proc_macro::Spacing::{Alone, Joint}; use proc_macro::{Group, Ident, Punct, Span, TokenStream, TokenTree as TT}; #[proc_macro_derive(Derive)] pub fn derive(_: TokenStream) -> TokenStream { TokenStream::from_iter([ TT::fro...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/disallowed_macros/auxiliary/macros.rs
src/tools/clippy/tests/ui-toml/disallowed_macros/auxiliary/macros.rs
#[macro_export] macro_rules! expr { () => { 1 }; } #[macro_export] macro_rules! stmt { () => { let _x = (); }; } #[macro_export] macro_rules! ty { () => { &'static str }; } #[macro_export] macro_rules! pat { () => { _ }; } #[macro_export] macro_rules! item { (...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs
src/tools/clippy/tests/ui-toml/toml_disallowed_types/conf_disallowed_types.rs
#![warn(clippy::disallowed_types)] extern crate quote; extern crate syn; use std::sync as foo; use std::sync::atomic::AtomicU32; //~^ disallowed_types use std::time::Instant as Sneaky; //~^ disallowed_types struct HashMap; fn bad_return_type() -> fn() -> Sneaky { //~^ disallowed_types todo!() } fn bad_arg_...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/replaceable_disallowed_types/replaceable_disallowed_types.rs
src/tools/clippy/tests/ui-toml/replaceable_disallowed_types/replaceable_disallowed_types.rs
#![warn(clippy::disallowed_types)] #[allow(clippy::disallowed_types)] mod wrapper { pub struct String(std::string::String); impl From<&str> for String { fn from(value: &str) -> Self { Self(std::string::String::from(value)) } } } fn main() { let _ = String::from("x"); /...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/useless_vec/useless_vec.rs
src/tools/clippy/tests/ui-toml/useless_vec/useless_vec.rs
//@compile-flags: --test #![warn(clippy::useless_vec)] #![allow(clippy::unnecessary_operation, clippy::no_effect)] fn foo(_: &[u32]) {} fn main() { foo(&vec![1_u32]); //~^ useless_vec } #[test] pub fn in_test() { foo(&vec![2_u32]); } #[cfg(test)] fn in_cfg_test() { foo(&vec![3_u32]); } #[cfg(test)]...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/expect_used/expect_used.rs
src/tools/clippy/tests/ui-toml/expect_used/expect_used.rs
//@compile-flags: --test //@no-rustfix #![warn(clippy::expect_used)] #![allow(clippy::unnecessary_literal_unwrap)] fn expect_option() { let opt = Some(0); let _ = opt.expect(""); //~^ expect_used } fn expect_result() { let res: Result<u8, ()> = Ok(0); let _ = res.expect(""); //~^ expect_used }...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/functions_maxlines/test.rs
src/tools/clippy/tests/ui-toml/functions_maxlines/test.rs
#![warn(clippy::too_many_lines)] #![allow(clippy::let_unit_value)] // This function should be considered one line. fn many_comments_but_one_line_of_code() { /* println!("This is good."); */ // println!("This is good."); /* */ // println!("This is good."); /* */ // println!("This is good."); /* */ /...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/zero_single_char_names/zero_single_char_names.rs
src/tools/clippy/tests/ui-toml/zero_single_char_names/zero_single_char_names.rs
//@check-pass #![warn(clippy::many_single_char_names)] fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/print_macro/print_macro.rs
src/tools/clippy/tests/ui-toml/print_macro/print_macro.rs
//@compile-flags: --test #![warn(clippy::print_stdout)] #![warn(clippy::print_stderr)] fn foo(n: u32) { print!("{n}"); //~^ print_stdout eprint!("{n}"); //~^ print_stderr } #[test] pub fn foo1() { print!("{}", 1); eprint!("{}", 1); } #[cfg(test)] fn foo3() { print!("{}", 1); eprint!("...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs
src/tools/clippy/tests/ui-toml/arithmetic_side_effects_allowed/arithmetic_side_effects_allowed.rs
#![warn(clippy::arithmetic_side_effects)] #![allow(clippy::unnecessary_literal_unwrap)] use core::ops::{Add, Neg}; macro_rules! create { ($name:ident) => { #[allow(clippy::arithmetic_side_effects)] #[derive(Clone, Copy)] struct $name; impl Add<$name> for $name { type O...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/extra_unused_type_parameters/extra_unused_type_parameters.rs
src/tools/clippy/tests/ui-toml/extra_unused_type_parameters/extra_unused_type_parameters.rs
//@check-pass pub struct S; impl S { pub fn exported_fn<T>() { unimplemented!(); } } fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/module_inception/module_inception.rs
src/tools/clippy/tests/ui-toml/module_inception/module_inception.rs
#![warn(clippy::module_inception)] // Lint pub mod foo2 { pub mod bar2 { pub mod bar2 { //~^ module_inception pub mod foo2 {} } pub mod foo2 {} } pub mod foo2 { //~^ module_inception pub mod bar2 {} } } // Don't lint mod foo { pub mod...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs
src/tools/clippy/tests/ui-toml/toml_disallow/conf_french_disallowed_name.rs
#![allow(dead_code)] #![allow(clippy::single_match)] #![allow(unused_variables)] #![warn(clippy::disallowed_names)] fn test(toto: ()) {} //~^ disallowed_names fn main() { let toto = 42; //~^ disallowed_names let tata = 42; //~^ disallowed_names let titi = 42; //~^ disallowed_names let tat...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/struct_excessive_bools/test.rs
src/tools/clippy/tests/ui-toml/struct_excessive_bools/test.rs
#![warn(clippy::struct_excessive_bools)] struct S { //~^ struct_excessive_bools a: bool, } struct Foo; fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/disallowed_names_replace/disallowed_names.rs
src/tools/clippy/tests/ui-toml/disallowed_names_replace/disallowed_names.rs
#![warn(clippy::disallowed_names)] fn main() { // `foo` is part of the default configuration let foo = "bar"; // `ducks` was unrightfully disallowed let ducks = ["quack", "quack"]; //~^ disallowed_names // `fox` is okay let fox = ["what", "does", "the", "fox", "say", "?"]; }
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/dbg_macro/dbg_macro.rs
src/tools/clippy/tests/ui-toml/dbg_macro/dbg_macro.rs
//@compile-flags: --test #![warn(clippy::dbg_macro)] #![allow(clippy::unnecessary_operation, clippy::no_effect)] fn foo(n: u32) -> u32 { if let Some(n) = dbg!(n.checked_sub(4)) { n } else { n } //~^ dbg_macro } fn factorial(n: u32) -> u32 { if dbg!(n <= 1) { //~^ dbg_macro dbg!(1) ...
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false
rust-lang/rust
https://github.com/rust-lang/rust/blob/f8b1d59a81c700cb7aa25cf69e3032b3ce333150/src/tools/clippy/tests/ui-toml/good_toml_no_false_negatives/conf_no_false_negatives.rs
src/tools/clippy/tests/ui-toml/good_toml_no_false_negatives/conf_no_false_negatives.rs
//@check-pass fn main() {}
rust
Apache-2.0
f8b1d59a81c700cb7aa25cf69e3032b3ce333150
2026-01-04T15:31:58.503980Z
false