summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2019-01-11Rollup merge of #57483 - petrochenkov:beta, r=pietroalbiniPietro Albini-1/+1
2019-01-11use the correct supertrait substitution in `object_ty_for_trait`Ariel Ben-Yehuda-9/+24
Fixes #57156.
2019-01-10resolve: Prohibit use of imported non-macro attributesVadim Petrochenkov-1/+1
2019-01-04Call poly_project_and_unify_type on types that contain inference typesAaron Hill-2/+2
Commit f57247c48cb59 (Ensure that Rusdoc discovers all necessary auto trait bounds) added a check to ensure that we only attempt to unify a projection predicatre with inference variables. However, the check it added was too strict - instead of checking that a type *contains* an inference variable (e.g. '&_', 'MyType<_>'), it required the type to *be* an inference variable (i.e. only '_' would match). This commit relaxes the check to use 'ty.has_infer_types', ensuring that we perform unification wherever possible. Fixes #56822
2019-01-04Filter out self-referential projection predicatesAaron Hill-1/+26
If we end up with a projection predicate that equates a type with itself (e.g. <T as MyType>::Value == <T as MyType>::Value), we can run into issues if we try to add it to our ParamEnv.
2019-01-04Check all substitution parameters for inference variablesAaron Hill-3/+8
2019-01-04Ensure that Rusdoc discovers all necessary auto trait boundsAaron Hill-17/+51
Fixes #50159 This commit makes several improvements to AutoTraitFinder: * Call infcx.resolve_type_vars_if_possible before processing new predicates. This ensures that we eliminate inference variables wherever possible. * Process all nested obligations we get from a vtable, not just ones with depth=1. * The 'depth=1' check was a hack to work around issues processing certain predicates. The other changes in this commit allow us to properly process all predicates that we encounter, so the check is no longer necessary, * Ensure that we only display predicates *without* inference variables to the user, and only attempt to unify predicates that *have* an inference variable as their type. Additionally, the internal helper method is_of_param now operates directly on a type, rather than taking a Substs. This allows us to use the 'self_ty' method, rather than directly dealing with Substs.
2018-12-31Fixed minor issues raised in review.Alexander Regueiro-8/+8
2018-12-31Fixed issue #56199.Alexander Regueiro-32/+52
2018-12-31fix trait objects with a Self-having projection vaAriel Ben-Yehuda-1/+20
This follows ALT2 in the issue. Fixes #56288.
2018-12-03Rollup merge of #56438 - yui-knk:remove_not_used_DotEq_token, r=petrochenkovkennytm-1/+0
Remove not used `DotEq` token Currently libproc_macro does not use `DotEq` token. https://github.com/rust-lang/rust/pull/49545 changed libproc_macro to not generate `DotEq` token.
2018-12-02Auto merge of #56110 - varkor:inhabitedness-union-enum, r=cramertjbors-24/+23
Consider references and unions potentially inhabited during privacy-respecting inhabitedness checks It isn't settled exactly how references to uninhabited types and unions of uninhabited types should act, but we should be more conservative here, as it's likely it will be permitted to soundly have values of such types. This will also be more important in light of the changes at https://github.com/rust-lang/rust/pull/54125. cc @RalfJung
2018-12-02Remove not used `DotEq` tokenyui-knk-1/+0
Currently libproc_macro does not use `DotEq` token. https://github.com/rust-lang/rust/pull/49545 changed libproc_macro to not generate `DotEq` token.
2018-12-01Rollup merge of #56214 - scalexm:unification, r=nikomatsakiskennytm-104/+557
Implement chalk unification routines `ResolventOps` and `AggregateOps` are mostly straightforwardly translated from chalk. I had caught a few bugs already in my `chalk` branch and backported fixes to this branch, but there may be other ones left. EDIT: I hope there are none left now :) Fixes #54935.
2018-12-01Rollup merge of #56324 - Zoxc:int-ext, r=nikomatsakiskennytm-111/+74
Use raw_entry for more efficient interning Fixes https://github.com/rust-lang/rust/issues/56308#issuecomment-442492744
2018-12-01Rollup merge of #56365 - alexreg:stabilise-self_struct_ctor, r=Centrilkennytm-18/+3
Stabilize self_struct_ctor feature. [**Tracking Issue**](https://github.com/rust-lang/rust/issues/51994)
2018-12-01Rollup merge of #56355 - Zoxc:inline-things, r=michaelwoeristerkennytm-1/+55
Add inline attributes and add unit to CommonTypes
2018-12-01Rollup merge of #56339 - yui-knk:remove_mir_stats_flag, r=alexcrichtonkennytm-2/+0
Remove not used option `mir_stats` has not been used since 2b32cb90c72d90c722d56324ca0ea9f748ebf4e1.
2018-12-01Rollup merge of #56336 - nnethercote:clean-up-pp, r=nikomatsakiskennytm-29/+32
Clean up and streamline the pretty-printer Some minor improvements.
2018-12-01Rollup merge of #55821 - ljedrz:cached_key_sorts, r=michaelwoeristerkennytm-2/+2
Use sort_by_cached_key when the key function is not trivial/free I'm not 100% sure about `def_path_hash` (everything it does is inlined) but it seems like a good idea at least for the rest, as they are cloning.
2018-11-30Removed feature gate.Alexander Regueiro-16/+0
2018-11-30Statically link proc_macro into proc macros.Eduard-Mihai Burtescu-3/+2
2018-11-30proc_macro: move to a dependency of libtest.Eduard-Mihai Burtescu-1/+0
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-16/+13
(compiler front-ends).
2018-11-30Use opt_def_id instead of having special branchEsteban Küber-3/+3
2018-11-30Fix ICE with feature self_struct_ctorEsteban Küber-0/+1
2018-11-29Add inline attributes and add unit to CommonTypesJohn Kåre Alsaker-1/+55
2018-11-29Clarify undecided semanticsvarkor-0/+3
2018-11-29Consider references and unions potentially inhabited during ↵varkor-24/+20
privacy-respecting inhabitedness checks
2018-11-29Correctly generalize inference variables in `nll_relate`scalexm-11/+6
2018-11-29Fix doc commentsscalexm-5/+5
2018-11-29Implement `ResolventOps`scalexm-6/+316
2018-11-29Handle inference variables in `nll_relate` and use it for chalkscalexm-98/+246
2018-11-29Auto merge of #49878 - dlrobertson:va_list_pt0, r=eddybbors-0/+1
libcore: Add VaList and variadic arg handling intrinsics ## Summary - Add intrinsics for `va_start`, `va_end`, `va_copy`, and `va_arg`. - Add `core::va_list::VaList` to `libcore`. Part 1 of (at least) 3 for #44930 Comments and critiques are very much welcomed 😄
2018-11-29Use raw_entry for more efficient interningJohn Kåre Alsaker-111/+74
2018-11-29Rollup merge of #56257 - mark-i-m:rustc-guide-links, r=nikomatsakisGuillaume Gomez-28/+28
rustc-guide has moved to rust-lang/ r? @nikomatsakis
2018-11-29Rollup merge of #56223 - Mark-Simulacrum:self-profile-json, r=wesleywiserGuillaume Gomez-1/+1
Make JSON output from -Zprofile-json valid r? @wesleywiser cc https://github.com/rust-lang-nursery/rustc-perf/issues/299
2018-11-29Rollup merge of #56021 - RalfJung:track-features, r=oli-obkGuillaume Gomez-1/+1
avoid features_untracked The docs say to not use `features_untracked` when we have a tcx. @oli-obk any particular reason why the untracked version is used all over const qualification?
2018-11-29Remove not used optionyui-knk-2/+0
`mir_stats` has not been used since 2b32cb90c72d90c722d56324ca0ea9f748ebf4e1.
2018-11-29Use `Cow` in `Token::String`.Nicholas Nethercote-29/+32
`Printer::word` takes a `&str` and converts it into a `String`, which causes an allocation. But that allocation is rarely necessary, because `&str` is almost always a `&'static str` or a `String` that won't be used again. This commit changes `Token::String` so it holds a `Cow<'static, str>` instead of a `String`, which avoids a lot of allocations.
2018-11-27remove uses of feature gateMark Mansi-1/+0
2018-11-27Auto merge of #56251 - scalexm:root-universe, r=nikomatsakisbors-6/+12
Put all existential ty vars in the `ROOT` universe r? @nikomatsakis
2018-11-27avoid features_untrackedRalf Jung-1/+1
2018-11-27Auto merge of #56094 - RalfJung:memory-data-revived, r=oli-obkbors-100/+152
miri: Memory data revived, Hooks for stack frame push/pop r? @oli-obk
2018-11-27Use sort_by_cached_key when key the function is not trivial/freeljedrz-2/+2
2018-11-26libcore: Add va_list lang item and intrinsicsDan Robertson-0/+1
- Add the llvm intrinsics used to manipulate a va_list. - Add the va_list lang item in order to allow implementing VaList in libcore.
2018-11-27resolve: Implement edition hygiene for imports and absolute pathsVadim Petrochenkov-11/+3
Use per-span hygiene in a few other places in resolve Prefer `rust_2015`/`rust_2018` helpers to comparing editions
2018-11-26rustc-guide has movedMark Mansi-28/+28
2018-11-26Put all existential ty vars in the `ROOT` universescalexm-6/+12
2018-11-26Auto merge of #56070 - oli-obk:const_let, r=eddybbors-0/+4
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