]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/use-placement-typeck.fixed
Override rustc version in ui and mir-opt tests to get stable hashes
[rust.git] / src / test / ui / suggestions / use-placement-typeck.fixed
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 use m::Foo;
10
11 fn main() {
12     let s = m::S;
13     s.abc(); //~ ERROR no method named `abc`
14 }
15
16 mod m {
17     pub trait Foo {
18         fn abc(&self) {}
19     }
20     pub struct S;
21     impl Foo for S{}
22 }