Skip to content

Conversation

compiler-errors
Copy link
Member

Fixes #93008
This is kinda a hack... but it's the fix I thought had the least blast-radius.

We use normalize_param_env_or_error to verify that the predicates in the param env are self-consistent, since with RevealAll, a bad predicate like <&'static () as Clone> will be evaluated with an empty ParamEnv (since it references no generics), and we'll raise an error for it.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 18, 2022
@rust-highfive
Copy link
Contributor

r? @estebank

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 18, 2022
@estebank
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Feb 17, 2022

📌 Commit b651d5a has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 17, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 17, 2022
…ds, r=estebank

Do not ICE when inlining a function with un-satisfiable bounds

Fixes rust-lang#93008
This is kinda a hack... but it's the fix I thought had the least blast-radius.

We use `normalize_param_env_or_error` to verify that the predicates in the param env are self-consistent, since with RevealAll, a bad predicate like `<&'static () as Clone>` will be evaluated with an empty ParamEnv (since it references no generics), and we'll raise an error for it.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 18, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#92683 (Suggest copying trait associated type bounds on lifetime error)
 - rust-lang#92933 (Deny mixing bin crate type with lib crate types)
 - rust-lang#92959 (Add more info and suggestions to use of #[test] on invalid items)
 - rust-lang#93024 (Do not ICE when inlining a function with un-satisfiable bounds)
 - rust-lang#93613 (Move `{core,std}::stream::Stream` to `{core,std}::async_iter::AsyncIterator`)
 - rust-lang#93634 (compiler: clippy::complexity fixes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cf3cd4c into rust-lang:master Feb 18, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 18, 2022
@compiler-errors compiler-errors deleted the inline-mir-bad-bounds branch April 7, 2022 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE with "--crate-type lib --Z mir-opt-level-3": Unimplemented selecting Binder(<&str as Foo>, []) during codegen
5 participants