You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #122258 - RalfJung:required-fns, r=<try>
Draft: monomorphize things from dead code, too
This is another attempt at fixing #107503. The previous attempt at #112879 seems stuck in figuring out where the perf regression comes from. So here I want to take baby steps to see the impact of each step.
r? `@ghost`
error[E0080]: evaluation of `Fail::<i32>::C` failed
2
+
--> $DIR/dead-code-in-called-fn.rs:9:19
3
+
|
4
+
LL | const C: () = panic!();
5
+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/dead-code-in-called-fn.rs:9:19
6
+
|
7
+
= 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)
8
+
9
+
note: the above error was encountered while instantiating `fn called::<i32>`
10
+
11
+
error: aborting due to 1 previous error
12
+
13
+
For more information about this error, try `rustc --explain E0080`.
error[E0080]: evaluation of `Fail::<i32>::C` failed
2
+
--> $DIR/dead-code-in-called-fn.rs:9:19
3
+
|
4
+
LL | const C: () = panic!();
5
+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/dead-code-in-called-fn.rs:9:19
6
+
|
7
+
= 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)
8
+
9
+
note: the above error was encountered while instantiating `fn called::<i32>`
10
+
11
+
error: aborting due to 1 previous error
12
+
13
+
For more information about this error, try `rustc --explain E0080`.
error[E0080]: evaluation of `Fail::<i32>::C` failed
2
+
--> $DIR/dead-code-in-const-called-fn.rs:8:19
3
+
|
4
+
LL | const C: () = panic!();
5
+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/dead-code-in-const-called-fn.rs:8:19
6
+
|
7
+
= 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)
8
+
9
+
note: erroneous constant encountered
10
+
--> $DIR/dead-code-in-const-called-fn.rs:16:9
11
+
|
12
+
LL | Fail::<T>::C;
13
+
| ^^^^^^^^^^^^
14
+
15
+
error: aborting due to 1 previous error
16
+
17
+
For more information about this error, try `rustc --explain E0080`.
error[E0080]: evaluation of `Fail::<i32>::C` failed
2
+
--> $DIR/dead-code-in-const-called-fn.rs:8:19
3
+
|
4
+
LL | const C: () = panic!();
5
+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/dead-code-in-const-called-fn.rs:8:19
6
+
|
7
+
= 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)
8
+
9
+
note: erroneous constant encountered
10
+
--> $DIR/dead-code-in-const-called-fn.rs:16:9
11
+
|
12
+
LL | Fail::<T>::C;
13
+
| ^^^^^^^^^^^^
14
+
15
+
error: aborting due to 1 previous error
16
+
17
+
For more information about this error, try `rustc --explain E0080`.
error[E0080]: evaluation of `Fail::<i32>::C` failed
2
+
--> $DIR/dead-code-in-dead-fn.rs:9:19
3
+
|
4
+
LL | const C: () = panic!();
5
+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/dead-code-in-dead-fn.rs:9:19
6
+
|
7
+
= 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)
8
+
9
+
note: the above error was encountered while instantiating `fn not_called::<i32>`
10
+
11
+
error: aborting due to 1 previous error
12
+
13
+
For more information about this error, try `rustc --explain E0080`.
error[E0080]: evaluation of `Fail::<i32>::C` failed
2
+
--> $DIR/dead-code-in-dead-fn.rs:9:19
3
+
|
4
+
LL | const C: () = panic!();
5
+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/dead-code-in-dead-fn.rs:9:19
6
+
|
7
+
= 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)
8
+
9
+
note: the above error was encountered while instantiating `fn not_called::<i32>`
10
+
11
+
error: aborting due to 1 previous error
12
+
13
+
For more information about this error, try `rustc --explain E0080`.
0 commit comments