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 rust-lang#136429 - fmease:gci-fix-def-site-checks, r=<try>
GCI: At their def site, actually wfcheck the where-clause & always eval free lifetime-generic constants
1st commit: Partially addresses rust-lang#136204 by turning const eval errors from post to pre-mono for free lifetime-generic constants.
Re. 2nd commit: Oof, yeah, I missed that in the initial impl!
This doesn't fully address rust-lang#136204 because I still haven't figured out how & where to properly & best suppress const eval of free constants whose predicates don't hold at the def site. The motivating example is `#![feature(trivial_bounds)] const _UNUSED: () = () where String: Copy;` which can also be found over at the tracking issue rust-lang#113521.
r? compiler-errors or reassign
Copy file name to clipboardExpand all lines: tests/ui/generic-const-items/def-site-eval.fail.stderr
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
error[E0080]: evaluation of `_::<'_>` failed
2
-
--> $DIR/def-site-eval.rs:14:20
2
+
--> $DIR/def-site-eval.rs:13:20
3
3
|
4
4
LL | const _<'_a>: () = panic!();
5
-
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/def-site-eval.rs:14:20
5
+
| ^^^^^^^^ the evaluated program panicked at 'explicit panic', $DIR/def-site-eval.rs:13:20
6
6
|
7
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)
0 commit comments