Skip to content

Commit

Permalink
un-add some notes from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ExpHP committed Nov 14, 2017
1 parent dcbedf7 commit 4d200f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/test/compile-fail/attr-usage-inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
fn f() {}

#[inline] //~ ERROR: attribute should be applied to function
struct S; //~ not a function
struct S;

fn main() {}
10 changes: 5 additions & 5 deletions src/test/compile-fail/attr-usage-repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#![feature(repr_simd)]

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

#[repr(C)]
struct SExtern(f64, f64);
Expand All @@ -25,19 +25,19 @@ struct SPacked(f64, f64);
struct SSimd(f64, f64);

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

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

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

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

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

#[repr(i8)]
enum EInt { A, B }
Expand Down
23 changes: 6 additions & 17 deletions src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,17 @@
#[inline = "2100"]
//~^ ERROR attribute should be applied to function
mod inline {
//~^ not a function
mod inner {
//~^ not a function
#![inline="2100"]
//~^ ERROR attribute should be applied to function
}
mod inner { #![inline="2100"] }
//~^ ERROR attribute should be applied to function

#[inline = "2100"]
fn f() { }
#[inline = "2100"] fn f() { }

#[inline = "2100"]
#[inline = "2100"] struct S;
//~^ ERROR attribute should be applied to function
struct S;
//~^ not a function

#[inline = "2100"]
#[inline = "2100"] type T = S;
//~^ ERROR attribute should be applied to function
type T = S;
//~^ not a function

#[inline = "2100"]
#[inline = "2100"] impl S { }
//~^ ERROR attribute should be applied to function
impl S { }
//~^ not a function
}

0 comments on commit 4d200f6

Please sign in to comment.