Camille GILLOT
26cb34cd18
Remove span from BrAnon.
2023-09-24 09:46:55 +00:00
bors
4b91288484
Auto merge of #115486 - compiler-errors:dont-capture-late-pls, r=cjgillot
...
Correctly deny late-bound lifetimes from parent in anon consts and TAITs
Reuse the `AnonConstBoundary` scope (introduced in #108553 , renamed in this PR to `LateBoundary`) to deny late-bound vars of *all* kinds (ty/const/lifetime) in anon consts and TAITs.
Side-note, but I would like to consolidate this with the error reporting for RPITs (E0657):
c4f25777a0/compiler/rustc_hir_analysis/src/collect/resolve_bound_vars.rs (L733-L754)
but the semantics about what we're allowed to capture there are slightly different, so I'm leaving that untouched.
Fixes #115474
2023-09-20 03:34:51 +00:00
Deadbeef
9654d5ceaf
add is_host_effect
to GenericParamDefKind::Const
and address review
2023-09-11 13:18:36 +00:00
Michael Goulet
52aff53812
Correctly deny late-bound lifetimes from parent in anon consts and TAITs
2023-09-05 20:20:55 +00:00
Michael Goulet
c5d0f6c05c
Don't manually walk through param indices when adding implicit Sized and ConstParamHasTy
2023-09-01 19:26:55 +00:00
Oli Scherer
5d850e0f50
Permit recursive weak type aliases
2023-08-30 11:55:03 +00:00
bors
f88a8b71ce
Auto merge of #114545 - fee1-dead-contrib:lower-impl-effect, r=oli-obk
...
correctly lower `impl const` to bind to host effect param
r? `@oli-obk`
2023-08-08 19:23:41 +00:00
León Orell Valerian Liehr
5468336d6b
Store the laziness of type aliases in the DefKind
2023-08-07 15:54:31 +02:00
Deadbeef
92f4c59e48
lower impl const to bind to host effect param
2023-08-06 13:34:53 +00:00
Deadbeef
4fec845c3f
Remove constness from TraitPredicate
2023-08-02 15:38:00 +00:00
Michael Goulet
ac6f2f0d2e
Fix a comment
2023-08-01 23:10:38 +00:00
Matthias Krüger
c64ef5e070
inline format!() args from rustc_codegen_llvm to the end (4)
...
r? @WaffleLapkin
2023-07-25 23:20:28 +02:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Mark Rousskov
cc907f80b9
Re-format let-else per rustfmt update
2023-07-12 21:49:27 -04:00
Santiago Pastorino
20429af7a3
Replace RPITIT current impl with new strategy that lowers as a GAT
2023-07-08 18:21:34 -03:00
Boxy
12138b8e5e
Move TyCtxt::mk_x
to Ty::new_x
where applicable
2023-07-05 20:27:07 +01:00
Oli Scherer
62fbbac2d9
tidy: move a large function out of an even larger file
2023-07-05 07:46:04 +00:00
Oli Scherer
a49b736568
Lint now-unnecessary associated type bounds
2023-07-05 07:42:53 +00:00
Oli Scherer
ca581f9161
Don't require associated types with Self: Sized
bounds in dyn Trait
objects
2023-07-05 07:42:53 +00:00
Boxy
d30f56dbf2
Replace const_error
methods with Const::new_error
2023-07-04 14:46:32 +01:00
Boxy
ddbc774e74
Replace mk_const
with Const::new_x
methods
2023-07-04 14:26:33 +01:00
Michael Goulet
0c73b41cd6
remove TypeWellFormedFromEnv
2023-07-03 21:40:04 +00:00
León Orell Valerian Liehr
838f85d6f7
Don't perform selection if IATs are not enabled
2023-07-03 14:33:38 +02:00
bors
7383ab7378
Auto merge of #113154 - lcnr:better-probe-check, r=compiler-errors
...
change snapshot tracking in fulfillment contexts
use the exact snapshot number to prevent misuse even when created inside of a snapshot
2023-07-01 01:53:10 +00:00
Santiago Pastorino
d70deac161
Intern OpaqueTy on ItemKind::OpaqueTy
2023-06-29 14:05:10 -03:00
lcnr
d04775d739
change snapshot tracking in fulfillment contexts
2023-06-29 10:02:26 +02:00
Michael Goulet
de0e7d32fd
pass PredicateFilter to compute_bounds
2023-06-27 18:28:27 +00:00
Michael Goulet
374173cd99
TypeWellFormedInEnv
2023-06-26 23:12:04 +00:00
Michael Goulet
fbdef58414
Migrate predicates_of and caller_bounds to Clause
2023-06-26 23:12:03 +00:00
Guillaume Gomez
009d72b3ae
Rollup merge of #112853 - GuillaumeGomez:type_alias_type, r=oli-obk
...
Add `lazy_type_alias` feature gate
Add the `type_alias_type` to be able to have the weak alias used without restrictions.
Part of #112792 .
cc `@compiler-errors`
r? `@oli-obk`
2023-06-21 15:45:16 +02:00
Guillaume Gomez
60ec8405eb
Add lazy_type_alias
feature gate
2023-06-21 13:45:00 +02:00
Michael Goulet
21226eefb2
Fully fledged Clause type
2023-06-19 15:46:08 +00:00
Michael Goulet
fca56a8d2c
s/Clause/ClauseKind
2023-06-19 14:57:42 +00:00
Matthias Krüger
3436069c34
Rollup merge of #112734 - dswij:bounds-predicates-clause, r=compiler-errors
...
Make `Bound::predicates` use `Clause`
Part of #107250
`Bound::predicates` returns an iterator over `Binder<_, Clause>` instead of `Predicate`.
I tried updating `explicit_predicates_of` as well, but it seems that it needs a lot more change than I thought. Will do it in a separate PR instead.
2023-06-18 08:06:43 +02:00
Michael Goulet
4343d36079
Move some bounds computation out of astconv into its own file
2023-06-17 21:27:13 +00:00
Michael Goulet
6594c75449
Move ConstEvaluatable to Clause
2023-06-17 21:27:13 +00:00
Michael Goulet
52d3fc93f2
Move WF goal to clause
2023-06-17 21:20:20 +00:00
dswij
f874345784
Bound::predicates
to return Clause
2023-06-17 17:16:30 +08:00
Oli Scherer
79c2c986a2
Pacify tidy
2023-06-16 19:39:48 +00:00
Oli Scherer
f3b7dd6388
Add AliasKind::Weak
for type aliases.
...
Only use it when the type alias contains an opaque type.
Also does wf-checking on such type aliases.
2023-06-16 19:39:48 +00:00
León Orell Valerian Liehr
a995255cf5
iat selection: normalize self ty & completely erase bound vars
2023-06-11 00:19:47 +02:00
bors
e94bda3bf1
Auto merge of #111047 - compiler-errors:rtn-no-ty-ct-params, r=spastorino
...
Emit an error when return-type-notation is used with type/const params
These are not intended to be supported initially, even though the compiler supports them internally...
2023-06-07 09:03:33 +00:00
Michael Goulet
b0eaaca314
Remove redundant InferCtxtExt::fresh_item_substs
2023-06-05 20:05:08 +00:00
Michael Goulet
bbc536d3ac
Emit an error when RTN is used with ty/ct params
2023-06-05 19:52:04 +00:00
Oli Scherer
58972d19e7
Merge method, type and const object safety checks
2023-06-05 16:39:16 +00:00
Oli Scherer
604ffab063
Avoid going through queries if a value of type AssocItem
is already available
2023-06-05 14:22:45 +00:00
Nilstrieb
e7fdba84e2
Rollup merge of #112060 - lcnr:early-binder, r=jackh726
...
`EarlyBinder::new` -> `EarlyBinder::bind`
for consistency with `Binder::bind`. it may make sense to also add `EarlyBinder::dummy` in places where we know that no parameters exist, but I left that out of this PR.
r? `@jackh726` `@kylematsuda`
2023-05-30 12:57:40 +02:00
Maybe Waffle
e33e20824f
Rename tcx.mk_re_*
=> Region::new_*
2023-05-29 17:54:53 +00:00
lcnr
08d149ca85
EarlyBinder::new -> EarlyBinder::bind
2023-05-29 13:46:10 +02:00
Kyle Matsuda
03534ac8b7
Replace EarlyBinder(x) with EarlyBinder::new(x)
2023-05-28 10:44:50 -06:00