2023-04-13 06:38:52 -05:00
|
|
|
#![feature(inherent_associated_types)]
|
|
|
|
#![allow(incomplete_features)]
|
2023-04-12 15:48:50 -05:00
|
|
|
#![deny(unused)]
|
|
|
|
|
|
|
|
struct Foo;
|
|
|
|
|
|
|
|
impl Foo {
|
|
|
|
fn one() {}
|
2023-04-13 06:38:52 -05:00
|
|
|
//~^ ERROR associated items `one`, `two`, `CONSTANT`, `Type`, and `three` are never used [dead_code]
|
2023-04-12 15:48:50 -05:00
|
|
|
|
|
|
|
fn two(&self) {}
|
|
|
|
|
2023-04-13 06:38:52 -05:00
|
|
|
// seperation between items
|
2023-04-12 15:48:50 -05:00
|
|
|
// ...
|
|
|
|
// ...
|
|
|
|
|
|
|
|
fn used() {}
|
|
|
|
|
2023-04-13 06:38:52 -05:00
|
|
|
const CONSTANT: usize = 5;
|
|
|
|
|
|
|
|
// more seperation
|
|
|
|
// ...
|
|
|
|
// ...
|
|
|
|
|
|
|
|
type Type = usize;
|
|
|
|
|
2023-04-12 15:48:50 -05:00
|
|
|
fn three(&self) {
|
|
|
|
Foo::one();
|
|
|
|
// ...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
Foo::used();
|
|
|
|
}
|