Skip to content

Commit 9e301d1

Browse files
committed
track_caller tests account for incomplete feature warning.
1 parent 8ac9104 commit 9e301d1

12 files changed

+54
-7
lines changed

src/test/ui/rfc-2091-track-caller/error-odd-syntax.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(track_caller)]
1+
#![feature(track_caller)] //~ WARN the feature `track_caller` is incomplete
22

33
#[track_caller(1)]
44
fn f() {}

src/test/ui/rfc-2091-track-caller/error-odd-syntax.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@ error: malformed `track_caller` attribute input
44
LL | #[track_caller(1)]
55
| ^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[track_caller]`
66

7+
warning: the feature `track_caller` is incomplete and may cause the compiler to crash
8+
--> $DIR/error-odd-syntax.rs:1:12
9+
|
10+
LL | #![feature(track_caller)]
11+
| ^^^^^^^^^^^^
12+
|
13+
= note: `#[warn(incomplete_features)]` on by default
14+
715
error: aborting due to previous error
816

src/test/ui/rfc-2091-track-caller/error-with-invalid-abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(track_caller)]
1+
#![feature(track_caller)] //~ WARN the feature `track_caller` is incomplete
22

33
#[track_caller]
44
extern "C" fn f() {}

src/test/ui/rfc-2091-track-caller/error-with-invalid-abi.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
warning: the feature `track_caller` is incomplete and may cause the compiler to crash
2+
--> $DIR/error-with-invalid-abi.rs:1:12
3+
|
4+
LL | #![feature(track_caller)]
5+
| ^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
19
error[E0737]: rust ABI is required to use `#[track_caller]`
210
--> $DIR/error-with-invalid-abi.rs:3:1
311
|

src/test/ui/rfc-2091-track-caller/error-with-naked.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(naked_functions, track_caller)]
1+
#![feature(naked_functions, track_caller)] //~ WARN the feature `track_caller` is incomplete
22

33
#[track_caller]
44
#[naked]

src/test/ui/rfc-2091-track-caller/error-with-naked.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
warning: the feature `track_caller` is incomplete and may cause the compiler to crash
2+
--> $DIR/error-with-naked.rs:1:29
3+
|
4+
LL | #![feature(naked_functions, track_caller)]
5+
| ^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
19
error[E0736]: cannot use `#[track_caller]` with `#[naked]`
210
--> $DIR/error-with-naked.rs:3:1
311
|

src/test/ui/rfc-2091-track-caller/error-with-trait-fns.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(track_caller)]
1+
#![feature(track_caller)] //~ WARN the feature `track_caller` is incomplete
22

33
trait Trait {
44
#[track_caller]

src/test/ui/rfc-2091-track-caller/error-with-trait-fns.stderr

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
warning: the feature `track_caller` is incomplete and may cause the compiler to crash
2+
--> $DIR/error-with-trait-fns.rs:1:12
3+
|
4+
LL | #![feature(track_caller)]
5+
| ^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
19
error[E0738]: `#[track_caller]` is not supported for trait items yet.
210
--> $DIR/error-with-trait-fns.rs:4:5
311
|

src/test/ui/rfc-2091-track-caller/only-for-fns.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![feature(track_caller)]
1+
#![feature(track_caller)] //~ WARN the feature `track_caller` is incomplete
22

33
#[track_caller]
44
struct S;

src/test/ui/rfc-2091-track-caller/only-for-fns.stderr

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
warning: the feature `track_caller` is incomplete and may cause the compiler to crash
2+
--> $DIR/only-for-fns.rs:1:12
3+
|
4+
LL | #![feature(track_caller)]
5+
| ^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+
19
error[E0735]: attribute should be applied to function
210
--> $DIR/only-for-fns.rs:3:1
311
|
@@ -8,4 +16,3 @@ LL | struct S;
816

917
error: aborting due to previous error
1018

11-
For more information about this error, try `rustc --explain E0735`.

src/test/ui/rfc-2091-track-caller/pass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// run-pass
2-
#![feature(track_caller)]
2+
#![feature(track_caller)] //~ WARN the feature `track_caller` is incomplete
33

44
#[track_caller]
55
fn f() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
warning: the feature `track_caller` is incomplete and may cause the compiler to crash
2+
--> $DIR/pass.rs:2:12
3+
|
4+
LL | #![feature(track_caller)]
5+
| ^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+

0 commit comments

Comments
 (0)