Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustup #10313

Merged
merged 21 commits into from
Feb 10, 2023
Merged

Rustup #10313

merged 21 commits into from
Feb 10, 2023

Commits on Jan 20, 2023

  1. fix overlapping spans for clippy::uninlined_format_args

    Lukas Markeffsky committed Jan 20, 2023
    Configuration menu
    Copy the full SHA
    10c8686 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2023

  1. Configuration menu
    Copy the full SHA
    520814b View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2023

  1. Configuration menu
    Copy the full SHA
    38899d0 View commit details
    Browse the repository at this point in the history
  2. change fn_sig query to use EarlyBinder; remove bound_fn_sig query; ad…

    …d EarlyBinder to fn_sig in metadata
    kylematsuda committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    afb586f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b64a209 View commit details
    Browse the repository at this point in the history
  4. Auto merge of #107372 - JohnTitor:rollup-zkl2ges, r=JohnTitor

    Rollup of 9 pull requests
    
    Successful merges:
    
     - #106806 (Replace format flags u32 by enums and bools.)
     - #107194 (Remove dependency on slice_internals feature in rustc_ast)
     - #107234 (Revisit fix_is_ci_llvm_available logic)
     - #107316 (Update snap from `1.0.1` to `1.1.0`)
     - #107321 (solver comments + remove `TyCtxt::evaluate_goal`)
     - #107332 (Fix wording from `rustbuild` to `bootstrap`)
     - #107347 (reduce rightward-drift)
     - #107352 (compiler: Fix E0587 explanation)
     - #107357 (Fix infinite loop in rustdoc get_all_import_attributes function)
    
    Failed merges:
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    bcb9052 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ba6d3e7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    5c7a652 View commit details
    Browse the repository at this point in the history
  7. Auto merge of #107386 - flip1995:clippyup, r=Manishearth

    Update Clippy
    
    r? `@Manishearth`
    bors committed Jan 27, 2023
    Configuration menu
    Copy the full SHA
    997fe0d View commit details
    Browse the repository at this point in the history

Commits on Jan 28, 2023

  1. Auto merge of #101692 - cjgillot:generator-lazy-witness, r=oli-obk

    Compute generator saved locals on MIR
    
    Generators are currently type-checked by introducing a `witness` type variable, which is unified with a `GeneratorWitness(captured types)` whose purpose is to ensure that the auto traits correctly migrate from the captured types to the `witness` type.  This requires computing the captured types on HIR during type-checking, only to re-do it on MIR later.
    
    This PR proposes to drop the HIR-based computation, and only keep the MIR one.  This is done in 3 steps.
    1. During type-checking, the `witness` type variable is never unified.  This allows to stall all the obligations that depend on it until the end of type-checking.  Then, the stalled obligations are marked as successful, and saved into the typeck results for later verification.
    2. At type-checking writeback, `witness` is replaced by `GeneratorWitnessMIR(def_id, substs)`.  From this point on, all trait selection involving `GeneratorWitnessMIR` will fetch the MIR-computed locals, similar to what opaque types do.  There is no lifetime to be preserved here: we consider all the lifetimes appearing in this witness type to be higher-ranked.
    3. After borrowck, the stashed obligations are verified against the actually computed types, in the `check_generator_obligations` query.  If any obligation was wrongly marked as fulfilled in step 1, it should be reported here.
    
    There are still many issues:
    - ~I am not too happy having to filter out some locals from the checked bounds, I think this is MIR building that introduces raw pointers polluting the analysis;~ solved by a check specific to static variables.
    - the diagnostics for captured types don't show where they are used/dropped;
    - I do not attempt to support chalk.
    
    cc `@eholk` `@jyn514` for the drop-tracking work
    r? `@oli-obk` as you warned me of potential unsoundness
    bors committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    06e7855 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e65a7ff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    92c4f1e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3e32533 View commit details
    Browse the repository at this point in the history
  5. Auto merge of #106916 - lukas-code:overlapping-substs, r=estebank

    Remove overlapping parts of multipart suggestions
    
    This PR adds a debug assertion that the parts of a single substitution cannot overlap, fixes a overlapping substitution from the testsuite, and fixes rust-lang/rust#106870.
    
    Note that a single suggestion can still have multiple overlapping substitutions / possible edits, we just don't suggest overlapping replacements in a single edit anymore.
    
    I've also included a fix for an unrelated bug where rustfix for `explicit_outlives_requirements` would produce multiple trailing commas for a where clause.
    bors committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    3a68217 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of #107398 - scottmcm:its-their-funeral, r=dtolnay

    Remove `ControlFlow::{BREAK, CONTINUE}`
    
    Libs-API decided to remove these in #102697.
    
    Follow-up to #107023, which removed them from `compiler/`, but a couple new ones showed up since that was merged.
    
    r? libs
    matthiaskrgr authored Jan 28, 2023
    Configuration menu
    Copy the full SHA
    a493717 View commit details
    Browse the repository at this point in the history
  7. Auto merge of #107408 - matthiaskrgr:rollup-b5vz2ow, r=matthiaskrgr

    Rollup of 9 pull requests
    
    Successful merges:
    
     - #104012 (Improve unexpected close and mismatch delimiter hint in TokenTreesReader)
     - #104252 (Stabilize the const_socketaddr feature)
     - #105524 (Replace libc::{type} with crate::ffi::{type})
     - #107096 (Detect references to non-existant messages in Fluent resources)
     - #107355 (Add regression test for #60755)
     - #107384 (Remove `BOOL_TY_FOR_UNIT_TESTING`)
     - #107385 (Use `FallibleTypeFolder` for `ConstInferUnifier` not `TypeRelation`)
     - #107391 (rustdoc: remove inline javascript from copy-path button)
     - #107398 (Remove `ControlFlow::{BREAK, CONTINUE}`)
    
    Failed merges:
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    75c8179 View commit details
    Browse the repository at this point in the history
  8. Auto merge of #107206 - cjgillot:no-h2l-map, r=WaffleLapkin

    Remove HirId -> LocalDefId map from HIR.
    
    Having this map in HIR prevents the creating of new definitions after HIR has been built.
    Thankfully, we do not need it.
    
    Based on rust-lang/rust#103902
    bors committed Jan 28, 2023
    Configuration menu
    Copy the full SHA
    79475f5 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2023

  1. Auto merge of #106227 - bryangarza:ctfe-limit, r=oli-obk

    Use stable metric for const eval limit instead of current terminator-based logic
    
    This patch adds a `MirPass` that inserts a new MIR instruction `ConstEvalCounter` to any loops and function calls in the CFG. This instruction is used during Const Eval to count against the `const_eval_limit`, and emit the `StepLimitReached` error, replacing the current logic which uses Terminators only.
    
    The new method of counting loops and function calls should be more stable across compiler versions (i.e., not cause crates that compiled successfully before, to no longer compile when changes to the MIR generation/optimization are made).
    
    Also see: #103877
    bors committed Jan 29, 2023
    Configuration menu
    Copy the full SHA
    17369f3 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2023

  1. Modify primary span label for E0308

    The previous output was unintuitive to users.
    estebank committed Jan 30, 2023
    Configuration menu
    Copy the full SHA
    821199c View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2023

  1. Configuration menu
    Copy the full SHA
    7c61b4e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    19c07f8 View commit details
    Browse the repository at this point in the history