1. 26 3月, 2021 6 次提交
    • J
      Use the direct link to the platform support page · 4590d544
      JohnTitor 提交于
      4590d544
    • B
      Auto merge of #83465 - michaelwoerister:safe-read_raw_bytes, r=cjgillot · 0ced5305
      bors 提交于
      Allow for reading raw bytes from rustc_serialize::Decoder without unsafe code
      
      The current `read_raw_bytes` method requires using `MaybeUninit` and `unsafe`. I don't think this is necessary. Let's see if a safe interface has any performance drawbacks.
      
      This is a followup to #83273 and will make it easier to rebase #82183.
      
      r? `@cjgillot`
      0ced5305
    • B
      Auto merge of #82873 - GuillaumeGomez:rustdoc-const-ty, r=jyn514 · 3debe9ac
      bors 提交于
      Rework rustdoc const type
      
      This PR is mostly about two things:
       1. Not storing some information in the `clean::Constant` type
       2. Using `TyCtxt` in the formatting (which we will need in any case as we move forward in any case).
      
      Also: I'm very curious of the perf change in here.
      
      Thanks a lot `@danielhenrymantilla` for your `Captures` idea! It allowed me to solve the lifetime issue completely. :)
      
      r? `@jyn514`
      3debe9ac
    • B
      Auto merge of #82743 - jackh726:resolve-refactor, r=nikomatsakis · 52e3dffa
      bors 提交于
      Refactor rustc_resolve::late::lifetimes to resolve per-item
      
      There are some changes to tests that I'd like some feedback on; so this is still WIP.
      
      The reason behind this change will (hopefully) allow us to (as part of #76814) be able to essentially use the lifetime resolve code to resolve *all* late bound vars (including those of super traits). Currently, it only resolves those that are *syntactically* in scope. In #76814, I'm essentially finding that I would essentially have to redo the passing of bound vars through scopes (i.e. when instantiating a poly trait ref), and that's what this code does anyways. However, to be able to do this (ask super traits what bound vars are in scope), we have to be able to resolve items separately.
      
      The first commit is actually partially orthogonal. Essentially removing one use of late bound debruijn indices.
      
      Not exactly sure who would be best to review here.
      Let r? `@nikomatsakis`
      52e3dffa
    • J
      Bless nll test · 44e9d201
      Jack Huey 提交于
      44e9d201
    • B
      Auto merge of #83424 - cjgillot:noparam, r=lcnr · cb473c2c
      bors 提交于
      GenericParam does not need to be a HIR owner.
      
      The special case is not required.
      
      Universal impl traits design to regular generic parameters, and their content is owned by the enclosing item.
      
      Existential (and opaque) impl traits generate their own enclosing item, and are collected through it.
      cb473c2c
  2. 25 3月, 2021 29 次提交
  3. 24 3月, 2021 5 次提交
    • B
      Auto merge of #83364 - sexxi-goose:fix-83176, r=nikomatsakis · f5fe425c
      bors 提交于
      2229 migration: Don't try resolve regions before writeback
      
      In the analysis use `resolve_vars_if_possible` instead of `fully_resolve`,
      because we might not have performed regionck yet.
      
      Fixes: #83176
      
      r? `@nikomatsakis`
      f5fe425c
    • D
      Use intra-doc link in core::cell · c0fe54fe
      Deadbeef 提交于
      c0fe54fe
    • B
      Auto merge of #83050 - osa1:issue83048, r=matthewjasper · 2e012ce6
      bors 提交于
      Run analyses before thir-tree dumps
      
      Fixes #83048
      2e012ce6
    • B
      Auto merge of #83408 - ijackson:expose-splitinclusive, r=dtolnay · 680d9fca
      bors 提交于
      Expose str::SplitInclusive in alloc and therefore in std
      
      This seems to have been omitted from the beginning when this feature was first introduced in 86bf9629.  Most users won't need to name this type which is probably why this wasn't noticed in the meantime.
      
      See #83372 for a different but related bug.
      
      ### Notes for reviewers
      
      I think I have got this right but TBH I am not very familiar with the relationship between core and std and so on.  <strike>I also haven't don't any kind of test (not even a build) yet.  I will do a local docs build to see that the type now appears in the std docs.</strike>  I did a local docs build and it has made this type appear as `std::str::SplitInclusive` as expected
      
      The linkification of the return value from `str::split_inclusive` teleports me to the online url for `core::str::SplitInclusive`.  I think this may be a rustdoc anomaly (similar to #79630 maybe) but I am not sure.  Perhaps it means I haven't done the `std` -> `core` referrence correctly.
      
      I made this insta-stable since it seems like simply a bug.  Please LMK if that is not right.  *(edited to add:)* In particular, IDK how this ought to relate to the (?)current release process.
      680d9fca
    • B
      Auto merge of #75384 - JulianKnodt:cg_def, r=varkor,lcnr · 5b33de33
      bors 提交于
      implement `feature(const_generics_defaults)`
      
      Implements const generics defaults `struct Example<const N: usize=3>`, as well as a query for getting the default of a given const-parameter's def id. There are some remaining FIXME's but they were specified as not blocking for merging this PR. This also puts the defaults behind the unstable feature gate `#![feature(const_generics_defaults)]`.
      
      ~~This currently creates a field which is always false on `GenericParamDefKind` for future use when
      consts are permitted to have defaults. I'm not sure if this is exactly what is best for adding default parameters, but I mimicked the style of type defaults, so hopefully this is ok.~~
      
      r? `@lcnr`
      5b33de33