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

ty::Unevaluated: dealing with unused substs #1190

Merged
merged 4 commits into from
Sep 17, 2021
Merged

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Aug 18, 2021

blocked on rust-lang/rust#87280

still not too happy with what I wrote here, pls review ❤️

@LeSeulArtichaut LeSeulArtichaut added the blocked This PR is blocked waiting for some other PR label Aug 18, 2021
Copy link
Member

@jyn514 jyn514 left a 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?

@lcnr
Copy link
Contributor Author

lcnr commented Aug 19, 2021

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

@lcnr lcnr added waiting-on-review This PR is waiting for a reviewer to verify its content and removed blocked This PR is blocked waiting for some other PR labels Aug 30, 2021
@lcnr
Copy link
Contributor Author

lcnr commented Aug 30, 2021

rust-lang/rust#87280 now landed so this is ready for review/merge.

cc @nikomatsakis

@nikomatsakis nikomatsakis self-assigned this Aug 31, 2021
Copy link
Contributor

@nikomatsakis nikomatsakis left a 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.

src/constants.md Outdated Show resolved Hide resolved
@nikomatsakis nikomatsakis merged commit 09bf2bd into master Sep 17, 2021
@lcnr lcnr deleted the unused-ct-substs branch September 17, 2021 19:55
@spastorino
Copy link
Member

Should we link this somehow from the TOC? or connect the content in some way with the rest of the guide?

@lcnr
Copy link
Contributor Author

lcnr commented Sep 20, 2021

opened #1213

ehuss added a commit to ehuss/rust that referenced this pull request Sep 30, 2021
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 9198465b6ca8bed669df0cbb67c0e6d0b140803c..d1f03cbaa39d9164f5fe4b9b93762668142e0dad
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-on-review This PR is waiting for a reviewer to verify its content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants