Skip to content

Commit 8e13e43

Browse files
committed
tidy check fix
1 parent 2b7c3fb commit 8e13e43

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1+
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
111
// #[test] attribute is not allowed on associated functions or methods
2-
// reworded error message
12+
// reworded error message
313
// compile-flags:--test
414

515
struct A {}
616

717
impl A {
8-
#[test]
9-
fn new() -> A { //~ ERROR #[test] attribute is only allowed on non associated functions
10-
A {}
11-
}
18+
#[test]
19+
fn new() -> A { //~ ERROR #[test] attribute is only allowed on non associated functions
20+
A {}
21+
}
1222
}
1323

1424
#[test]
1525
fn test() {
16-
let _ = A::new();
26+
let _ = A::new();
1727
}
1828

19-
fn main() {}
29+
fn main() {}

src/test/ui/test-attr-non-associated-functions.stderr

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
error: #[test] attribute is only allowed on non associated functions
2-
--> $DIR/test-attr-non-associated-functions.rs:9:2
2+
--> $DIR/test-attr-non-associated-functions.rs:19:5
33
|
4-
LL | fn new() -> A { //~ ERROR #[test] attribute is only allowed on non associated functions
5-
| _____^
4+
LL | / fn new() -> A { //~ ERROR #[test] attribute is only allowed on non associated functions
65
LL | | A {}
76
LL | | }
87
| |_____^

0 commit comments

Comments
 (0)