about summary refs log tree commit diff
path: root/src/librustc/ich/impls_ty.rs
AgeCommit message (Collapse)AuthorLines
2019-03-13Use derive macro for HashStableJohn Kåre Alsaker-1050/+0
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-5/+0
2019-03-05Implement Hash for new typesvarkor-0/+27
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-27Rename variadic to c_variadicDan Robertson-1/+1
Function signatures with the `variadic` member set are actually C-variadic functions. Make this a little more explicit by renaming the `variadic` boolean value, `c_variadic`.
2019-02-24Rollup merge of #58511 - oli-obk:const_to_op, r=RalfJungMazdak Farrokhzad-1/+1
Const to op simplification r? @RalfJung alternative to https://github.com/rust-lang/rust/pull/58486
2019-02-19Auto merge of #57896 - oli-obk:permissive_existence, r=cramertjbors-0/+5
Be more permissive with required bounds on existential types fixes #54184 r? @pnkfelix
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-1/+1
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-0/+4
2019-02-05move librustc to 2018Mark Mansi-26/+28
2019-02-01Restrict concrete types to equivalent typesOliver Scherer-0/+5
2019-01-27`ConstValue::ScalarPair` only needs to represent slicesOliver Scherer-1/+1
2019-01-19Handle lifetime annotations in unreachable codeMatthew Jasper-1/+1
We equate the type in the annotation with the inferred type first so that we have a fully inferred type to perform the well-formedness check on.
2019-01-19Use a struct for user type annotationsMatthew Jasper-0/+6
2019-01-19Rename UserTypeAnnotation -> UserTypeMatthew Jasper-3/+3
2019-01-05Rollup merge of #57219 - matthewjasper:mir-cleanup, r=nikomatsakiskennytm-16/+0
Remove some unused code Closes #57096
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-1/+5
2018-12-30Refactor `UserTypeAnnotation`.David Wood-0/+26
This commit refactors the `UserTypeAnnotation` type to be referred to by an index within `UserTypeProjection`. `UserTypeAnnotation` is instead kept in an `IndexVec` within the `Mir` struct. Further, instead of `UserTypeAnnotation` containing canonicalized types, it now contains normal types and the entire `UserTypeAnnotation` is canonicalized. To support this, the type was moved from the `rustc::mir` module to `rustc::ty` module.
2018-12-29Remove unused types from rustc::mir::interpretMatthew Jasper-16/+0
The types are no longer used with the change to stacked borrows for validation.
2018-12-27Handle sub-typing in chalk-enginescalexm-0/+4
2018-12-27Integrate chalk enginescalexm-0/+7
2018-12-27Add a def-id in `ty::ParamEnv`scalexm-1/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-03s/AllocType/AllocKind/Oliver Scherer-1/+1
2018-12-03Monomorphize `AllocType`Oliver Scherer-1/+1
2018-11-26Auto merge of #56070 - oli-obk:const_let, r=eddybbors-0/+1
Allow assignments in const contexts fixes https://github.com/rust-lang/rust/issues/54098 fixes https://github.com/rust-lang/rust/issues/51251 fixes https://github.com/rust-lang/rust/issues/52613
2018-11-24Move `BoundTy` debruijn index to the `TyKind` enum variantscalexm-1/+2
2018-11-24Handle placeholder types in canonicalizationscalexm-1/+2
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-0/+3
2018-11-19Make const_eval_raw query return just an AllocIdRalf Jung-0/+4
2018-11-19Also catch static mutation at evaluation timeOliver Scherer-0/+1
2018-11-19Rollup merge of #55970 - RalfJung:miri-backtrace, r=@oli-obkPietro Albini-3/+3
Miri backtrace improvements Nicer pretty-printing of the `RUST_CTFE_BACKTRACE`-backtraces: ``` 0: backtrace::backtrace::libunwind::trace::hc410fcb66fe85b11 at /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.9/src/backtrace/libunwind.rs:53 backtrace::backtrace::trace::h2106294a22648407 at /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.9/src/backtrace/mod.rs:42 1: backtrace::capture::Backtrace::new_unresolved::h5d8d98b993d092ba at /home/r/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.9/src/capture.rs:88 2: <rustc::mir::interpret::error::EvalError<'tcx> as core::convert::From<rustc::mir::interpret::error::EvalErrorKind<'tcx, u64>>>::from::h6355269b2a661412 at librustc/mir/interpret/error.rs:236 3: <T as core::convert::Into<U>>::into::h70fcb917509539bd at /home/r/src/rust/rustc.2/src/libcore/convert.rs:455 4: <rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, miri::Evaluator<'tcx>> as miri::fn_call::EvalContextExt<'tcx, 'mir>>::emulate_foreign_item::h9cde0e3ce7455a4a at src/fn_call.rs:292 5: <rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, miri::Evaluator<'tcx>> as miri::fn_call::EvalContextExt<'tcx, 'mir>>::find_fn::h83f89524b9d1a49a at src/fn_call.rs:74 6: <miri::Evaluator<'tcx> as rustc_mir::interpret::machine::Machine<'a, 'mir, 'tcx>>::find_fn::hf9980473c4775f0c at src/lib.rs:345 rustc_mir::interpret::terminator::<impl rustc_mir::interpret::eval_context::EvalContext<'a, 'mir, 'tcx, M>>::eval_fn_call::h401dec4a687f96e9 at /home/r/src/rust/rustc.2/src/librustc_mir/interpret/terminator.rs:285 ``` Indentation is now consistent with `RUST_BACKTRACE`, and the frame number is not repeated when there are multiple symbols for a frame. Also preserve the `ty::Instance` for the internal backtrace (showing which frames in the user code where on the interpreter stack when the error happened), used by miri to avoid printing spans for libstd internals: ``` error[E0080]: constant evaluation error: the evaluated program panicked --> /home/r/src/rust/rustc.2/src/libstd/panicking.rs:525:9 | 525 | __rust_start_panic(obj as usize) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked | = note: inside call to `std::panicking::rust_panic` at /home/r/src/rust/rustc.2/src/libstd/panicking.rs:496:5 = note: inside call to `std::panicking::rust_panic_with_hook` at /home/r/src/rust/rustc.2/src/libstd/panicking.rs:390:5 = note: inside call to `std::panicking::continue_panic_fmt` at /home/r/src/rust/rustc.2/src/libstd/panicking.rs:345:5 note: inside call to `std::rt::begin_panic_fmt` at <::std::macros::panic macros>:8:1 --> tests/compile-fail/panic.rs:4:5 | 4 | assert_eq!(5, 6); | ^^^^^^^^^^^^^^^^^ = note: inside call to `main` at /home/r/src/rust/rustc.2/src/libstd/rt.rs:74:34 = note: inside call to closure at /home/r/src/rust/rustc.2/src/libstd/rt.rs:59:75 = note: inside call to closure at /home/r/src/rust/rustc.2/src/libstd/sys_common/backtrace.rs:136:5 = note: inside call to `std::sys_common::backtrace::__rust_begin_short_backtrace::<[closure@DefId(1/1:1913 ~ std[78f0]::rt[0]::lang_start_internal[0]::{{closure}}[0]::{{closure}}[0]) 0:&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe], i32>` at /home/r/src/rust/rustc.2/src/libstd/rt.rs:59:13 = note: inside call to closure at /home/r/src/rust/rustc.2/src/libstd/panicking.rs:310:40 = note: inside call to `std::panicking::try::do_call::<[closure@DefId(1/1:1912 ~ std[78f0]::rt[0]::lang_start_internal[0]::{{closure}}[0]) 0:&&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe], i32>` at /home/r/src/rust/rustc.2/src/libstd/panicking.rs:306:5 = note: inside call to `std::panicking::try::<i32, [closure@DefId(1/1:1912 ~ std[78f0]::rt[0]::lang_start_internal[0]::{{closure}}[0]) 0:&&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe]>` at /home/r/src/rust/rustc.2/src/libstd/panic.rs:398:9 = note: inside call to `std::panic::catch_unwind::<[closure@DefId(1/1:1912 ~ std[78f0]::rt[0]::lang_start_internal[0]::{{closure}}[0]) 0:&&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe], i32>` at /home/r/src/rust/rustc.2/src/libstd/rt.rs:58:25 = note: inside call to `std::rt::lang_start_internal` at /home/r/src/rust/rustc.2/src/libstd/rt.rs:74:5 = note: inside call to `std::rt::lang_start::<()>` ``` Also notice that we show filenames and line numbers here now. r? @oli-obk
2018-11-19Rollup merge of #55953 - blitzerr:master, r=nikomatsakisPietro Albini-1/+3
#53488 Refactoring UpvarId
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