b-naber
8252a6eddf
address review
2023-02-21 21:54:53 +00:00
b-naber
0725d0ceee
add some cfgs back
2023-02-19 22:24:18 +00:00
b-naber
aefc5ec110
remove cfgs
2023-02-19 22:16:22 +00:00
b-naber
46bd77aa80
some conditional imports
2023-02-19 22:12:12 +00:00
b-naber
2f79f73821
collect region contexts during mir renumbering
2023-02-19 22:11:27 +00:00
b-naber
cb35a7b481
add BorrowckInferCtxt
2023-02-19 22:07:17 +00:00
Camille GILLOT
0241c29123
Put a DefId in AggregateKind.
2023-02-02 23:09:51 +00:00
Bryan Garza
aae331d610
During MirBorrowck, ignore ConstEvalCounter
2023-01-23 23:56:22 +00:00
Bryan Garza
d3c13a0102
Revert "Move CtfeLimit to mir_const's set of passes"
...
This reverts commit 332542a92223b2800ed372d2d461921147f29477.
2023-01-23 23:56:22 +00:00
Bryan Garza
08de246cd7
Move CtfeLimit to mir_const's set of passes
2023-01-23 23:56:22 +00:00
Bryan Garza
360db516cc
Create stable metric to measure long computation in Const Eval
...
This patch adds a `MirPass` that tracks the number of back-edges and
function calls in the CFG, adds a new MIR instruction to increment a
counter every time they are encountered during Const Eval, and emit a
warning if a configured limit is breached.
2023-01-23 23:56:22 +00:00
bors
21f6839352
Auto merge of #106976 - tmiasko:borrowck-lazy-dominators, r=cjgillot
...
Lazy dominator tree construction in borrowck
Motivated by the observation that sometimes constructed dominator tree was never queried.
2023-01-21 11:02:29 +00:00
Tomasz Miąsko
7fe68571fa
Lazy dominator tree construction in borrowck
...
Motivated by the observation that sometimes constructed dominator tree
was never queried.
2023-01-17 22:00:41 +01:00
Maybe Waffle
6a28fb42a8
Remove double spaces after dots in comments
2023-01-17 08:09:33 +00:00
Giacomo Pasini
ac4426c093
Merge borrowck permission checks
...
Merge `check_access_permission` and
`check_if_reassignment_to_immutable_state`.
The goal of this commit is twofold:
First, we simplify the codebase by removing duplicate logic.
Second, we avoid duplicate reporting of illegal reassignment
errors by reusing the exiting de-duplicating logic of
access_place.
2023-01-04 15:25:45 +01:00
Esteban Küber
5bfcfeee2a
Merge multiple mutable borrows of immutable binding errors
...
Fix #53466 .
2023-01-01 10:09:26 -08:00
Jeremy Stucki
3dde32ca97
rustc: Remove needless lifetimes
2022-12-20 22:10:40 +01:00
Matthias Krüger
1da4a49912
clippy::complexity fixes
...
filter_next
needless_question_mark
bind_instead_of_map
manual_find
derivable_impls
map_identity
redundant_slicing
skip_while_next
unnecessary_unwrap
needless_bool
2022-12-19 00:04:28 +01:00
Jakob Degen
9fb8da8f8f
Remove unneeded field from SwitchTargets
2022-12-09 04:53:10 -08:00
Maybe Waffle
c75817fb1b
rustc_borrowck
: remove ref
patterns
2022-12-06 14:45:58 +00:00
Maybe Waffle
1d42936b18
Prefer doc comments over //
-comments in compiler
2022-11-27 11:19:04 +00:00
Boxy
9ed348376f
require an ErrorGuaranteed
to taint infcx with errors
2022-11-18 13:25:17 +00:00
Boxy
1c48039a87
rename is_tainted_by_errors
2022-11-18 13:25:17 +00:00
Boxy
9c510048fd
InferCtxt::is_tainted_by_errors
returns ErrorGuaranteed
2022-11-18 13:25:17 +00:00
Boxy
c1ec8ff14d
dont unchecked create ErrorGuaranteed
in BorrowckErrors
2022-11-18 13:25:17 +00:00
Jakob Degen
ba359d8a51
Add support for custom MIR parsing
2022-11-08 23:13:15 -08:00
Cameron Steffen
283abbf0e7
Change InferCtxtBuilder from enter to build
2022-10-07 07:10:40 -05:00
Cameron Steffen
349415d1c6
Remove TypeckResults from InferCtxt
2022-10-07 07:06:19 -05:00
Pietro Albini
3975d55d98
remove cfg(bootstrap)
2022-09-26 10:14:45 +02:00
Takayuki Maeda
8fe936099a
separate definitions and HIR
owners
...
fix a ui test
use `into`
fix clippy ui test
fix a run-make-fulldeps test
implement `IntoQueryParam<DefId>` for `OwnerId`
use `OwnerId` for more queries
change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
2022-09-24 23:21:19 +09:00
bors
4136b59b7d
Auto merge of #99806 - oli-obk:unconstrained_opaque_type, r=estebank
...
Allow patterns to constrain the hidden type of opaque types
fixes #96572
reverts a revert as original PR was a perf regression that was fixed by reverting it: https://github.com/rust-lang/rust/pull/99368#issuecomment-1186587864 )
TODO:
* check if https://github.com/rust-lang/rust/issues/99685 is avoided
2022-09-20 12:09:52 +00:00
Oli Scherer
40e2de8c41
Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank""
...
This reverts commit 4a742a691e
.
2022-09-16 11:36:39 +00: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
Oli Scherer
a0130e62ec
Check all operands, they may contain indirections in their place
2022-09-06 15:32:35 +00:00
Oli Scherer
b7413511dc
Generalize the Assume intrinsic statement to a general Intrinsic statement
2022-09-06 14:18:32 +00:00
Oli Scherer
3f07645120
Lower the assume intrinsic to a MIR statement
2022-09-06 14:18:32 +00:00
bors
a0d07093f8
Auto merge of #100812 - Nilstrieb:revert-let-chains-nightly, r=Mark-Simulacrum
...
Revert let_chains stabilization
This is the revert against master, the beta revert was already done in #100538 .
Bumps the stage0 compiler which already has it reverted.
2022-08-30 05:48:22 +00:00
Nilstrieb
d1ef8180f9
Revert let_chains stabilization
...
This reverts commit 3266460749
.
This is the revert against master, the beta revert was already done in #100538 .
2022-08-29 19:34:11 +02:00
Jack Huey
8033c3c27d
Various changes to logging of borrowck-related code
2022-08-29 10:59:21 -04:00
AndyJado
622217da59
diag-mig
2022-08-26 10:32:59 +08:00
Mark Rousskov
154a09dd91
Adjust cfgs
2022-08-12 16:28:15 -04:00
Cameron Steffen
cf2433a74f
Use LocalDefId for closures more
2022-07-30 15:59:17 -05:00
bors
7dfdd64433
Auto merge of #99667 - ouz-a:some_branch, r=oli-obk
...
Optimize `UnDerefer`
Addresses the performance [issues](https://github.com/rust-lang/rust/pull/98145#issuecomment-1183548597 ) faced here.
r? `@oli-obk`
2022-07-29 07:11:50 +00:00
ouz-a
09134982e5
optimize un_derefer
2022-07-24 14:40:43 +03:00
bors
14dbfebfa2
Auto merge of #99506 - Dylan-DPC:rollup-q3msucx, r=Dylan-DPC
...
Rollup of 7 pull requests
Successful merges:
- #98101 (stdlib support for Apple WatchOS)
- #99345 (Do not allow typeck children items to constrain outer RPITs)
- #99383 (Formalize defining_use_anchor)
- #99436 (Add flag to configure `noalias` on `Box<T>`)
- #99483 (Fix a numerical underflow in tuple wrap suggestion)
- #99485 (Stop injecting `#[allow(unused_qualifications)]` in generated `derive` implementations)
- #99486 (Refactor: remove a string comparison between types in `check_str_addition`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2022-07-20 13:36:59 +00:00
ouz-a
7c0fb38095
take opaq types
2022-07-20 12:43:10 +03:00
Oli Scherer
4a742a691e
Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank"
...
This reverts commit 6f8fb911ad
, reversing
changes made to 7210e46dc6
.
2022-07-20 07:55:58 +00:00
Caio
3266460749
Stabilize let_chains
2022-07-16 20:17:58 -03:00
Oli Scherer
84a444a1f4
Introduce opaque type to hidden type projection
2022-07-15 15:49:22 +00:00
Joshua Nelson
3c9765cff1
Rename debugging_opts
to unstable_opts
...
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
Rename it to be more clear.
2022-07-13 17:47:06 -05:00