-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
internal compiler error: opaque type with non-universal region substs #109059
Comments
@rustbot label +S-bug-has-mcve |
Similar error shows when compiling the following code: #![feature(return_position_impl_trait_in_trait)]
#![feature(adt_const_params)]
pub trait Bar<const BAR:&'static str>{}
impl Bar<"asdf"> for () {}
pub trait Foo<const FOO:&'static str>{
fn foo()->impl Bar<"asdf">{
()
}
} Output:
|
searched toolchains nightly-2022-03-24 through nightly-2023-03-31 Regression in nightly-2022-03-31 |
Triage: Fixed on the latest nightly (cc @zirconium-n as they have a PR fixing this issue), @rustbot labels: +E-needs-test |
This issue is not totally fixed: #![feature(adt_const_params)]
trait Bar<const FOO: &'static str> {}
impl Bar<"asdf"> for () {}
fn foo<const FOO: &'static str>() -> impl Bar<"asdf"> {
()
}
fn main() {} It has to do with generalizing the types in consts. The const param |
…2, r=<try> rework opaque type region inference fixes rust-lang#113971 Pass -> Error fixes rust-lang#111906 ICE -> Pass fixes rust-lang#110623 == fixes rust-lang#109059 == fixes rust-lang#112841 Pass -> Error fixes rust-lang#110726 ICE->Error r? `@ghost`
…2, r=<try> rework opaque type region inference fixes rust-lang#113971 Pass -> Error fixes rust-lang#111906 ICE -> Pass fixes rust-lang#110623 == fixes rust-lang#109059 == fixes rust-lang#112841 Pass -> Error fixes rust-lang#110726 ICE->Error r? `@ghost`
…2, r=<try> rework opaque type region inference fixes rust-lang#113971 Pass -> Error fixes rust-lang#111906 ICE -> Pass fixes rust-lang#110623 == fixes rust-lang#109059 == fixes rust-lang#112841 Pass -> Error fixes rust-lang#110726 ICE->Error fixes rust-lang#111935 Pass -> Error fixes rust-lang#113916 == r? `@ghost`
Code
Crashes for static references in general.
Meta
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: