-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
borrowck: no entry found for key #99665
Comments
pub trait MyComponent {
type Properties;
}
impl<M> MyComponent for M
where
M: 'static,
{
type Properties = ();
}
fn main() {
|_: <&u8 as MyComponent>::Properties| {};
} |
searched nightlies: from nightly-2022-04-01 to nightly-2022-07-24 bisected with cargo-bisect-rustc v0.6.1Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --start 2022-04-01 --end 2022-07-24 --preserve --regress ice -- build |
pub trait MyComponent {
type Properties;
}
impl<M> MyComponent for M
where
M: 'static,
{
type Properties = TableProps<M>;
}
pub struct TableProps<M>
where
M: 'static,
{
pub entries: M,
}
fn main() {
|_: <&u32 as MyComponent>::Properties| {};
} Hmm... try this? This does seem to ICE on stable. |
This is probably it even though this panics at |
@rustbot claim |
…stebank don't ICE when normalizing closure input tys We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx. `normalize_and_add_constraints` doesn't update `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to better track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes. Fixes rust-lang#99665
…stebank don't ICE when normalizing closure input tys We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx. `normalize_and_add_constraints` doesn't update `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to better track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes. Fixes rust-lang#99665
…stebank don't ICE when normalizing closure input tys We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx. `normalize_and_add_constraints` doesn't update `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to better track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes. Fixes rust-lang#99665
Triage: #101708 fixed the issue and it has a regression test that seems to cover this case, closing as fixed. |
…ackh726 don't ICE when normalizing closure input tys We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx. `normalize_and_add_constraints` doesn't update `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to better track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes. Fixes rust-lang#102800 ~Fixess rust-lang#99665~ (UPDATE: no longer true; the issue has a different failure path than when this PR was created and should be fixed by rust-lang#101708, but the changes in this PR are still correct and should prevent potential future ICEs)
…ackh726 don't ICE when normalizing closure input tys We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx. `normalize_and_add_constraints` doesn't update `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to better track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes. Fixes rust-lang#102800 ~Fixess rust-lang#99665~ (UPDATE: no longer true; the issue has a different failure path than when this PR was created and should be fixed by rust-lang#101708, but the changes in this PR are still correct and should prevent potential future ICEs)
…ackh726 don't ICE when normalizing closure input tys We were ICEing while rendering diagnostics because `universe_causes` is expected to track every universe created in the typeck's infcx. `normalize_and_add_constraints` doesn't update `universe_causes` when creating new universes, causing an ICE. Remove it! Add spans to better track normalization constraints. Fix couple places where `universe_causes` is not updated correctly to track newly added universes. Fixes rust-lang#102800 ~Fixess rust-lang#99665~ (UPDATE: no longer true; the issue has a different failure path than when this PR was created and should be fixed by rust-lang#101708, but the changes in this PR are still correct and should prevent potential future ICEs)
See code at
https://github.com/windowsboy111/rustc-bug-reproduce#99665 (comment).Meta
rustc --version --verbose
:Error output
Backtrace
(edit starts here)
To people who are reading:
This Github issue contains 2 ICE issues
The original code I minimised causes an ICE on stable, beta and nightly
But the further-minimised code only causes ICEs on beta and nightly, and therefore is a separate issue
The text was updated successfully, but these errors were encountered: