1. 03 10月, 2015 3 次提交
    • A
      use the correct subtyping order in a test · 2f23e171
      Ariel Ben-Yehuda 提交于
      also, ensure that callers are checked.
      2f23e171
    • A
      fix fallout · ce702072
      Ariel Ben-Yehuda 提交于
      looks like some mix of #18653 and `projection_must_outlive`, but
      that needs to be investigated further (crater run?)
      ce702072
    • A
      ensure that the types of methods are well-formed · 603a75c8
      Ariel Ben-Yehuda 提交于
      By RFC1214:
      Before calling a fn, we check that its argument and return types are WF. This check takes place after all higher-ranked lifetimes have been instantiated. Checking the argument types ensures that the implied bounds due to argument types are correct. Checking the return type ensures that the resulting type of the call is WF.
      
      The previous code only checked the trait-ref, which was not enough
      in several cases.
      
      As this is a soundness fix, it is a [breaking-change].
      
      Fixes #28609
      603a75c8
  2. 02 10月, 2015 1 次提交
    • B
      Auto merge of #28742 - nikomatsakis:def-id-encapsulate, r=eddyb · e82faeb6
      bors 提交于
      As described in https://github.com/rust-lang/rfcs/pull/1298, the idea here is to make DefIds independent of changes to the content of other items. They are also *mostly* independent from ordering, so e.g. reordering two functions will change the defids, but it will not change the paths that they expand into (but this is not the case for some things, such as impls).
      
      This is a major refactoring, so I did it in slices. The final commit is in some sense The Big One where most of the work is done. The earlier commits just pave the way by gradually refactoring accesses to the `node` field.
      
      This is a [breaking-change] for plugin authors. The things you need to do to migrate your code are as follows:
      
      1. For local def-ids, rather than do `def_id.node`, call `tcx.map.as_local_node_id(def_id)`.
      2. To construct a local def-id, call `tcx.map.local_def_id(node_id)`.
      3. Note that you cannot make def-ids for any node, but only for "definitions" -- which include all items, as well as a number of other things, but not e.g. arbitrary expressions.
      4. You can get the path to a def-id by calling `tcx.def_path(def_id)`.
      
      One thing that is NOT part of this PR, but which I plan do in a follow-up, is converting uses of the existing `with_path` API to use `def_path`, which is basically the same.
      
      r? @EddyB (or @nrc)
      e82faeb6
  3. 01 10月, 2015 36 次提交