Skip to content

Commit 4d200f6

Browse files
committed
un-add some notes from tests
1 parent dcbedf7 commit 4d200f6

File tree

3 files changed

+12
-23
lines changed

3 files changed

+12
-23
lines changed

src/test/compile-fail/attr-usage-inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
fn f() {}
1515

1616
#[inline] //~ ERROR: attribute should be applied to function
17-
struct S; //~ not a function
17+
struct S;
1818

1919
fn main() {}

src/test/compile-fail/attr-usage-repr.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#![feature(repr_simd)]
1414

1515
#[repr(C)] //~ ERROR: attribute should be applied to struct, enum or union
16-
fn f() {} //~ not a struct, enum or union
16+
fn f() {}
1717

1818
#[repr(C)]
1919
struct SExtern(f64, f64);
@@ -25,19 +25,19 @@ struct SPacked(f64, f64);
2525
struct SSimd(f64, f64);
2626

2727
#[repr(i8)] //~ ERROR: attribute should be applied to enum
28-
struct SInt(f64, f64); //~ not an enum
28+
struct SInt(f64, f64);
2929

3030
#[repr(C)]
3131
enum EExtern { A, B }
3232

3333
#[repr(align(8))] //~ ERROR: attribute should be applied to struct
34-
enum EAlign { A, B } // not a struct
34+
enum EAlign { A, B }
3535

3636
#[repr(packed)] //~ ERROR: attribute should be applied to struct
37-
enum EPacked { A, B } // not a struct
37+
enum EPacked { A, B }
3838

3939
#[repr(simd)] //~ ERROR: attribute should be applied to struct
40-
enum ESimd { A, B } // not a struct
40+
enum ESimd { A, B }
4141

4242
#[repr(i8)]
4343
enum EInt { A, B }

src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,17 @@
2121
#[inline = "2100"]
2222
//~^ ERROR attribute should be applied to function
2323
mod inline {
24-
//~^ not a function
25-
mod inner {
26-
//~^ not a function
27-
#![inline="2100"]
28-
//~^ ERROR attribute should be applied to function
29-
}
24+
mod inner { #![inline="2100"] }
25+
//~^ ERROR attribute should be applied to function
3026

31-
#[inline = "2100"]
32-
fn f() { }
27+
#[inline = "2100"] fn f() { }
3328

34-
#[inline = "2100"]
29+
#[inline = "2100"] struct S;
3530
//~^ ERROR attribute should be applied to function
36-
struct S;
37-
//~^ not a function
3831

39-
#[inline = "2100"]
32+
#[inline = "2100"] type T = S;
4033
//~^ ERROR attribute should be applied to function
41-
type T = S;
42-
//~^ not a function
4334

44-
#[inline = "2100"]
35+
#[inline = "2100"] impl S { }
4536
//~^ ERROR attribute should be applied to function
46-
impl S { }
47-
//~^ not a function
4837
}

0 commit comments

Comments
 (0)