-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Implement (but don't use) valtree and refactor in preparation of use #82936
Commits on Mar 12, 2021
-
valtree is a version of constants that is inherently safe to be used within types. This is in contrast to ty::Const which can have different representations of the same value. These representation differences can show up in hashing or equality comparisons, breaking type equality of otherwise equal types. valtrees do not have this problem.
Configuration menu - View commit details
-
Copy full SHA for a4fbac1 - Browse repository at this point
Copy the full SHA a4fbac1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fe4f38 - Browse repository at this point
Copy the full SHA 0fe4f38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 858216c - Browse repository at this point
Copy the full SHA 858216cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 09f7f91 - Browse repository at this point
Copy the full SHA 09f7f91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 019dba0 - Browse repository at this point
Copy the full SHA 019dba0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d917fa - Browse repository at this point
Copy the full SHA 4d917faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e8a89b - Browse repository at this point
Copy the full SHA 5e8a89bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b729cc9 - Browse repository at this point
Copy the full SHA b729cc9View commit details -
Split pretty printer logic for scalar int and scalar ptr
Value trees won't have scalar ptr at all, so we need a scalar int printing method anyway. This way we'll be able to share that method between all const representations.
Configuration menu - View commit details
-
Copy full SHA for 0bb367e - Browse repository at this point
Copy the full SHA 0bb367eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d5eec65 - Browse repository at this point
Copy the full SHA d5eec65View commit details -
Add
ty
helper function for mir constantsThis is in preparation of the `literal` field becoming an enum that distinguishes between type level constants and runtime constants
Configuration menu - View commit details
-
Copy full SHA for 914df2a - Browse repository at this point
Copy the full SHA 914df2aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ecde6f - Browse repository at this point
Copy the full SHA 3ecde6fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3127a9c - Browse repository at this point
Copy the full SHA 3127a9cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20f7379 - Browse repository at this point
Copy the full SHA 20f7379View commit details -
Visit
mir::Constant::user_ty
for completeness.It's not necessary yet, but it may become necessary with things like lazy normalization.
Configuration menu - View commit details
-
Copy full SHA for 6ca1d87 - Browse repository at this point
Copy the full SHA 6ca1d87View commit details -
We won't support trait object constants in type level constants for t…
…he forseeable future
Configuration menu - View commit details
-
Copy full SHA for c51749a - Browse repository at this point
Copy the full SHA c51749aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 11ddd22 - Browse repository at this point
Copy the full SHA 11ddd22View commit details
Commits on Mar 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c30c1be - Browse repository at this point
Copy the full SHA c30c1beView commit details -
Configuration menu - View commit details
-
Copy full SHA for bc8641a - Browse repository at this point
Copy the full SHA bc8641aView commit details -
Configuration menu - View commit details
-
Copy full SHA for f646c1e - Browse repository at this point
Copy the full SHA f646c1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c01c494 - Browse repository at this point
Copy the full SHA c01c494View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0dd5a1b - Browse repository at this point
Copy the full SHA 0dd5a1bView commit details -
Do not expose fallible
to_int
operation onScalar
.Any use of it has been shown to be a bug in the past.
Configuration menu - View commit details
-
Copy full SHA for 9f407ae - Browse repository at this point
Copy the full SHA 9f407aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ffd21a - Browse repository at this point
Copy the full SHA 1ffd21aView commit details
Commits on Mar 16, 2021
-
Update compiler/rustc_mir/src/const_eval/mod.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
Configuration menu - View commit details
-
Copy full SHA for f0997fa - Browse repository at this point
Copy the full SHA f0997faView commit details -
Update compiler/rustc_middle/src/ty/consts/valtree.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
Configuration menu - View commit details
-
Copy full SHA for 5b9bd90 - Browse repository at this point
Copy the full SHA 5b9bd90View commit details -
Update compiler/rustc_middle/src/ty/consts/valtree.rs
Co-authored-by: Ralf Jung <post@ralfj.de>
Configuration menu - View commit details
-
Copy full SHA for c4d564c - Browse repository at this point
Copy the full SHA c4d564cView commit details