summary refs log tree commit diff
path: root/src/librustc/traits
AgeCommit message (Collapse)AuthorLines
2018-06-01change `PointerKind::Implicit` to a noteNiko Matsakis-6/+25
`PointerKind` is included in `LoanPath` and hence forms part of the equality check; this led to having two unequal paths that both represent `*x`, depending on whether the `*` was inserted automatically or explicitly. Bad mojo. The `note` field, in contrast, is intended more-or-less primarily for this purpose of adding extra data.
2018-04-28Don't ICE on tuple struct ctor with incorrect arg countEsteban Küber-0/+6
2018-04-27improved debug outputNiko Matsakis-3/+9
2018-04-20do not propagate `Err` when determing causal infoNiko Matsakis-19/+43
In intercrate mode, if we determine that a particular `T: Trait` is unknowable, we sometimes also go and get extra causal information. An errant `?` was causing us to propagate an error found in that process out as if `T: Trait` was not unknowable but rather not provable. This led to an ICE.
2018-04-20Use InternedString instead of Symbol for type parameters.Michael Woerister-2/+2
2018-03-31Auto merge of #49201 - Phlosioneer:add-trivial-size-hints, r=SimonSapinbors-0/+5
Implement some trivial size_hints for various iterators This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in #23708. I intend to do more, but I don't want to make the PR too large.
2018-03-29Auto merge of #49313 - sgrif:sg-revert-stuff, r=nikomatsakisbors-26/+9
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-27Auto merge of #49202 - csmoe:trait_engine, r=nikomatsakisbors-76/+153
Introduce trait engine address #48895 step 1: introduce trait engine
2018-03-25Rollup merge of #49299 - SimonSapin:ubiquity, r=nikomatsakiskennytm-8/+3
Stabilize the copy_closures and clone_closures features In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do. Tracking issue: https://github.com/rust-lang/rust/issues/44490
2018-03-25Rollup merge of #49162 - tmandry:stabilize-termination-trait, r=nikomatsakiskennytm-9/+12
Stabilize termination_trait, split out termination_trait_test For #48453. First time contribution, so I'd really appreciate any feedback on how this PR can be better. Not sure exactly what kind of documentation update is needed. If there is no PR to update the reference, I can try doing that this week as I have time.
2018-03-23Revert "add universes to type inference variables"Sean Griffin-21/+7
This reverts commit 13efaf0481275dba18f1d18f4b59b664b2d2031a.
2018-03-23Revert "introduce `UniverseIndex` into `ParamEnv`"Sean Griffin-5/+2
This reverts commit d4df52cacbee5d95e912a43188192a5054d36b4f.
2018-03-23Rename variables in rustc’s SelectionContext::copy_clone_conditionsSimon Sapin-4/+3
2018-03-23Rollup merge of #49262 - oli-obk:fixed_size_array_len, r=estebankAlex Crichton-3/+13
Produce nice array lengths on a best effort basis fixes #49208 r? @estebank
2018-03-23Rollup merge of #49030 - Zoxc:misc, r=michaelwoeristerAlex Crichton-6/+6
Misc changes from my parallel rustc branch r? @michaelwoerister
2018-03-23Stabilize the copy_closures and clone_closures featuresSimon Sapin-6/+2
In addition to the `Fn*` family of traits, closures now implement `Copy` (and similarly `Clone`) if all of the captures do.
2018-03-23move the defaut object lifetime bound into the traitNiko Matsakis-2/+2
This way, we don't have to repeat it.
2018-03-23apply rustfmtNiko Matsakis-14/+16
2018-03-23fix `Self`Niko Matsakis-2/+1
2018-03-23import trait engine to typeckcsmoe-19/+22
2018-03-23introduce trait engine modcsmoe-75/+148
2018-03-22Produce nice array lengths on a best effort basisOliver Schneider-3/+13
2018-03-21termination_trait: Make error message more helpfulTyler Mandry-9/+7
2018-03-21termination_trait: Put examples in error help, not labelTyler Mandry-9/+14
2018-03-21work around fallout from these changes in rustcNiko Matsakis-6/+12
2018-03-20Implement some trivial size_hints for various iteratorsPhlosioneer-0/+5
This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in #23708.
2018-03-20Rollup merge of #49004 - wesleywiser:incr_specialization_graph_query, ↵kennytm-0/+2
r=michaelwoerister Cache the specialization_graph query Fixes #48987 r? @michaelwoerister
2018-03-20Rollup merge of #48834 - ysiraichi:suggest-remove-ref, r=estebankkennytm-0/+49
Suggest removing `&`s This implements the error message discussed in #47744. We check whether removing each `&` yields a type that satisfies the requested obligation. Also, it was created a new `NodeId` field in `ObligationCause` in order to iterate through the `&`s. The way it's implemented now, it iterates through the obligation snippet and counts the number of `&`. r? @estebank
2018-03-19Auto merge of #49091 - nikomatsakis:issue-49043-ty-infer-hash, ↵bors-0/+1
r=michaelwoerister extend stable hasher to support `CanonicalTy` Fixes #49043 r? @michaelwoerister
2018-03-18Cleaned comments and extras s.Yukio Siraichi-38/+0
2018-03-18Review fixes.Yukio Siraichi-5/+6
- `span_suggestion` changed to `span_suggestion_short`; - `Span` used changed to contain only `&` refs; - Tests passing.
2018-03-18Reporting with `span_suggestion_short`.Yukio Siraichi-15/+5
2018-03-18Keeping code formatting.Yukio Siraichi-3/+8
Suggesting snippet without changing the original formatting of the code.
2018-03-18Review fixes.Yukio Siraichi-5/+9
- `suggest_snippet` handling space between refs; - Suggest message changing according to the number of refs that should be removed.
2018-03-18Refactored with high-order functions.Yukio Siraichi-21/+21
2018-03-18Auto merge of #48985 - scalexm:lowering, r=nikomatsakisbors-0/+199
MVP for chalkification r? @nikomatsakis
2018-03-17Replace Rc with LrcJohn Kåre Alsaker-6/+6
2018-03-17Add span_suggestion while removing TyRefs based on the snippet String.Yukio Siraichi-0/+87
2018-03-16extend stable hasher to support `CanonicalTy`Niko Matsakis-0/+1
2018-03-15Auto merge of #48138 - estebank:issue-45092, r=nikomatsakisbors-14/+17
Reword E0044 and message for `!Send` types - Reword E0044 help. - Change error message for types that don't implement `Send` CC #45092, #46678, #24909, #33307.
2018-03-14Suggest using `move` when trying to share `...::channel::{Receiver, Sender}`Esteban Küber-14/+17
Extend `rustc_on_unimplemented` to match on ADT without evaluating type arguments.
2018-03-14Cache the specialization_graph queryWesley Wiser-0/+2
Fixes #48987
2018-03-14Add documentationscalexm-0/+12
2018-03-14Move code into librustc_traitsscalexm-174/+0
2018-03-14Address niko's nitsscalexm-153/+128
2018-03-14Add MVP for chalkificationscalexm-0/+386
2018-03-14Fixes after rebaseAndrew Cann-1/+1
2018-03-14Fix fallback noteAndrew Cann-9/+10
2018-03-14Add note about fallback to `!: !Trait` errorAndrew Cann-6/+41
2018-03-14remove defaulting to unitAndrew Cann-60/+13
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple