Zalathar
30fa6a8b50
Rename DropTreeBuilder::add_entry to link_entry_point
2024-03-06 22:32:01 +11:00
Vadim Petrochenkov
b07283815b
hir: Remove hir::Map::{opt_parent_id,parent_id,get_parent,find_parent}
2024-02-10 12:24:46 +03:00
Oli Scherer
eab2adb660
Continue to borrowck even if there were previous errors
2024-02-08 08:10:43 +00:00
Martin Nordholts
16ba56c242
compiler: Lower fn call arg spans down to MIR
...
To enable improved accuracy of diagnostics in upcoming commits.
2024-01-15 19:07:11 +01:00
Michael Goulet
5e2b66fc9d
Don't populate yield and resume types after the fact
2024-01-06 18:03:01 +00:00
Matthew Jasper
68d684cbff
Pass THIR ExprIds in MIR building
2023-12-18 16:54:58 +00:00
bors
1dfb2283d7
Auto merge of #116170 - matthewjasper:remove-thir-destruction-scopes, r=cjgillot
...
Don't include destruction scopes in THIR
They are not used by anyone, and add memory/performance overhead.
2023-12-09 12:38:32 +00:00
Zalathar
98166358a9
coverage: Use SpanMarker to mark continue expressions.
...
This replaces the previous workaround, which was to inject a dummy `Assign`
statement.
2023-12-08 22:40:49 +11:00
Matthew Jasper
43adf41ca6
Don't include destruction scopes in THIR
...
They are not used by anyone, and add memory/performance overhead.
2023-12-04 16:31:13 +00:00
Nicholas Nethercote
7060fc8327
Replace no_ord_impl with orderable.
...
Similar to the previous commit, this replaces `newtype_index`'s opt-out
`no_ord_impl` attribute with the opt-in `orderable` attribute.
2023-11-22 18:38:17 +11:00
Nilstrieb
21a870515b
Fix clippy::needless_borrow in the compiler
...
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`.
Then I had to remove a few unnecessary parens and muts that were exposed
now.
2023-11-21 20:13:40 +01:00
Oli Scherer
e96ce20b34
s/generator/coroutine/
2023-10-20 21:14:01 +00:00
Oli Scherer
60956837cf
s/Generator/Coroutine/
2023-10-20 21:10:38 +00:00
Camille GILLOT
e63d19c4dd
Remove mir::LocalDecl::internal.
2023-10-04 17:55:15 +00:00
Ralf Jung
4c53783f3c
when terminating during unwinding, show the reason why
2023-08-24 13:28:26 +02:00
Ralf Jung
818ec8e23a
give some unwind-related terminators a more clear name
2023-08-20 15:52:38 +02:00
Nicholas Nethercote
667d75e546
Add a cache for maybe_lint_level_root_bounded.
...
It's a nice speed win.
2023-07-13 09:32:09 +10:00
Nicholas Nethercote
f234dc3e1c
Move maybe_lint_level_root_bounded.
...
From `TyCtxt` to the MIR `Builder`. This will allow us to add a cache to
`Builder` and use it from `maybe_lint_level_root_bounded`.
2023-07-12 10:02:13 +10:00
Nicholas Nethercote
36458109ae
Shorten some overlong comment lines.
...
It's annoying that these wrap in a 100-char terminal window.
2023-07-12 09:16:31 +10:00
Boxy
12138b8e5e
Move TyCtxt::mk_x to Ty::new_x where applicable
2023-07-05 20:27:07 +01:00
Camille GILLOT
844c1cc5fe
Remove DesugaringKind::Replace.
2023-05-25 17:40:46 +00:00
Maybe Waffle
fb0f74a8c9
Use Option::is_some_and and Result::is_ok_and in the compiler
2023-05-24 14:20:41 +00:00
Maybe Waffle
03d5f9b783
rustc_mir_build: drive-by-cleaup: replace nested ifs with a match
2023-05-17 11:27:37 +00:00
Maybe Waffle
5ae51d69a3
rustc_mir_build: drive-by-cleanup: remove some local mutable state
2023-05-17 11:27:37 +00:00
Ben Kimock
f08f903fa9
Box AssertKind
2023-05-01 23:12:41 -04:00
Maybe Waffle
e496fbec92
Split {Idx, IndexVec, IndexSlice} into their own modules
2023-04-24 13:53:35 +00:00
Gary Guo
c5829c2ee5
Fix new usage of old api
2023-04-06 09:34:16 +01:00
Gary Guo
e3f2edc75b
Rename Abort terminator to Terminate
...
Unify terminology used in unwind action and terminator, and reflect
the fact that a nounwind panic is triggered instead of an immediate
abort is triggered for this terminator.
2023-04-06 09:34:16 +01:00
Gary Guo
0a5dac3062
Add UnwindAction::Terminate
2023-04-06 09:34:16 +01:00
Gary Guo
daeb844e0c
Refactor unwind from Option to a new enum
2023-04-06 09:34:16 +01:00
Scott McMurray
a2ee7592d6
Use &IndexSlice instead of &IndexVec where possible
...
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-04-02 17:35:37 -07:00
Giacomo Pasini
c5d4e4d907
Remove DropAndReplace terminator
...
PR 107844 made DropAndReplace unused, let's remove it completely
from the codebase.
2023-03-07 14:25:22 +01:00
Giacomo Pasini
b3a47d9b6b
Desugars drop and replace at MIR build
...
This commit desugars the drop and replace deriving from an
assignment at MIR build, avoiding the construction of the
DropAndReplace terminator (which will be removed in a followign PR)
In order to retain the same error messages for replaces a new
DesugaringKind::Replace variant is introduced.
2023-03-03 16:33:11 +01:00
Maybe Waffle
6a28fb42a8
Remove double spaces after dots in comments
2023-01-17 08:09:33 +00:00
Nilstrieb
8bfd6450c7
A few small cleanups for newtype_index
...
Remove the `..` from the body, only a few invocations used it and it's
inconsistent with rust syntax.
Use `;` instead of `,` between consts. As the Rust syntax gods inteded.
2022-12-18 21:47:28 +01:00
Will Crichton
d595884302
Move -Z maximal-hir-to-mir-coverage implementation to new maybe_new_source_scope method
2022-12-05 12:47:44 -08:00
Maybe Waffle
1d42936b18
Prefer doc comments over //-comments in compiler
2022-11-27 11:19:04 +00:00
Ding Xiang Fei
565c35aa5c
fix doc and dedup diverge_cleanup
2022-10-05 22:24:12 +08:00
X
fb52dc7c3b
apply suggestion
...
Co-authored-by: SafariMonkey <charlton.rodda@gmail.com >
2022-09-30 21:03:08 +08:00
Ding Xiang Fei
4a2c1a12b6
fix unwind drop glue for if-then scopes
2022-09-28 18:45:11 +08:00
Oli Scherer
5d664f7a8f
Merge two arguments into one
2022-09-16 11:36:09 +00:00
Ding Xiang Fei
9b56640106
break out scopes when let-else fails to match
2022-07-21 00:35:43 +08: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
Oli Scherer
a034446fae
Add some tracing instrumentation
2022-07-15 15:56:16 +00:00
bors
4f39fb1f34
Auto merge of #97383 - dingxiangfei2009:restore-region-scope-tree-query, r=dingxiangfei2009
...
Try to cache region_scope_tree as a query
This PR will attempt to restore `region_scope_tree` as a query so that caching works again. It seems that `region_scope_tree` could be re-computed for nested items after all, which could explain the performance regression introduced by #95563 .
cc `@Mark-Simulacrum` `@pnkfelix` I will try to trigger a perf run here.
2022-05-28 14:30:25 +00:00
Ding Xiang Fei
4c6074fbb0
try to cache region_scope_tree as a query
2022-05-25 13:52:32 +08:00
Jakob Degen
0f65bcd920
Modify MIR building to drop foo in [foo; 0]
2022-05-24 15:53:37 -04:00
Ding Xiang Fei
6044fbe462
factor out the rvalue lifetime rule
...
remove region_scope_tree from RegionCtxt
Apply suggestions from code review
Co-authored-by: Niko Matsakis <niko@alum.mit.edu >
2022-05-22 16:46:50 +08:00
Jacob Pratt
49c82f31a8
Remove crate visibility usage in compiler
2022-05-20 20:04:54 -04:00
Elliot Roberts
7907385999
fix most compiler/ doctests
2022-05-02 17:40:30 -07:00