Skip to content
Tree: ee36cfaff9
Commits on Aug 11, 2019
  1. Auto merge of #63413 - RalfJung:miri, r=oli-obk

    bors committed Aug 11, 2019
    update Miri
    With #63404 landed, we need rust-lang/miri#898 to avoid failures in
    r? @oli-obk
Commits on Aug 10, 2019
  1. Auto merge of #63250 - petrochenkov:descrate, r=davidtwco

    bors committed Aug 10, 2019
    diagnostics: Describe crate root modules in `DefKind::Mod` as "crate"
    Or we can use "extern crate" like resolve previously did sometimes, not sure.
    r? @davidtwco
  2. Update cargo

    petrochenkov committed Aug 10, 2019
  3. Auto merge of #62955 - Mark-Simulacrum:rustdoc-clean-1, r=eddyb

    bors committed Aug 10, 2019
    rustdoc: general cleanups
    This is purely a refactoring, mostly just simplifying some of the code. Commits are best reviewed individually.
  4. Auto merge of #63437 - Centril:rollup-ryx881p, r=Centril

    bors committed Aug 10, 2019
    Rollup of 4 pull requests
    Successful merges:
     - #63400 (Try to break resolve into more isolated parts)
     - #63425 (Cleanup historical stability comments)
     - #63429 (.gitignore: Readd `/tmp/`)
     - #63432 (Cleanup & Simplify stuff in lowering)
    Failed merges:
    r? @ghost
  5. Rollup merge of #63432 - Centril:simplify-lowering, r=eddyb

    Centril committed Aug 10, 2019
    Cleanup & Simplify stuff in lowering
    Closes #60253 as a byproduct.
    It turns out that it is in fact necessary to have a `DropTemps(...)` around the `match_expr` and there is a test ( which fails without that.
    r? @eddyb
  6. Rollup merge of #63429 - rust-lang:gitignore-readd-tmp, r=Mark-Simula…

    Centril committed Aug 10, 2019
    .gitignore: Readd `/tmp/`
    Specifically, `/tmp/partitioning-tests/` it is generated by the incremental tests, These are cleaned up by compiletest but not if you kill testing prematurely (which I just did to test out a rollup, and it is annoying to `rm -rf tmp/`).
    r? @Mark-Simulacrum
    cc @RalfJung
  7. Rollup merge of #63425 - Mark-Simulacrum:clean-stability-doc, r=eddyb

    Centril committed Aug 10, 2019
    Cleanup historical stability comments
    These weren't removed by ccbcc72 most likely by accident,
    let's clean them up now.
  8. Rollup merge of #63400 - petrochenkov:resplit, r=eddyb

    Centril committed Aug 10, 2019
    Try to break resolve into more isolated parts
    Some small step towards resolve librarification.
    "Late resolution" is the pass that resolves most of names in a crate beside imports and macros.
    It runs when the crate is fully expanded and its module structure is fully built.
    So we just walk through the crate and resolve all the expressions, types, etc.
    This pass is pretty self-contained, but it was previously done by implementing `Visitor` on the whole `Resolver` (which is used for many other tasks), and fields specific to this pass were indiscernible from the global `Resolver` state.
    This PR moves the late resolution pass into a separate visitor and a separate file, fields specific to this visitor are moved from `Resolver` as well.
    I'm especially happy about `current_module` being removed from `Resolver`.
    It was used even for operations not related to visiting and changing the `current_module` position in process.
    It was also used as an implicit argument for some functions used in this style
    let orig_current_module = mem::replace(&mut self.current_module, module);
    self.current_module = orig_current_module;
    and having effects on e.g. privacy checking somewhere deeply inside `resolve_ident_somewhere`.
    Now we explicitly pass a `ParentScope` to those functions instead, which includes the module and some other data describing our position in the crate relatively to which we resolve names.
    Rustdoc was one of the users of `current_module`, it set it for resolving intra-doc links.
    Now it passes it explicitly as an argument as well (I also supported resolving paths from rustdoc in unnamed blocks as a drive-by fix).
    Visibility resolution is also changed to use early resolution (which is correct because it's used during the work of `BuildReducedGraphVisitor`, i.e. integration of a new AST fragment into the existing partially built module structures.) instead of untimely late resolution (which worked only due to restrictions on paths in visibilities like inability to refer to anything except ancestor modules).
    This slightly regresses its diagnostics because late resolution has a more systematic error detection and recovery currently.
    Due to changes in `current_module` and visibilities `BuildReducedGraphVisitor` ended up almost as heavily affected by this refactoring as late resolution.
    Fixes #63223 (due to visibility resolution changes).
  9. Implement Clean<Crate> on hir::Crate directly

    Mark-Simulacrum committed Aug 10, 2019
  10. Make exact_paths a non-optional field on RustdocVisitor

    Mark-Simulacrum committed Jul 24, 2019
    Also privatizes needlessly public methods to enforce which methods
    callers are intended to call, i.e., only `new` and `visit`.
  11. Represent ownership transfer in RustdocVisitor::visit

    Mark-Simulacrum committed Jul 24, 2019
    Previously visit could be called multiple times, but this is inaccurate,
    as it deconstructs Visitor state.
  12. resolve: Address FIXME from the previous commit

    petrochenkov committed Aug 9, 2019
    Make the `is_import` flag in `ScopeSet` independent from namespace
    Fix rebase
  13. Cleanup & Simplify stuff in lowering.

    Centril committed Aug 10, 2019
  14. Fix calls to resolver from rustdoc and HIR lowering

    petrochenkov committed Aug 8, 2019
    Cleanup some surrounding code.
    Support resolution of intra doc links in unnamed block scopes.
    (Paths from rustdoc now use early resolution and no longer need results of late resolution like all the built ribs.)
    Fix one test hitting file path limits on Windows.
  15. resolve: Move some more code around

    petrochenkov committed Aug 8, 2019
    Move methods logically belonging to build-reduced-graph into `impl BuildReducedGraphVisitor` and ``
    Move types mostly specific to late resolution closer to the late resolution visitor
  16. resolve: Turn `resolve_error` into a method on `Resolver`

    petrochenkov committed Aug 8, 2019
    Rename it to `report_error` and move into ``
    Also turn `check_unused` into a method on `Resolver`
  17. resolve: Remove `Deref<Target=Resolver>` implementations

    petrochenkov committed Aug 8, 2019
    It's now immediately clear what fields belong to the global resolver state and what are specific to passes/visitors.
  18. resolve: Track whole parent scope in the visitors

    petrochenkov committed Aug 8, 2019
    Instead of tracking current module and other components separately.
    (`ParentScope` includes the module as a component.)
  19. resolve: Move late resolution into a separate visitor

    petrochenkov committed Aug 5, 2019
    Move `Resolver` fields specific to late resolution to the new visitor.
    The `current_module` field from `Resolver` is replaced with two `current_module`s in `LateResolutionVisitor` and `BuildReducedGraphVisitor`.
    Outside of those visitors `current_module` is replaced by passing `parent_scope` to more functions and using the parent module from it.
    Visibility resolution no longer have access to later resolution methods and has to use early resolution, so its diagnostics in case of errors regress slightly.
  20. Auto merge of #63352 - jgalenson:reproducible-lto, r=alexcrichton

    bors committed Aug 10, 2019
    Sort the fat LTO modules to produce deterministic output.
    Some projects that use LTO for their release builds are not reproducible.  We can fix this by sorting the fat LTO modules before using them.
    It might also be useful to do this for thin LTO, but I couldn't get that to work to test it so I didn't do it.
  21. .gitignore: Explain why `/obj/` is ignored

    Centril committed Aug 10, 2019
  22. Explain why `/tmp/` is ignored

    Centril committed Aug 10, 2019
  23. .gitignore: Readd `/tmp/`

    Centril committed Aug 10, 2019
    It is produced during `./ test`
  24. Auto merge of #63428 - Centril:rollup-c2ru1z1, r=Centril

    bors committed Aug 10, 2019
    Rollup of 7 pull requests
    Successful merges:
     - #63056 (Give built-in macros stable addresses in the standard library)
     - #63337 (Tweak mismatched types error)
     - #63350 (Use associated_type_bounds where applicable - closes #61738)
     - #63394 (Add test for issue 36804)
     - #63399 (More explicit diagnostic when using a `vec![]` in a pattern)
     - #63419 (check against more collisions for TypeId of fn pointer)
     - #63423 (Mention that tuple structs are private if any of their fields are)
    Failed merges:
    r? @ghost
  25. Rollup merge of #63423 - estebank:priv-tuple, r=zackmdavis

    Centril committed Aug 10, 2019
    Mention that tuple structs are private if any of their fields are
    CC #39703
  26. Rollup merge of #63419 - RalfJung:typeid, r=alexcrichton

    Centril committed Aug 10, 2019
    check against more collisions for TypeId of fn pointer
    Cc rust-lang/rfcs#2738 (comment)
You can’t perform that action at this time.