2020-01-23 00:00:00 +00:00
|
|
|
//@ check-pass
|
2018-09-30 00:25:26 +00:00
|
|
|
|
2018-09-30 01:00:50 +00:00
|
|
|
#![feature(lint_reasons)]
|
2018-09-30 00:25:26 +00:00
|
|
|
#![warn(elided_lifetimes_in_paths,
|
2020-01-22 23:57:38 +00:00
|
|
|
//~^ NOTE the lint level is defined here
|
2018-09-30 00:25:26 +00:00
|
|
|
reason = "explicit anonymous lifetimes aid reasoning about ownership")]
|
|
|
|
#![warn(
|
|
|
|
nonstandard_style,
|
2020-01-22 23:57:38 +00:00
|
|
|
//~^ NOTE the lint level is defined here
|
2018-09-30 00:25:26 +00: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 22:12:35 +00:00
|
|
|
//~| NOTE expected lifetime parameter
|
2018-09-30 00:25:26 +00:00
|
|
|
//~| NOTE explicit anonymous lifetimes aid
|
2022-03-10 22:12:35 +00:00
|
|
|
//~| HELP indicate the anonymous lifetime
|
2018-09-30 00:25:26 +00:00
|
|
|
fmt.debug_struct("CheaterDetectionMechanism").finish()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let Social_exchange_psychology = CheaterDetectionMechanism {};
|
2019-10-24 00:00:00 +00:00
|
|
|
//~^ WARN should have a snake case name
|
|
|
|
//~| NOTE #[warn(non_snake_case)]` implied by `#[warn(nonstandard_style)]
|
2018-09-30 00:25:26 +00:00
|
|
|
//~| NOTE people shouldn't have to change their usual style habits
|
2019-10-24 00:00:00 +00:00
|
|
|
//~| HELP convert the identifier to snake case
|
2018-09-30 00:25:26 +00:00
|
|
|
}
|