about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2020-05-02Suggestion for immutable reference -> mutable pointer should be emittedDonough Liu-2/+1
as `Applicability::Unspecified`
2020-05-02Add comments for deref_steps()Donough Liu-0/+3
2020-05-02Suggest deref when coercing `ty::Ref` to `ty::RawPtr` with arbitraryDonough Liu-47/+323
mutability
2020-05-02Auto merge of #71776 - Dylan-DPC:rollup-k1iuuow, r=Dylan-DPCbors-1777/+105
Rollup of 5 pull requests Successful merges: - #71018 (handle ConstValue::ByRef in relate) - #71758 (Remove leftover chalk types) - #71760 (Document unsafety for `*const T` and `*mut T`) - #71761 (doc: reference does not exist, probably a typo) - #71762 (doc: this resulted in a link pointing to a non-existent target) Failed merges: - #71726 (Suggest deref when coercing `ty::Ref` to `ty::RawPtr` with arbitrary mutability) r? @ghost
2020-05-01Rollup merge of #71762 - tshepang:typo, r=jonas-schievinkDylan DPC-1/+1
doc: this resulted in a link pointing to a non-existent target
2020-05-01Rollup merge of #71761 - tshepang:missing-target, r=jonas-schievinkDylan DPC-1/+1
doc: reference does not exist, probably a typo
2020-05-01Rollup merge of #71760 - LeSeulArtichaut:document-unsafety, r=Mark-SimulacrumDylan DPC-4/+8
Document unsafety for `*const T` and `*mut T` Helps with #66219 r? @Mark-Simulacrum
2020-05-01Rollup merge of #71758 - jackh726:chalk-remove, r=jackh726Dylan DPC-1768/+5
Remove leftover chalk types Split out from #69406 Since the other PR is having memory problems with `parallel-compiler = true`, figured I should split this out. Surprisingly, this actually changes some errors, and I'm not quite sure why. r? @nikomatsakis
2020-05-01Rollup merge of #71018 - lcnr:custom-const-param, r=eddybDylan DPC-3/+90
handle ConstValue::ByRef in relate fixes #68615 r? @eddyb
2020-05-01Auto merge of #69808 - cjgillot:vtbl, r=pnkfelixbors-103/+240
Avoid duplicating code for each query There are at the moment roughly 170 queries in librustc. The way `ty::query` is structured, a lot of code is duplicated for each query. I suspect this to be responsible for a part of librustc'c compile time. The first part of this PR reduces the amount of code generic on the query, replacing it by code generic on the key-value types. I can split it out if needed. In a second part, the non-inlined methods in the `QueryAccessors` and `QueryDescription` traits are made into a virtual dispatch table. This allows to reduce even more the number of generated functions. This allows to save 1.5s on check build, and 10% on the size of the librustc.rlib. (Attributed roughly half and half). My computer is not good enough to measure properly compiling time. I have no idea of the effect on performance. A perf run may be required. cc #65031
2020-05-01Remove leftover chalk typesJack Huey-1768/+5
2020-05-01doc: this resulted in a link pointing to a non-existent targetTshepang Lekhonkhobe-1/+1
2020-05-01doc: reference does not exist, probably a typoTshepang Lekhonkhobe-1/+1
2020-05-01Document unsafety for `*const T` and `*mut T`LeSeulArtichaut-4/+8
2020-05-01Rollup merge of #71755 - tshepang:fix-comment, r=jonas-schievinkDylan DPC-1/+1
fix doc reference Should of been in e0ce9f8c0a97e5949c9cadd220279d6969289daa, but that had a typo.
2020-05-01Rollup merge of #71752 - tshepang:more-readable, r=jonas-schievinkDylan DPC-2/+6
make Stability doc a more readable (and fix rustdoc warning)
2020-05-01Rollup merge of #71749 - RalfJung:miri-error-print, r=oli-obkDylan DPC-2/+2
fix Miri error message padding I screwed up in the previous PR, and accidentally padded with spaces instead of 0s... r? @oli-obk
2020-05-01Rollup merge of #71747 - spastorino:safety-scheme-around-consts-cleanup, ↵Dylan DPC-19/+3
r=oli-obk Remove deadcode in eval_mir_constant_to_operand r? @oli-obk @RalfJung
2020-05-01Rollup merge of #71744 - tshepang:obsolete-comment, r=Dylan-DPCDylan DPC-6/+0
remove obsolete comment Referenced was removed in 8770d0f34a9bee2691517ab95803a277c453dfda
2020-05-01fix doc referenceTshepang Lekhonkhobe-1/+1
Should of been in e0ce9f8c0a97e5949c9cadd220279d6969289daa, but that had a typo.
2020-05-01make Stability docs a bit more readable, and fix some rustdoc warningsTshepang Lekhonkhobe-2/+6
2020-05-01Restrict access.Camille GILLOT-1/+1
2020-05-01Inline a few things.Camille GILLOT-1/+8
2020-05-01Monomorphise the interface.Camille GILLOT-29/+72
2020-05-01Move the DepNode construction to librustc_query_system.Camille GILLOT-36/+46
2020-05-01Monomorphise try_execute_query.Camille GILLOT-43/+38
2020-05-01fix Miri error message paddingRalf Jung-2/+2
2020-05-01Monomorphise try_start.Camille GILLOT-18/+26
2020-05-01Monomorphise try_execute_anon_query.Camille GILLOT-15/+34
2020-05-01Remove deadcode in eval_mir_constant_to_operandSantiago Pastorino-19/+3
2020-05-01Monomorphise load_from_disk_and_cache_in_memory.Camille GILLOT-18/+45
2020-05-01Monomorphise force_query_with_job.Camille GILLOT-13/+41
2020-05-01Auto merge of #71742 - matthiaskrgr:submodule_upd, r=Dylan-DPCbors-0/+0
submodules: update cargo from 90931d9b3 to 258c89644 Changes: ```` Remove unnecessary loop in `maybe_spurious` Fix error with git repo discovery and symlinks. Allow failure when setting file mtime. Support multiple `--target` flags on the CLI build-std: Don't treat std like a "local" package. Allow `cargo package --list` even for things that don't package. ```` I'd like to get https://github.com/rust-lang/cargo/pull/8186 into nightly asap. :) r? @ehuss
2020-05-01remove obsolete commentsTshepang Lekhonkhobe-6/+0
Referenced was removed in 8770d0f34a9bee2691517ab95803a277c453dfda
2020-05-01submodules: update cargo from 90931d9b3 to 258c89644Matthias Krüger-0/+0
Changes: ```` Remove unnecessary loop in `maybe_spurious` Fix error with git repo discovery and symlinks. Allow failure when setting file mtime. Support multiple `--target` flags on the CLI build-std: Don't treat std like a "local" package. Allow `cargo package --list` even for things that don't package. ````
2020-05-01use hex for invalid bool and char (consistently with validation)Ralf Jung-2/+6
2020-05-01rename InvalidIntPtrUsageRalf Jung-50/+54
2020-05-01bless youRalf Jung-2/+2
2020-05-01InterpError printing really is more Display than DebugRalf Jung-32/+29
also tweak InvalidDiscriminant message
2020-05-01tweak InvalidIntPointerUsage messageRalf Jung-2/+2
2020-05-01Auto merge of #71623 - petrochenkov:localink, r=estebankbors-5/+16
Disable localization for all linkers We previously disabled non-English output from `link.exe` due to encoding issues (#35785). In https://github.com/rust-lang/rust/pull/70740 it was pointed out that it also prevents correct inspection of the linker output, which we have to do occasionally. So this PR disables localization for all linkers.
2020-05-01Auto merge of #70674 - cjgillot:query-arena-all, r=matthewjasperbors-256/+312
Have the per-query caches store the results on arenas This PR leverages the cache for each query to serve as storage area for the query results. It introduces a new cache `ArenaCache`, which moves the result to an arena, and only stores the reference in the hash map. This allows to remove a sizeable part of the usage of the global `TyCtxt` arena. I only migrated queries that already used arenas before.
2020-04-30Rollup merge of #71691 - ecstatic-morse:const-unreachable, r=oli-obk,RalfJungTyler Mandry-7/+3
Allow `Unreachable` terminators unconditionally in const-checking If we ever actually reach an `Unreachable` terminator while executing, the MIR is ill-formed or the user's program is UB due to something like `unreachable_unchecked`. I don't think we need to forbid these in `qualify_min_const_fn`. r? @oli-obk
2020-04-30Rollup merge of #71688 - ecstatic-morse:const-downcast, r=oli-obkTyler Mandry-47/+6
Allow `Downcast` projections unconditionally in const-checking `ProjectionElem::Downcast` sounds scary, but it's really just the projection we use to access a particular enum variant. They usually appear in the lowering of a `match` statement, so they have been associated with control flow in const-checking, but they don't do any control flow by themselves. We already have a HIR pass that looks for `if` and `match` (even ones that have 1 or fewer reachable branches). That pass is double-checked by a MIR pass that looks for `SwitchInt`s and `FakeRead`s for match scrutinees. In my opinion, there's no need to look for `Downcast` as well. r? @oli-obk
2020-04-30Rollup merge of #71590 - RalfJung:mir-dump-pointers, r=oli-obkTyler Mandry-97/+131
MIR dump: print pointers consistently with Miri output This makes MIR allocation dump pointer printing consistent with Miri output: both use hexadecimal offsets with a `0x` prefix. To save some space, MIR dump replaces the `alloc` prefix by `a` when necessary. I also made AllocId/Pointer printing more consistent in their Debug/Display handling, and adjusted Display printing for Scalar a bit to avoid using decimal printing when we do not know the sign with which to interpret the value (IMO using decimal then is misleading).
2020-04-30Rollup merge of #71567 - Mark-Simulacrum:no-success, r=matthiaskrgrTyler Mandry-0/+3
Handle build completion message from Cargo This was introduced in the recent bump to 1.44 bootstrap cargo Fixes #71561.
2020-04-30Rollup merge of #71465 - oli-obk:is_thread_local_cleanup, r=matthewjasperTyler Mandry-13/+17
Add a convenience method on `TyCtxt` for checking for thread locals This PR extracts the cleanup part of #71192 r? @bjorn3
2020-04-30Rollup merge of #71148 - bluss:vec-drop-raw-slice, r=RalfJungTyler Mandry-4/+10
Vec drop and truncate: drop using raw slice *mut [T] By creating a *mut [T] directly (without going through &mut [T]), avoid questions of validity of the contents of the slice. Consider the following risky code: ```rust unsafe { let mut v = Vec::<bool>::with_capacity(16); v.set_len(16); } ``` The intention is that with this change, we avoid one of the soundness questions about the above snippet, because Vec::drop no longer produces a mutable slice of the vector's contents. r? @RalfJung
2020-04-30Auto merge of #71717 - Dylan-DPC:rollup-av5vjor, r=Dylan-DPCbors-296/+484
Rollup of 5 pull requests Successful merges: - #70950 (extend NLL checker to understand `'empty` combined with universes) - #71433 (Add help message for missing right operand in condition) - #71449 (Move `{Free,}RegionRelations` and `FreeRegionMap` to `rustc_infer`) - #71559 (Detect git version before attempting to use --progress) - #71597 (Rename Unique::empty() -> Unique::dangling()) Failed merges: r? @ghost
2020-04-30Rollup merge of #71597 - CohenArthur:refactor-unique-empty, r=shepmasterDylan DPC-9/+8
Rename Unique::empty() -> Unique::dangling() A `FIXME` comment in `src/libcore/ptr/unique.rs` suggested refactoring `Unique::empty()` to `Unique::dangling()` which this PR does.