]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/use-placement-typeck.rs
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / use-placement-typeck.rs
1 // compile-flags: --test
2 // run-rustfix
3 // Checks that the `use` suggestion appears *below* this inner attribute.
4 // There was an issue where the test synthetic #[allow(dead)] attribute on
5 // main which has a dummy span caused the suggestion to be placed at the top
6 // of the file.
7 #![allow(unused)]
8
9 fn main() {
10     let s = m::S;
11     s.abc(); //~ ERROR no method named `abc`
12 }
13
14 mod m {
15     pub trait Foo {
16         fn abc(&self) {}
17     }
18     pub struct S;
19     impl Foo for S{}
20 }