21 Commits

Author SHA1 Message Date
Scott McMurray
7d57685682 Also remove #![feature(control_flow_enum)] where possible 2023-01-18 10:22:21 -08:00
Michael Goulet
48270044b0 Move has_structural_eq_impls provider to rustc_ty_utils 2022-12-08 05:16:48 +00:00
Cameron Steffen
ff940db666 Rewrite representability 2022-10-07 09:33:46 -05:00
Matthias Krüger
dd0fa6f871
Rollup merge of #98496 - BoxyUwU:instancers_bad_equality, r=lcnr
make `compare_const_impl` a query and use it in `instance.rs`

Fixes #88365

the bug in #88365 was caused by some `instance.rs` code using the `PartialEq` impl on `Ty` to check that the type of the associated const in an impl is the same as the type of the associated const in the trait definition. This was wrong for two reasons:
- the check typeck does is that the impl type is a subtype of the trait definition's type (see `mismatched_impl_ty_2.rs` which [was ICEing](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=f6d60ebe6745011f0d52ab2bc712025d) before this PR on stable)
- it assumes that if two types are equal then the `PartialEq` impl will reflect that which isnt true for higher ranked types or type level constants when `feature(generic_const_exprs)` is enabled (see `mismatched_impl_ty_3.rs` for higher ranked types which was [ICEing on stable](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d7af131a655ed515b035624626c62c71))

r? `@lcnr`
2022-10-06 16:29:43 +02:00
Cameron Steffen
95b689b1d5 Move utils from rustc_middle to rustc_ty_utils 2022-10-03 09:12:03 -05:00
Boxy
c1a9cf42b4 make query take (LocalDefId, DefId) 2022-09-30 18:53:32 +01:00
Pietro Albini
3975d55d98
remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00
est31
173eb6f407 Only enable the let_else feature on bootstrap
On later stages, the feature is already stable.

Result of running:

rg -l "feature.let_else" compiler/ src/librustdoc/ library/ | xargs sed -s -i "s#\\[feature.let_else#\\[cfg_attr\\(bootstrap, feature\\(let_else\\)#"
2022-09-15 21:06:45 +02:00
Peter Medus
01c1616b25 Migrate rustc_ty_utils to use SessionDiagnostic 2022-08-26 14:36:51 +01:00
lcnr
4fe666ee64 implied_bounds: clarify our assumptions 2022-08-17 12:22:32 +02:00
kadmin
e612e2603c Move abstract const to rustc_middle::ty 2022-07-12 02:21:31 +00:00
Dominik Stolz
080525229b Make consts mod private 2022-06-28 22:45:05 +02:00
Dominik Stolz
cd88bb332c Improve pretty printing of valtrees for references 2022-06-28 22:38:32 +02:00
Jack Huey
410dcc9674 Fully stabilize NLL 2022-06-03 17:16:41 -04:00
est31
2ef8af6619 Adopt let else in more places 2022-02-19 17:27:43 +01:00
Matthew Jasper
1b057a33bd Move associated_item* providers to their own module 2022-01-07 13:23:35 -08:00
bjorn3
83ddedf170 Remove various unused feature gates 2021-10-02 19:09:18 +02:00
Yuki Okushi
13e116f1f7
Use BoundVarsCollector for now 2021-07-03 01:12:31 +09:00
lcnr
b3629d21ba move representability out of rustc_middle 2021-04-27 15:01:37 +02:00
Ellen
42cbfd6346 yeet 2021-02-23 23:35:59 +00:00
LeSeulArtichaut
f59d03038c Move rustc_ty -> rustc_ty_utils 2020-11-19 21:57:29 +01:00