Skip to content

Commit 6306c17

Browse files
committed
fix comments in required-consts tests
1 parent e4a3c89 commit 6306c17

12 files changed

+29
-34
lines changed

tests/ui/consts/required-consts/collect-in-dead-drop.noopt.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-drop.rs:9:19
2+
--> $DIR/collect-in-dead-drop.rs:8:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:8:19
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
note: erroneous constant encountered
10-
--> $DIR/collect-in-dead-drop.rs:16:17
10+
--> $DIR/collect-in-dead-drop.rs:15:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^

tests/ui/consts/required-consts/collect-in-dead-drop.opt.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-drop.rs:9:19
2+
--> $DIR/collect-in-dead-drop.rs:8:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:8:19
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
note: erroneous constant encountered
10-
--> $DIR/collect-in-dead-drop.rs:16:17
10+
--> $DIR/collect-in-dead-drop.rs:15:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^

tests/ui/consts/required-consts/collect-in-dead-drop.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//@revisions: noopt opt
22
//@ build-fail
33
//@[opt] compile-flags: -O
4-
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
5-
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
4+
//! This fails without optimizations, so it should also fail with optimizations.
65
76
struct Fail<T>(T);
87
impl<T> Fail<T> {

tests/ui/consts/required-consts/collect-in-dead-fn.noopt.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-fn.rs:9:19
2+
--> $DIR/collect-in-dead-fn.rs:8:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:8:19
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
note: erroneous constant encountered
10-
--> $DIR/collect-in-dead-fn.rs:19:17
10+
--> $DIR/collect-in-dead-fn.rs:18:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^
1414

1515
note: the above error was encountered while instantiating `fn not_called::<i32>`
16-
--> $DIR/collect-in-dead-fn.rs:26:9
16+
--> $DIR/collect-in-dead-fn.rs:25:9
1717
|
1818
LL | not_called::<T>();
1919
| ^^^^^^^^^^^^^^^^^

tests/ui/consts/required-consts/collect-in-dead-fn.opt.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-fn.rs:9:19
2+
--> $DIR/collect-in-dead-fn.rs:8:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn.rs:8:19
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
note: erroneous constant encountered
10-
--> $DIR/collect-in-dead-fn.rs:19:17
10+
--> $DIR/collect-in-dead-fn.rs:18:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^
1414

1515
note: the above error was encountered while instantiating `fn not_called::<i32>`
16-
--> $DIR/collect-in-dead-fn.rs:26:9
16+
--> $DIR/collect-in-dead-fn.rs:25:9
1717
|
1818
LL | not_called::<T>();
1919
| ^^^^^^^^^^^^^^^

tests/ui/consts/required-consts/collect-in-dead-fn.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//@revisions: noopt opt
22
//@ build-fail
33
//@[opt] compile-flags: -O
4-
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
5-
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
4+
//! This fails without optimizations, so it should also fail with optimizations.
65
76
struct Fail<T>(T);
87
impl<T> Fail<T> {

tests/ui/consts/required-consts/collect-in-dead-forget.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//@revisions: noopt opt
22
//@build-pass
33
//@[opt] compile-flags: -O
4-
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
5-
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
4+
//! This passes without optimizations, so it can (and should) also pass with optimizations.
65
76
struct Fail<T>(T);
87
impl<T> Fail<T> {

tests/ui/consts/required-consts/collect-in-dead-move.noopt.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-move.rs:9:19
2+
--> $DIR/collect-in-dead-move.rs:8:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:8:19
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
note: erroneous constant encountered
10-
--> $DIR/collect-in-dead-move.rs:16:17
10+
--> $DIR/collect-in-dead-move.rs:15:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^

tests/ui/consts/required-consts/collect-in-dead-move.opt.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-move.rs:9:19
2+
--> $DIR/collect-in-dead-move.rs:8:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-move.rs:8:19
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
note: erroneous constant encountered
10-
--> $DIR/collect-in-dead-move.rs:16:17
10+
--> $DIR/collect-in-dead-move.rs:15:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^

tests/ui/consts/required-consts/collect-in-dead-move.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//@revisions: noopt opt
22
//@ build-fail
33
//@[opt] compile-flags: -O
4-
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
5-
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
4+
//! This fails without optimizations, so it should also fail with optimizations.
65
76
struct Fail<T>(T);
87
impl<T> Fail<T> {

tests/ui/consts/required-consts/collect-in-dead-vtable.noopt.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
error[E0080]: evaluation of `Fail::<i32>::C` failed
2-
--> $DIR/collect-in-dead-vtable.rs:12:19
2+
--> $DIR/collect-in-dead-vtable.rs:11:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-vtable.rs:12:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-vtable.rs:11:19
66
|
77
= note: this error originates in the macro `$crate::panic::panic_2015` which comes from the expansion of the macro `panic` (in Nightly builds, run with -Z macro-backtrace for more info)
88

99
note: erroneous constant encountered
10-
--> $DIR/collect-in-dead-vtable.rs:26:21
10+
--> $DIR/collect-in-dead-vtable.rs:25:21
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^
1414

1515
note: the above error was encountered while instantiating `fn <std::vec::Vec<i32> as MyTrait>::not_called`
16-
--> $DIR/collect-in-dead-vtable.rs:35:40
16+
--> $DIR/collect-in-dead-vtable.rs:34:40
1717
|
1818
LL | let gen_vtable: &dyn MyTrait = &v; // vtable "appears" here
1919
| ^^

tests/ui/consts/required-consts/collect-in-dead-vtable.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
//FIXME: `opt` revision currently does not stop with an error due to
55
//<https://github.com/rust-lang/rust/issues/107503>.
66
//@[opt] build-pass
7-
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
8-
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)
7+
//! This fails without optimizations, so it should also fail with optimizations.
98
109
struct Fail<T>(T);
1110
impl<T> Fail<T> {

0 commit comments

Comments
 (0)