about summary refs log tree commit diff
path: root/src/librustc/traits/specialize
AgeCommit message (Collapse)AuthorLines
2019-04-05Introduce an arena type which may be used to allocate a list of types with ↵John Kåre Alsaker-10/+8
destructors
2019-03-15rustc: print elided regions as '_ instead of nothing, and use a separate ↵Eduard-Mihai Burtescu-1/+1
check when optional.
2019-03-15rustc: always rely on '_ to be not printed by ty::Region itself.Eduard-Mihai Burtescu-1/+1
2019-03-01ty: HirIdify some lintsljedrz-2/+2
2019-02-27rename Substs to InternalSubstscsmoe-2/+2
Change-Id: I3fa00e999a2ee4eb72db1fdf53a8633b49176a18
2019-02-26replace &'tcx Substs with SubstsRefcsmoe-6/+6
2019-02-10rustc: doc commentsAlexander Regueiro-6/+6
2019-02-05move librustc to 2018Mark Mansi-15/+15
2019-01-04implement a hack to make traitobject 0.1.0 compileAriel Ben-Yehuda-12/+53
2019-01-04Revert "add coherence future-compat warnings for marker-only trait objects"Ariel Ben-Yehuda-55/+9
This reverts commit 760639635facb6c9a0926ac9278bcba71880b0b3.
2019-01-02try to detect affected code and direct people to #56105Niko Matsakis-0/+7
2018-12-25Remove licensesMark Rousskov-20/+0
2018-12-18Auto merge of #56481 - arielb1:dynamic-order, r=nikomatsakisbors-9/+55
add coherence future-compat warnings for marker-only trait objects The future-compat warnings break code that assumes that `dyn Send + Sync != dyn Sync + Send`, and are the first step in making them equal. cc #33140. Note: this lint should be made to default-warn before we merge. It is deny only for the crater run. r? @nikomatsakis / @scalexm . cc @Centril & @alexreg.
2018-12-14add coherence future-compat warnings for marker-only trait objectsAriel Ben-Yehuda-9/+55
The future-compat warnings break code that assumes that `dyn Send + Sync != dyn Sync + Send`, and are the first step in making them equal. cc #33140. It should be possible to revert this commit when we're done with the warnings.
2018-12-12specialize: remove Boxes used by Children::insertljedrz-8/+33
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-28/+29
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-1/+1
2018-12-03pass the parameter environment to `traits::find_associated_item`Ariel Ben-Yehuda-1/+11
dropping the param-env on the floor is obviously the wrong thing to do. The ICE was probably exposed by #54490 adding the problem-exposing use of `traits::find_associated_item`. Fixes #55380.
2018-11-26rustc-guide has movedMark Mansi-1/+1
2018-11-15Auto merge of #55974 - pietroalbini:rollup, r=pietroalbinibors-1/+1
Rollup of 17 pull requests Successful merges: - #55182 (Redox: Update to new changes) - #55211 (Add BufWriter::buffer method) - #55507 (Add link to std::mem::size_of to size_of intrinsic documentation) - #55530 (Speed up String::from_utf16) - #55556 (Use `Mmap` to open the rmeta file.) - #55622 (NetBSD: link libstd with librt in addition to libpthread) - #55750 (Make `NodeId` and `HirLocalId` `newtype_index`) - #55778 (Wrap some query results in `Lrc`.) - #55781 (More precise spans for temps and their drops) - #55785 (Add mem::forget_unsized() for forgetting unsized values) - #55852 (Rewrite `...` as `..=` as a `MachineApplicable` 2018 idiom lint) - #55865 (Unix RwLock: avoid racy access to write_locked) - #55901 (fix various typos in doc comments) - #55926 (Change sidebar selector to fix compatibility with docs.rs) - #55930 (A handful of hir tweaks) - #55932 (core/char: Speed up `to_digit()` for `radix <= 10`) - #55956 (add tests for some fixed ICEs) Failed merges: r? @ghost
2018-11-15Auto merge of #54906 - qnighy:fix-issue-50452, r=nikomatsakisbors-8/+19
Reattach all grandchildren when constructing specialization graph. Specialization graphs are constructed by incrementally adding impls in the order of declaration. If the impl being added has its specializations in the graph already, they should be reattached under the impl. However, the current implementation only reattaches the one found first. Therefore, in the following specialization graph, ``` Tr1 | I3 / \ I1 I2 ``` If `I1`, `I2`, and `I3` are declared in this order, the compiler mistakenly constructs the following graph: ``` Tr1 / \ I3 I2 | I1 ``` This patch fixes the reattach procedure to include all specializing grandchildren-to-be. Fixes #50452.
2018-11-14Wrap some query results in `Lrc`.Nicholas Nethercote-1/+1
So that the frequent clones in `try_get` are cheaper. Fixes #54274.
2018-11-12Avoid the Box in `TyCtxt::associated_items`.Niko Matsakis-1/+1
This reduces instruction counts on packed_simd by 2%.
2018-11-06Elide anon lifetimes in conflicting impl noteEsteban Küber-1/+4
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-21/+1
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-1/+1
2018-10-08Reattach all grandchildren when constructing specialization graph.Masaki Hara-8/+19
This commit fixes the issue #50452.
2018-10-04rename skolemized to placeholderNiko Matsakis-1/+1
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-3/+3
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-09-28rustc: keep a Span for each predicate in ty::GenericPredicates.Eduard-Mihai Burtescu-1/+1
2018-09-18A few cleanups and minor improvements to rustc/traitsljedrz-18/+20
2018-08-22Remove Ty prefix from Ty{Foreign|Param}varkor-1/+1
2018-08-19mv codemap() source_map()Donato Sciarra-2/+2
2018-08-18Use the new Entry::or_default method where possible.Eduard-Mihai Burtescu-16/+8
2018-07-30Auto merge of #52805 - ljedrz:format_str_literal, r=petrochenkovbors-1/+1
Don't format!() string literals Prefer `to_string()` to `format!()` take 2, this time targetting string literals. In some cases (`&format!("...")` -> `"..."`) also removes allocations. Occurences of `format!("")` are changed to `String::new()`.
2018-07-29Replace push loops with collect() and extend() where possibleljedrz-3/+3
2018-07-28Auto merge of #52546 - nikomatsakis:issue-52050, r=pnkfelixbors-21/+78
do not overwrite child def-id in place but rather remove/insert When inserting a node N into the tree of impls, we sometimes find than an existing node C should be replaced with N. We used to overwrite C in place with the new def-id N -- but since the lists of def-ids are separated by simplified type, that could lead to N being inserted in the wrong place. This meant we might miss conflicts. We are now not trying to be so smart -- we remove C and then add N later. Fixes #52050 r? @aturon -- do you still remember this code at all? :)
2018-07-28Don't format!() string literalsljedrz-1/+1
2018-07-25Add type system canaries for potential future bugsOliver Schneider-1/+5
2018-07-23Implement associated existential typesOliver Schneider-3/+9
2018-07-21do not overwrite child def-id in place but rather remove/insertNiko Matsakis-21/+78
When inserting a node N into the tree of impls, we sometimes find than an existing node C should be replaced with N. We used to overwrite C in place with the new def-id N -- but since the lists of def-ids are separated by simplified type, that could lead to N being inserted in the wrong place. This meant we might miss conflicts. We are now not trying to be so smart -- we remove C and then add N later.
2018-06-28Use `Ident`s for associated item definitions in HIRVadim Petrochenkov-4/+4
Remove emulation of hygiene with gensyms
2018-06-28Use `Ident`s for associated type bindings in HIRVadim Petrochenkov-1/+1
2018-06-24Update broken rustc-guide linksAlex Kitchens-1/+1
Recently, there has been some rearrangement of the content in the Rustc Guide, and this commit changes the urls the match the updated guide.
2018-05-12Better error reporting in Copy deriveleonardo.yvens-0/+1
In Copy derive, report all fulfillment erros when present and do not report errors for types tainted with `TyErr`. Also report all fields which are not Copy rather than just the first. Also refactored `fn fully_normalize`, removing the not very useful helper function along with a FIXME to the closed issue #26721 that's looks out of context now.
2018-03-29Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakisbors-1/+1
Remove universes from `ty::ParamEnv` This change was never meant to land. #48407 takes an alternate approach. However, that PR is now blocked on some issues with canonicalization, and rebasing these reverts gets harder each time, so let's just get this bit out of the way now. r? @nikomatsakis
2018-03-23Revert "add universes to type inference variables"Sean Griffin-1/+1
This reverts commit 13efaf0481275dba18f1d18f4b59b664b2d2031a.
2018-03-23import trait engine to typeckcsmoe-1/+1
2018-03-21work around fallout from these changes in rustcNiko Matsakis-6/+12
2018-03-14Cache the specialization_graph queryWesley Wiser-0/+2
Fixes #48987