Skip to content

Commit 682991d

Browse files
committed
explicitly set opt-level=0
1 parent 0d6a16a commit 682991d

File tree

43 files changed

+109
-94
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+109
-94
lines changed

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

Lines changed: 4 additions & 4 deletions
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-called-fn.rs:9:19
2+
--> $DIR/collect-in-called-fn.rs:10:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-called-fn.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-called-fn.rs:10: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-called-fn.rs:18:17
10+
--> $DIR/collect-in-called-fn.rs:19:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^
1414

1515
note: the above error was encountered while instantiating `fn called::<i32>`
16-
--> $DIR/collect-in-called-fn.rs:23:5
16+
--> $DIR/collect-in-called-fn.rs:24:5
1717
|
1818
LL | called::<i32>();
1919
| ^^^^^^^^^^^^^^^

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

Lines changed: 4 additions & 4 deletions
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-called-fn.rs:9:19
2+
--> $DIR/collect-in-called-fn.rs:10:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-called-fn.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-called-fn.rs:10: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-called-fn.rs:18:17
10+
--> $DIR/collect-in-called-fn.rs:19:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^
1414

1515
note: the above error was encountered while instantiating `fn called::<i32>`
16-
--> $DIR/collect-in-called-fn.rs:23:5
16+
--> $DIR/collect-in-called-fn.rs:24:5
1717
|
1818
LL | called::<i32>();
1919
| ^^^^^^^^^^^^^^^

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@revisions: noopt opt
22
//@ build-fail
3+
//@[noopt] compile-flags: -Copt-level=0
34
//@[opt] compile-flags: -O
45
//! Make sure we detect erroneous constants post-monomorphization even when they are unused. This is
56
//! crucial, people rely on it for soundness. (https://github.com/rust-lang/rust/issues/112090)

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

Lines changed: 4 additions & 4 deletions
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-closure.rs:8:19
2+
--> $DIR/collect-in-dead-closure.rs:9:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-closure.rs:8:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-closure.rs:9: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-closure.rs:16:17
10+
--> $DIR/collect-in-dead-closure.rs:17: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-closure.rs:23:33
16+
--> $DIR/collect-in-dead-closure.rs:24:33
1717
|
1818
LL | let _closure: fn() = || not_called::<T>();
1919
| ^^^^^^^^^^^^^^^^^

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

Lines changed: 4 additions & 4 deletions
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-closure.rs:8:19
2+
--> $DIR/collect-in-dead-closure.rs:9:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-closure.rs:8:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-closure.rs:9: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-closure.rs:16:17
10+
--> $DIR/collect-in-dead-closure.rs:17: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-closure.rs:23:33
16+
--> $DIR/collect-in-dead-closure.rs:24:33
1717
|
1818
LL | let _closure: fn() = || not_called::<T>();
1919
| ^^^^^^^^^^^^^^^^^

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@revisions: noopt opt
22
//@ build-fail
3+
//@[noopt] compile-flags: -Copt-level=0
34
//@[opt] compile-flags: -O
45
//! This fails without optimizations, so it should also fail with optimizations.
56

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

Lines changed: 3 additions & 3 deletions
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:8:19
2+
--> $DIR/collect-in-dead-drop.rs:9:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:8:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:9: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:15:17
10+
--> $DIR/collect-in-dead-drop.rs:16:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^

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

Lines changed: 3 additions & 3 deletions
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:8:19
2+
--> $DIR/collect-in-dead-drop.rs:9:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:8:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-drop.rs:9: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:15:17
10+
--> $DIR/collect-in-dead-drop.rs:16:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@revisions: noopt opt
22
//@ build-fail
3+
//@[noopt] compile-flags: -Copt-level=0
34
//@[opt] compile-flags: -O
45
//! This fails without optimizations, so it should also fail with optimizations.
56

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

Lines changed: 3 additions & 3 deletions
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-fn-behind-assoc-type.rs:9:19
2+
--> $DIR/collect-in-dead-fn-behind-assoc-type.rs:10:19
33
|
44
LL | const C: () = panic!();
5-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn-behind-assoc-type.rs:9:19
5+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/collect-in-dead-fn-behind-assoc-type.rs:10: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-behind-assoc-type.rs:14:17
10+
--> $DIR/collect-in-dead-fn-behind-assoc-type.rs:15:17
1111
|
1212
LL | let _ = Fail::<T>::C;
1313
| ^^^^^^^^^^^^

0 commit comments

Comments
 (0)