|
|
|
@ -20,7 +20,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:9:36
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:7:36
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -35,11 +35,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
|
|
|
|
|
| ^ expected expression
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:10:38
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:13:38
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:11:38
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -48,13 +44,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: expected expression, found `)`
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:13:46
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:11:46
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
|
|
|
|
|
| ^ expected expression
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:16:36
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:14:36
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -63,7 +59,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:18:33
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:16:33
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -72,7 +68,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:20:33
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:18:33
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -81,17 +77,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#`
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:22:34
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:20:34
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = x #![attr] as Y; }
|
|
|
|
|
| ^ expected one of 8 possible tokens
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:21:35
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:24:35
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:22:35
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -100,11 +92,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:23:40
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:26:40
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:24:40
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -113,11 +101,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:25:35
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:28:35
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:26:35
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -126,11 +110,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:27:40
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:30:40
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:28:40
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -139,31 +119,19 @@ LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: expected expression, found `..`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:29:40
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:32:40
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:30:40
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..#[attr] 0; }
|
|
|
|
|
| ^^ expected expression
|
|
|
|
|
|
|
|
|
|
error: expected expression, found `..`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:31:40
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:34:40
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:32:40
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..; }
|
|
|
|
|
| ^^ expected expression
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:33:41
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:36:41
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:34:41
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -172,11 +140,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:35:45
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:38:45
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:36:45
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -185,11 +149,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:37:37
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:40:37
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:38:37
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
|
|
|
|
|
| -- ^^^^^^^ -- the attributes are attached to this branch
|
|
|
|
@ -198,11 +158,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
|
|
|
|
|
| the branch belongs to this `if`
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:39:38
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:42:38
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:40:38
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -211,21 +167,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:41:40
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:44:40
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:42:40
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; }
|
|
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:43:45
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:46:45
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:44:45
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
|
|
|
|
|
| ---- ^^^^^^^ -- the attributes are attached to this branch
|
|
|
|
@ -234,11 +182,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
|
|
|
|
|
| the branch belongs to this `else`
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:45:46
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:48:46
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:46:46
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -247,11 +191,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:47:45
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:50:45
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:48:45
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
|
|
|
|
|
| ---- ^^^^^^^ ------- the attributes are attached to this branch
|
|
|
|
@ -260,11 +200,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
|
|
|
|
|
| the branch belongs to this `else`
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:49:50
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:52:50
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:50:50
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
|
|
|
|
|
| -- ^^^^^^^ -- the attributes are attached to this branch
|
|
|
|
@ -273,11 +209,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
|
|
|
|
|
| the branch belongs to this `if`
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:51:51
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:54:51
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:52:51
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -286,11 +218,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:53:45
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:56:45
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:54:45
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
|
|
|
|
|
| -- ^^^^^^^ -- the attributes are attached to this branch
|
|
|
|
@ -299,11 +227,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
|
|
|
|
|
| the branch belongs to this `if`
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:55:46
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:58:46
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:56:46
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -312,21 +236,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:57:48
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:60:48
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:58:48
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; }
|
|
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:59:53
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:62:53
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:60:53
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
|
|
|
|
|
| ---- ^^^^^^^ -- the attributes are attached to this branch
|
|
|
|
@ -335,11 +251,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
|
|
|
|
|
| the branch belongs to this `else`
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:61:54
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:64:54
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:62:54
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -348,11 +260,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:63:53
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:66:53
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:64:53
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
|
|
|
|
|
| ---- ^^^^^^^ --------------- the attributes are attached to this branch
|
|
|
|
@ -361,11 +269,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}
|
|
|
|
|
| the branch belongs to this `else`
|
|
|
|
|
|
|
|
|
|
error: outer attributes are not allowed on `if` and `else` branches
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:65:66
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:68:66
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:66:66
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; }
|
|
|
|
|
| -- ^^^^^^^ -- the attributes are attached to this branch
|
|
|
|
@ -374,11 +278,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}
|
|
|
|
|
| the branch belongs to this `if`
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted in this context
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:67:67
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:70:67
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:68:67
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; }
|
|
|
|
|
| ^^^^^^^^
|
|
|
|
@ -387,11 +287,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted following an outer attribute
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:70:32
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:73:32
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:71:32
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
|
|
|
|
|
| ------- ^^^^^^^^ not permitted following an outer attribute
|
|
|
|
@ -402,11 +298,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted following an outer attribute
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:72:32
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:75:32
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:73:32
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
|
|
|
|
|
| ------- ^^^^^^^^ not permitted following an outer attribute
|
|
|
|
@ -417,11 +309,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
|
|
|
|
|
= note: outer attributes, like `#[test]`, annotate the item following them
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted following an outer attribute
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:74:32
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:77:32
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:75:32
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
|
|
|
|
|
| ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation
|
|
|
|
@ -437,11 +325,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!(); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted following an outer attribute
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:76:32
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:79:32
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:77:32
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
|
|
|
|
|
| ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation
|
|
|
|
@ -457,11 +341,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo![]; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error: an inner attribute is not permitted following an outer attribute
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:78:32
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:81:32
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:79:32
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
|
|
|
|
|
| ------- ^^^^^^^^ ------ the inner attribute doesn't annotate this item macro invocation
|
|
|
|
@ -477,11 +357,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!{}; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
error[E0586]: inclusive range with no end
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:84:35
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:87:35
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:85:35
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
|
|
|
|
|
| ^^^ help: use `..` instead
|
|
|
|
@ -489,21 +365,13 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
|
|
|
|
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
|
|
|
|
|
|
|
|
|
|
error: expected one of `=>`, `if`, or `|`, found `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:84:38
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:87:38
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:85:38
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
|
|
|
|
|
| ^ expected one of `=>`, `if`, or `|`
|
|
|
|
|
|
|
|
|
|
error[E0586]: inclusive range with no end
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:87:35
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:90:35
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:88:35
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
|
|
|
|
|
| ^^^ help: use `..` instead
|
|
|
|
@ -511,31 +379,19 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
|
|
|
|
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
|
|
|
|
|
|
|
|
|
|
error: expected one of `=>`, `if`, or `|`, found `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:87:38
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:90:38
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:88:38
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
|
|
|
|
|
| ^ expected one of `=>`, `if`, or `|`
|
|
|
|
|
|
|
|
|
|
error: unexpected token: `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:90:39
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:93:39
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:91:39
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } }
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error[E0586]: inclusive range with no end
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:92:35
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:95:35
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:93:35
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
|
|
|
|
|
| ^^^ help: use `..` instead
|
|
|
|
@ -543,79 +399,47 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
|
|
|
|
|
= note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
|
|
|
|
|
|
|
|
|
|
error: expected one of `=>`, `if`, or `|`, found `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:92:38
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:95:38
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:93:38
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
|
|
|
|
|
| ^ expected one of `=>`, `if`, or `|`
|
|
|
|
|
|
|
|
|
|
error: unexpected token: `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:96:34
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:99:34
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:97:34
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:96:34
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:99:34
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:97:34
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
|
|
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
|
|
|
|
|
|
|
|
|
error: unexpected token: `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:99:34
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:102:34
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:100:34
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
|
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
|
error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:99:34
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:102:34
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:100:34
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
|
|
|
|
|
| ^ expected one of `.`, `;`, `?`, `else`, or an operator
|
|
|
|
|
|
|
|
|
|
error: expected statement after outer attribute
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:104:37
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:107:37
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:105:37
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } }
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
error: expected statement after outer attribute
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:106:37
|
|
|
|
|
=======
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:109:37
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
--> $DIR/attr-stmt-expr-attr-bad.rs:107:37
|
|
|
|
|
|
|
|
|
|
|
LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } }
|
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
error: aborting due to 52 previous errors
|
|
|
|
|
=======
|
|
|
|
|
error: aborting due to 54 previous errors
|
|
|
|
|
>>>>>>> 30182b1d322 (Rip it out)
|
|
|
|
|
error: aborting due to 53 previous errors
|
|
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0586`.
|
|
|
|
|