do not ICE on bound variables, return TooGeneric instead#76581
do not ICE on bound variables, return TooGeneric instead#76581bors merged 3 commits intorust-lang:masterfrom
TooGeneric instead#76581Conversation
|
I am actually not even sure if this PR is correct, as So the bug is probably somewhere else 🤔 |
|
So if we call a function which has a generic constant either in its predicates or its signatures, we have an unevaluated constant which depends on inference variables... We replace these inference variables with I think dealing with this by emitting |
548d468 to
ae85bbb
Compare
ConstKind::BoundTooGeneric instead
TooGeneric insteadTooGeneric instead
|
|
||
| ty::Param(_) | ty::Error(_) => { | ||
| ty::Bound(..) | ty::Param(_) | ty::Error(_) => { | ||
| return Err(LayoutError::Unknown(ty)); |
There was a problem hiding this comment.
I think this is something I suggested in the past so it's probably fine.
|
@bors r+ cc @nikomatsakis |
|
📌 Commit ae85bbb has been approved by |
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
ae85bbb to
6734230
Compare
62378b7 to
65b3419
Compare
|
@bors r=eddyb |
|
📌 Commit 65b3419 has been approved by |
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
do not ICE on bound variables, return `TooGeneric` instead fixes rust-lang#73260, fixes rust-lang#74634, fixes rust-lang#76595 r? @nikomatsakis
…atic-morse Rollup of 13 pull requests Successful merges: - rust-lang#72734 (Reduce duplicate in liballoc reserve error handling) - rust-lang#76131 (Don't use `zip` to compare iterators during pretty-print hack) - rust-lang#76150 (Don't recommend ManuallyDrop to customize drop order) - rust-lang#76275 (Implementation of Write for some immutable ref structs) - rust-lang#76489 (Add explanation for E0756) - rust-lang#76581 (do not ICE on bound variables, return `TooGeneric` instead) - rust-lang#76655 (Make some methods of `Pin` unstable const) - rust-lang#76783 (Only get ImplKind::Impl once) - rust-lang#76807 (Use const-checking to forbid use of unstable features in const-stable functions) - rust-lang#76888 (use if let instead of single match arm expressions) - rust-lang#76914 (extend `Ty` and `TyCtxt` lints to self types) - rust-lang#77022 (Reduce boilerplate for BytePos and CharPos) - rust-lang#77032 (lint missing docs for extern items) Failed merges: r? `@ghost`
fixes #73260, fixes #74634, fixes #76595
r? @nikomatsakis