Skip to content
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

n.powi(i) gives huge compile errors #150

Open
WaffleLapkin opened this issue May 20, 2020 · 1 comment
Open

n.powi(i) gives huge compile errors #150

WaffleLapkin opened this issue May 20, 2020 · 1 comment
Labels
bug likely-rust-bug Likely a compiler bug

Comments

@WaffleLapkin
Copy link
Contributor

WaffleLapkin commented May 20, 2020

Even simple non-typelevel usage of Pow trait leads to a very huge compiler error:

Example code:

use typenum::{P1, Pow};

fn doesnt_compile_with_huge_error() {
    P1::new().powi(P1::new());
}

This gives 344K error message (141 lines):

% cargo build > ./err0.txt 2>&1 || ls -sh ./err0.txt && wc -l ./err0.txt
344K ./err0.txt
141 ./err0.txt

Here is a full error on gist.

@WaffleLapkin
Copy link
Contributor Author

However, with full path specified this example works just fine:

<P1 as Pow<P1>>::powi(P1::new(), P1::new());

@paholg paholg added bug likely-rust-bug Likely a compiler bug labels Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug likely-rust-bug Likely a compiler bug
Projects
None yet
Development

No branches or pull requests

2 participants