-
Notifications
You must be signed in to change notification settings - Fork 520
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
ty::Unevaluated
: dealing with unused substs
#1190
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sort of like lazy normalization, but only for constants, right? What made it easier for constants than for all types?
It's a bit stronger than "full lazy norm", in that you can't look at the generic args of constants at all, but also quite a bit simpler, as it doesn't really interact with our type system. The biggest reason this is easier is that the affected parts of const generics are still unstable, so we don't have to worry about causing some subtle breakage. @matthewjasper did try to implement lazy norm and afaict found some annoying regressions: https://gist.github.com/matthewjasper/358245b033a1b7bd158acfe0c08d0d09 |
rust-lang/rust#87280 now landed so this is ready for review/merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good. I left one suggestion.
Should we link this somehow from the TOC? or connect the content in some way with the rest of the guide? |
opened #1213 |
Update books ## nomicon 1 commits in fe6227eb3c8533200c52dffa42ef1b6f2f02c40e..2747c4bb2cbc0639b733793ddb0bf4e9daa2634e 2021-08-31 05:42:38 +0900 to 2021-09-19 17:33:32 +0900 - Clarify a bit of wording (rust-lang/nomicon#310) ## reference 2 commits in 0e5ed7a4bec065f0cc18c35d1c904639e095314d..13747275bd14c2d2b453100498532f9ae5504769 2021-08-29 17:33:21 +0900 to 2021-09-24 17:44:04 +0900 - (rust-lang/reference#1087) - Document RangeFrom patterns (rust-lang/reference#900) ## book 4 commits in fcb5e0ea68112d85a1d29a7a7335978ef2a02181..eb1282ec444db94055fa9531b6f3f803e86bb382 2021-08-31 21:26:19 -0400 to 2021-09-16 21:17:09 -0400 - Rust 1.55 (rust-lang/book#2890) - Chapter 3.3: Remove unused variable (rust-lang/book#2877) - Appendix (operators and symbols): remove extra space (rust-lang/book#2876) - Chapter 17.1: add missing comma (rust-lang/book#2867) ## rust-by-example 2 commits in 9d4132b56c4999cd3ce1aeca5f1b2f2cb0d11c24..28aca4a36962c709bce301c03114b5589381dfb8 2021-09-14 06:56:00 -0300 to 2021-09-25 08:19:51 -0300 - fix formatting (rust-lang/rust-by-example#1463) - involving === verb, involved === adjective (rust-lang/rust-by-example#1461) ## rustc-dev-guide 7 commits in 9198465..d1f03cb 2021-09-12 11:50:44 -0500 to 2021-09-24 12:00:29 +0900 - Fix a typo on closure.md (rust-lang/rustc-dev-guide#1218) - const generics update - s/--blessed/--bless/ - Make indentation consistent in example vscode config file - Suggests `--edition=2018` argument when using stage0/bin/rustfmt directly - `ty::Unevaluated`: dealing with unused substs (rust-lang/rustc-dev-guide#1190) - Parallel codegen (rust-lang/rustc-dev-guide#1206)
* unused ct substs * q * q * Update src/constants.md Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
blocked on rust-lang/rust#87280
still not too happy with what I wrote here, pls review ❤️