ljedrz
f05cbc98f8
HIR: rename find_by_hir_id to find
2019-06-24 09:58:49 +02:00
ljedrz
d08bd72e97
HIR: rename get_parent_node_by_hir_id to get_parent_node
2019-06-24 09:46:38 +02:00
Eduard-Mihai Burtescu
b25b466a88
rustc: remove 'x: 'y bounds (except from comments/strings).
2019-06-18 18:10:21 +03:00
ljedrz
d996c4d5a3
remove _by_hir_id if there is no NodeId counterpart
2019-06-17 18:57:21 +02:00
Eduard-Mihai Burtescu
f3f9d6dfd9
Unify all uses of 'gcx and 'tcx.
2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu
fff08cb043
Run rustfmt --file-lines ...
for changes from previous commits.
2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu
17cdd356da
rustc: replace TyCtxt<'tcx, 'gcx, 'tcx>
with TyCtxt<'gcx, 'tcx>
.
2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
2441253508
Fix fallout from deny(unused_lifetimes)
.
2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
37799a5552
rustc: replace TyCtxt<'a, 'gcx, 'tcx>
with TyCtxt<'tcx, 'gcx, 'tcx>
.
2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu
d110d309b6
rustc_mir: deny(unused_lifetimes).
2019-06-11 14:11:58 +03:00
Jad Ghalayini
80ff07f30d
Changed usages of mir
in librustc::mir and librustc_mir to body
2019-06-09 16:05:05 -04:00
Santiago Pastorino
2bdaccbbcf
Make UnsafetyChecker visitor iterate instead of recurse
2019-06-06 05:17:19 +02:00
Claude-Alban RANÉLY-VERGÉ-DÉPRÉ
6e5e0daff2
Changes the type mir::Mir
into mir::Body
...
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.
Revisions asked by eddyb :
- Renamed of all the occurences of {visit/super}_mir
- Renamed test structures `CachedMir` to `Cached`
Fixing the missing import on `AggregateKind`
2019-05-28 19:17:51 +02:00
Nicholas Nethercote
257eaf523f
Introduce InternedString::intern
.
...
`InternedString::intern(x)` is preferable to
`Symbol::intern(x).as_interned_str()`, because the former involves one
call to `with_interner` while the latter involves two.
The case within InternedString::decode() is particularly hot, and this
change reduces the number of `with_interner` calls by up to 13%.
2019-05-20 09:17:00 +10:00
Nicholas Nethercote
fb084a48e2
Pass a Symbol
to check_name
, emit_feature_err
, and related functions.
2019-05-13 09:29:22 +10:00
Matthew Jasper
22226fa7fb
Remove region from borrow place contexts
2019-04-26 21:35:10 +01:00
Matthew Jasper
0eeab6b9a6
Remove BasicBlock parameter from mir visitor methods
2019-04-26 21:35:10 +01:00
Vadim Petrochenkov
6c187cc0c6
Change return type of TyCtxt::is_static
to bool
...
Add `TyCtxt::is_mutable_static`
2019-04-21 14:41:51 +03:00
varkor
a759e2cc12
Add own_requires_monomorphization
2019-04-18 00:30:50 +01:00
Tyler Mandry
4122d2221e
Remove adt_def from PlaceTy and make it a struct
2019-04-02 12:02:17 -07:00
Saleem Jaffer
752544b284
adding mir::StaticKind enum for static and promoted
2019-03-23 20:18:52 +05:30
Saleem Jaffer
a837b8a368
cleaner code as per review
2019-03-18 15:03:30 +05:30
Saleem Jaffer
7fb1c22da1
promoted is still left in 2 places
2019-03-18 15:03:29 +05:30
ljedrz
cd06038b54
HirIdification: replace NodeId method calls
2019-03-07 09:22:43 +01:00
varkor
8e56729b4d
Handle new ConstValue variants in mir
...
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:19:26 +00:00
bors
c1d2d83ca3
Auto merge of #58754 - ljedrz:I_hate_NodeIds, r=Zoxc
...
Remove NodeId from more HIR nodes
The next iteration of HirIdification (#57578 ).
Removes `NodeId` from:
- [x] `Stmt`
- [x] `Local`
- [x] `Field`
- [x] `AnonConst`
- [x] `TraitItem`
- [x] `ImplItem`
- [x] `TypeBinding`
- [x] `Arg`
- [x] `TraitRef`
- [x] `VisibilityKind`
It will most probably break clippy again; I'd appreciate a **delegate** again if/when it is good to go so I can attach a clippy fix later.
r? @Zoxc
2019-03-01 15:36:13 +00:00
ljedrz
c2e517e0c4
ty: HirIdify some lints
2019-03-01 11:18:49 +01:00
Santiago Pastorino
0f993d5a7a
Put Local, Static and Promoted as one Base variant of Place
2019-03-01 05:02:00 +01:00
ljedrz
021a140dcd
hir: remove NodeId from Block
2019-02-24 17:09:26 +01:00
Alexander Regueiro
c3e182cf43
rustc: doc comments
2019-02-10 23:42:32 +00:00
Taiki Endo
725af30809
librustc_mir => 2018
2019-02-08 06:28:15 +09:00
Oliver Scherer
aedc3a51df
Declare some unconst operations as unsafe in const fn
2019-01-21 16:01:57 +01:00
Niko Matsakis
8e89184a7b
rename type_moves_by_default
to type_is_copy_modulo_regions
2019-01-02 17:35:06 -05:00
Mark Rousskov
2a663555dd
Remove licenses
2018-12-25 21:08:33 -07:00
Mazdak Farrokhzad
b42a3acaec
stabilize min_const_unsafe_fn in 1.33.
2018-12-23 10:29:38 +01:00
Ralf Jung
c1160a8f86
treat ref-to-raw cast like a reborrow: do a special kind of retag
2018-12-18 09:56:31 +01:00
Oliver Scherer
8d0b64f16d
Make const unsafe fn
bodies unsafe
2018-12-11 10:27:00 +01:00
Alexander Regueiro
ee89c088b0
Various minor/cosmetic improvements to code
2018-12-07 23:53:34 +00:00
John Kåre Alsaker
a70babed03
Use a function to access the Hir map to be able to turn it into a query later
2018-12-06 17:24:36 +01:00
Oliver Scherer
f4115765c5
Intrinsic checks are just needed for qualify_min_const_fn
2018-12-04 10:17:37 +01:00
Oliver Scherer
b77969466c
Clear up some code
2018-12-04 10:17:37 +01:00
Oliver Scherer
4497ff3762
Emit feature gate suggestion
2018-12-04 10:17:36 +01:00
Oliver Scherer
e5d90652e2
Comment on the unsafety code for layout constrained fields
2018-12-04 10:17:36 +01:00
Oliver Scherer
55abc0bc90
Also prevent mutation fields directly
2018-12-04 10:17:36 +01:00
Oliver Scherer
1894a5fe2c
Also make immutable references to non-freeze restricted value range types unsafe
2018-12-04 10:17:36 +01:00
Oliver Scherer
081c49783f
generalize the message about the creation of layout restricted types
2018-12-04 10:17:36 +01:00
Oliver Scherer
8bdb11c4d9
Forbid the creation of mutable borrows to fields of layout constrained types
2018-12-04 10:17:36 +01:00
Oliver Scherer
693c55372e
Move ref to packed struct field check into projection arm
2018-12-04 10:17:36 +01:00
Oliver Scherer
02b22323f1
Make sure the initialization of constrained int range newtypes is unsafe
2018-12-04 10:17:36 +01:00
Oliver Scherer
906a49eef2
Document unsafe rules with comments and bug!
calls
2018-12-04 10:17:36 +01:00