-
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
more generic const expr linker errors #84669
Comments
Bisected: searched nightlies: from nightly-2021-03-01 to nightly-2021-04-28 bisected with cargo-bisect-rustc v0.6.0Host triple: x86_64-unknown-linux-gnu cargo bisect-rustc --test-dir=. --start=2021-03-01 |
Assigning priority as discussed as part of the Prioritization Working Group procedure and removing @rustbot label -I-prioritize +P-medium +requires-nightly -regression-from-stable-to-nightly |
With #![feature(const_generics)]
#![allow(incomplete_features)]
trait Foo {
type Output;
fn foo() -> Self::Output;
}
impl Foo for [u8; 3] {
type Output = [u8; 1 + 2];
fn foo() -> [u8; 3] {
[1u8; 3]
}
}
fn bug<const N: usize>()
where [u8; N]: Foo, <[u8; N] as Foo>::Output: AsRef<[u8]> {
<[u8; N]>::foo().as_ref();
}
fn main() {
bug::<3>();
} Note that removing the |
looks like we aren't normalizing #81351 is what introduced this but i would expect us to fix this by adding a call to normalize somewhere before creating symbols. |
see #83972 (comment), should still be fixed 😆 |
This change was able to be done after the release of Rust Nightly 2022-08-12 that fixed rust-lang/rust#84669.
You can also see a somewhat similar compilation error on Rust Playground here.
Code
I tried this code:
And I get this compilation error:
Version it worked on
It most recently worked on: rustc 1.53.0-nightly (5e65467 2021-03-26)
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
The text was updated successfully, but these errors were encountered: