about summary refs log tree commit diff
path: root/src/librustc/ich/impls_ty.rs
AgeCommit message (Collapse)AuthorLines
2018-11-15do not accept out-of-bounds pointers in enum discriminants, they might be NULLRalf Jung-1/+6
2018-11-15rename FrameInfo span field to call_siteRalf Jung-1/+1
2018-11-14capture_disjoint_fields(rust-lang#53488)Blitzerr-1/+3
Refactoring out the HirId of the UpvarId in another struct.
2018-11-14miri: backtraces with instancesRalf Jung-2/+2
2018-11-06impl_stable_hash_for: support enums and tuple structs with generic parametersRalf Jung-301/+125
2018-11-03Auto merge of #55101 - alexreg:trait-aliases, r=nikomatsakisbors-0/+17
Implement trait aliases (RFC 1733) Extends groundwork done in https://github.com/rust-lang/rust/pull/45047, and fully implements https://github.com/rust-lang/rfcs/pull/1733. CC @durka @nikomatsakis
2018-11-03Remove `ReCanonical` in favor of `ReLateBound`scalexm-3/+0
2018-11-03Rename `BoundTyIndex` to `BoundVar`scalexm-1/+1
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-1/+3
2018-11-03Added support for trait aliases as bounds.Alexander Regueiro-0/+17
2018-11-02Auto merge of #55305 - nikomatsakis:universes-refactor-3, r=scalexmbors-2/+3
universes refactor 3 Some more refactorings from my universe branch. These are getting a bit more "invasive" -- they start to plumb the universe information through the canonicalization process. As of yet though I don't **believe** this branch changes our behavior in any notable way, though I'm marking the branch as `WIP` to give myself a chance to verify this. r? @scalexm
2018-10-28remove some unused CTFE error variantsRalf Jung-42/+0
2018-10-27Auto merge of #54183 - qnighy:by-value-object-safety, r=oli-obkbors-0/+3
Implement by-value object safety This PR implements **by-value object safety**, which is part of unsized rvalues #48055. That means, with `#![feature(unsized_locals)]`, you can call a method `fn foo(self, ...)` on trait objects. One aim of this is to enable `Box<FnOnce>` in the near future. The difficulty here is this: when constructing a vtable for a trait `Foo`, we can't just put the function `<T as Foo>::foo` into the table. If `T` is no larger than `usize`, `self` is usually passed directly. However, as the caller of the vtable doesn't know the concrete `Self` type, we want a variant of `<T as Foo>::foo` where `self` is always passed by reference. Therefore, when the compiler encounters such a method to be generated as a vtable entry, it produces a newly introduced instance called `InstanceDef::VtableShim(def_id)` (that wraps the original instance). the shim just derefs the receiver and calls the original method. We give different symbol names for the shims by appending `::{{vtable-shim}}` to the symbol path (and also adding vtable-shimness as an ingredient to the symbol hash). r? @eddyb
2018-10-27extend query response to potentially contain fresh universesNiko Matsakis-0/+1
The idea here is that an incoming query may refer to some universes, and they query response may contain fresh universes that go beyond those. When we instantiate the query response in the caller's scope, therefore, we map those new universes into fresh universes for the caller.
2018-10-27allow canonicalized regions to carry universe and track max-universeNiko Matsakis-2/+2
But.. we don't really use it for anything right now.
2018-10-25Report const eval error inside the queryOliver Schneider-8/+4
2018-10-24Add InstanceDef::VtableShim.Masaki Hara-0/+3
2018-10-20Rename InferTy::CanonicalTy to BoundTy and add DebruijnIndex to variant typeFabian Drinck-1/+1
2018-10-20Rename CanonicalVar to BoundTyIndexFabian Drinck-1/+1
2018-10-20Auto merge of #55114 - oli-obk:fx#map, r=nikomatsakisbors-1/+1
Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hack
2018-10-19Auto merge of #55162 - nikomatsakis:issue-54902-underscore-bound, r=tmandrybors-2/+3
handle underscore bounds in unexpected places Per the discussion on #54902, I made it a hard error to use lifetime bounds in various places where they used to be permitted: - `where Foo: Bar<'_>` for example I also moved error reporting to HIR lowering and added `Error` variants to let us suppress downstream errors that result. I (imo) improved the error message wording to be clearer, as well. In the process, I fixed the ICE in #52098. Fixes #54902 Fixes #52098
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-1/+1
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-1/+1
2018-10-17move E0637 to lowering and improve output, add more testsNiko Matsakis-2/+3
2018-10-17Re-use memory in `program_clauses_for_env`scalexm-3/+0
2018-10-17Categorize chalk clausesscalexm-1/+7
2018-10-17Use `Environment` instead of `ty::ParamEnv` in chalk contextscalexm-0/+8
2018-10-15introduce a more expressive `UserSubsts`Niko Matsakis-0/+5
2018-10-15rename `QueryResult` to `QueryResponse`Niko Matsakis-1/+1
`Result` really sounds like the rustc result type
2018-10-10Rollup merge of #54909 - scalexm:finish-rules, r=nikomatsakisManish Goregaokar-1/+1
Fixes #47311. r? @nrc
2018-10-10miri engine: basic support for pointer provenance trackingRalf Jung-23/+33
2018-10-09miri engine: also check return type before calling functionRalf Jung-0/+4
2018-10-08Pass around interned refs to goals and not goalsscalexm-1/+1
2018-10-04rename skolemized to placeholderNiko Matsakis-1/+1
2018-10-03Introduce `TyKind::UnnormalizedProjection`scalexm-2/+2
2018-09-30move ScalarMaybeUndef into the miri engineRalf Jung-5/+0
2018-09-19Add an is_marker flag to TraitDefScott McMurray-0/+1
2018-09-11Simplify Scope/ScopeData to have less chance of introducing UB or size increasesOliver Schneider-6/+9
2018-09-08Auto merge of #53903 - GabrielMajeri:opt-miri-array-slice, r=oli-obkbors-1/+1
Optimize miri checking of integer array/slices This pull request implements the optimization described in #53845 (the `E-easy` part of that issue, not the refactoring). Instead of checking every element of an integral array, we can check the whole memory range at once. r? @RalfJung
2018-09-08Auto merge of #53705 - ms2300:tmp, r=oli-obkbors-1/+1
#53576 Renaming TyAnon -> TyOpaque Fixes #53576
2018-09-08Optimize miri checking of integer array/slicesGabriel Majeri-1/+1
Instead of checking every element, we can check the whole memory range at once.
2018-09-07make field always private, add `From` implsNiko Matsakis-3/+0
2018-09-06Auto merge of #52626 - brunocodutra:issue-52475, r=oli-obkbors-1/+1
Fix issue #52475: Make loop detector only consider reachable memory As [suggested](https://github.com/rust-lang/rust/pull/51702#discussion_r197585664) by @oli-obk `alloc_id`s should be ignored by traversing all `Allocation`s in interpreter memory at a given moment in time, beginning by `ByRef` locals in the stack. - [x] Generalize the implementation of `Hash` for `EvalSnapshot` to traverse `Allocation`s - [x] Generalize the implementation of `PartialEq` for `EvalSnapshot` to traverse `Allocation`s - [x] Commit regression tests Fixes #52626 Fixes https://github.com/rust-lang/rust/issues/52849
2018-09-06Auto merge of #53721 - arielb1:exhaustively-unpun, r=nikomatsakisbors-7/+7
fix `is_non_exhaustive` confusion between structs and enums Structs and enums can both be non-exhaustive, with a very different meaning. This PR splits `is_non_exhaustive` to 2 separate functions - 1 for structs, and another for enums, and fixes the places that got the usage confused. Fixes #53549. r? @eddyb
2018-09-05Changing TyAnon -> TyOpaque and relevant functionsms2300-1/+1
2018-09-03Implement Hash in terms of HashStable for EvalSnapshotBruno Dutra-1/+1
2018-09-01move the is_field_list_non_exhaustive flag to VariantDefAriel Ben-Yehuda-7/+7
This completely splits the IS_NON_EXHAUSTIVE flag. No functional changes intended.
2018-08-29re-do argument passing one more time to finally be saneRalf Jung-1/+6
2018-08-28address nitsRalf Jung-1/+1
2018-08-27Miri Memory WorkRalf Jung-2/+3
* Unify the two maps in memory to store the allocation and its kind together. * Share the handling of statics between CTFE and miri: The miri engine always uses "lazy" `AllocType::Static` when encountering a static. Acessing that static invokes CTFE (no matter the machine). The machine only has any influence when writing to a static, which CTFE outright rejects (but miri makes a copy-on-write). * Add an `AllocId` to by-ref consts so miri can use them as operands without making copies. * Move responsibilities around for the `eval_fn_call` machine hook: The hook just has to find the MIR (or entirely take care of everything); pushing the new stack frame is taken care of by the miri engine. * Expose the intrinsics and lang items implemented by CTFE so miri does not have to reimplement them.