]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/ui/attrs.rs
1 #![warn(clippy::inline_always, clippy::deprecated_semver)]
2 #![allow(clippy::assertions_on_constants)]
3 #![allow(clippy::missing_docs_in_private_items, clippy::panic, clippy::unreachable)]
6 //~^ ERROR: you have declared `#[inline(always)]` on `test_attr_lint`. This is usually a b
7 //~| NOTE: `-D clippy::inline-always` implied by `-D warnings`
13 fn false_positive_expr() {
18 fn false_positive_stmt() {
23 fn empty_and_false_positive_stmt() {
27 #[deprecated(since = "forever")]
28 //~^ ERROR: the since field must contain a semver-compliant version
29 //~| NOTE: `-D clippy::deprecated-semver` implied by `-D warnings`
30 pub const SOME_CONST
: u8 = 42;
32 #[deprecated(since = "1")]
33 //~^ ERROR: the since field must contain a semver-compliant version
34 pub const ANOTHER_CONST
: u8 = 23;
36 #[deprecated(since = "0.1.1")]
37 pub const YET_ANOTHER_CONST
: u8 = 0;
48 empty_and_false_positive_stmt()