2020-01-22 18:00:00 -06:00
|
|
|
// check-pass
|
2018-09-29 19:25:26 -05:00
|
|
|
|
2018-09-29 20:00:50 -05:00
|
|
|
#![feature(lint_reasons)]
|
2018-09-29 19:25:26 -05:00
|
|
|
#![warn(elided_lifetimes_in_paths,
|
2020-01-22 17:57:38 -06:00
|
|
|
//~^ NOTE the lint level is defined here
|
2018-09-29 19:25:26 -05:00
|
|
|
reason = "explicit anonymous lifetimes aid reasoning about ownership")]
|
|
|
|
#![warn(
|
|
|
|
nonstandard_style,
|
2020-01-22 17:57:38 -06:00
|
|
|
//~^ NOTE the lint level is defined here
|
2018-09-29 19:25:26 -05:00
|
|
|
reason = r#"people shouldn't have to change their usual style habits
|
|
|
|
to contribute to our project"#
|
|
|
|
)]
|
|
|
|
#![allow(unused, reason = "unused code has never killed anypony")]
|
|
|
|
|
|
|
|
use std::fmt;
|
|
|
|
|
|
|
|
pub struct CheaterDetectionMechanism {}
|
|
|
|
|
|
|
|
impl fmt::Debug for CheaterDetectionMechanism {
|
|
|
|
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
|
|
|
//~^ WARN hidden lifetime parameters in types are deprecated
|
2022-03-10 16:12:35 -06:00
|
|
|
//~| NOTE expected lifetime parameter
|
2018-09-29 19:25:26 -05:00
|
|
|
//~| NOTE explicit anonymous lifetimes aid
|
2022-03-10 16:12:35 -06:00
|
|
|
//~| HELP indicate the anonymous lifetime
|
2018-09-29 19:25:26 -05:00
|
|
|
fmt.debug_struct("CheaterDetectionMechanism").finish()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let Social_exchange_psychology = CheaterDetectionMechanism {};
|
2019-10-23 19:00:00 -05:00
|
|
|
//~^ WARN should have a snake case name
|
|
|
|
//~| NOTE #[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]
|
2018-09-29 19:25:26 -05:00
|
|
|
//~| NOTE people shouldn't have to change their usual style habits
|
2019-10-23 19:00:00 -05:00
|
|
|
//~| HELP convert the identifier to snake case
|
2018-09-29 19:25:26 -05:00
|
|
|
}
|