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

Rollup of 17 pull requests #42199

Closed
wants to merge 44 commits into from

Commits on May 14, 2017

  1. Add 'static and Send constraints explanations to thread::spawn

    Felix Raimundo committed May 14, 2017
    Configuration menu
    Copy the full SHA
    770bd57 View commit details
    Browse the repository at this point in the history

Commits on May 17, 2017

  1. Refactor: Move the mutable parts out of LintStore. Fix rust-lang#42007.

    * rust-lang#42007 happens because the Session LintStore is emptied when linting.
    * The Session LintStore is emptied because the checker (Early/LateContext)
      wants ownership.
    * The checker wants ownership because it wants to mutate the pass objects
      and lint levels.
    
    The ownership of the whole store is not essential, only the lint levels and
    pass objects need to be owned. Therefore, these parts are extracted out of
    the LintStore into a separate structure `LintSession`. The "check crates"
    methods can operate on `&mut LintSession` instead of `&mut LintStore`.
    
    This is a minor BREAKING CHANGE for lint writers since the `LintContext`
    trait is changed: the `mut_lints` and `level_stack` methods are removed.
    But no one outside of `librustc/lint/context.rs` is using these functions,
    so it should be safe.
    kennytm committed May 17, 2017
    Configuration menu
    Copy the full SHA
    b384b18 View commit details
    Browse the repository at this point in the history
  2. Add an option to the parser to avoid parsing out of line modules

    This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
    nrc committed May 17, 2017
    Configuration menu
    Copy the full SHA
    a256630 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2017

  1. Configuration menu
    Copy the full SHA
    37b9ee2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    59b65b3 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2017

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

Commits on May 21, 2017

  1. Make RangeInclusive just a two-field struct

    Not being an enum improves ergonomics, especially since NonEmpty could be Empty.  It can still be iterable without an extra "done" bit by making the range have !(start <= end), which is even possible without changing the Step trait.
    
    Implements RFC 1980
    scottmcm committed May 21, 2017
    Configuration menu
    Copy the full SHA
    f166bd9 View commit details
    Browse the repository at this point in the history
  2. Return a correct size_hint for degenerate inclusive ranges

    Fixes rust-lang#42135
    
    Found while fixing run-pass/range_inclusive test failure.
    scottmcm committed May 21, 2017
    Configuration menu
    Copy the full SHA
    7eaca60 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    66237af View commit details
    Browse the repository at this point in the history
  4. Implement requires_synchronized_create() for Redox

    This was breaking the libstd build for Redox.
    ids1024 committed May 21, 2017
    Configuration menu
    Copy the full SHA
    f4147e5 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2017

  1. libstd/sync/mpsc: relicense under rust license

    These files are licensed under a different license
    than the rest of the codebase. This causes potential
    issues and inconveniences.
    Relicense these files under the standard license.
    I hold original copyright on that code.
    
    Fixes rust-lang#36556
    dvyukov committed May 22, 2017
    Configuration menu
    Copy the full SHA
    0b85b64 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14b767d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ca909c8 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d7927ff View commit details
    Browse the repository at this point in the history
  5. Fix trailing whitespace.

    Havvy committed May 22, 2017
    Configuration menu
    Copy the full SHA
    5f4b0ff View commit details
    Browse the repository at this point in the history

Commits on May 23, 2017

  1. Suggested changes by birkenfeld

    Havvy committed May 23, 2017
    Configuration menu
    Copy the full SHA
    b41b294 View commit details
    Browse the repository at this point in the history
  2. Override size_hint and propagate ExactSizeIterator for iter::StepBy

    Generally useful, but also a prerequisite for moving a bunch of unit tests off Range::step_by.
    scottmcm committed May 23, 2017
    Configuration menu
    Copy the full SHA
    57f260d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4be488c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fcb3a71 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    21dd71f View commit details
    Browse the repository at this point in the history
  6. Remove some needless // gate-test- comments

    Also, add detection to treat such comments as tidy errors.
    We also remove the found_lib_feature code because it
    was just repeating the found_feature code. Originally it
    was intended to allow for gate-test lines for
    lib features, but apparently nobody missed it.
    est31 committed May 23, 2017
    Configuration menu
    Copy the full SHA
    e860655 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2017

  1. Configuration menu
    Copy the full SHA
    2aa6700 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    604f716 View commit details
    Browse the repository at this point in the history
  3. bootstrap: Use common run() function to call cargo

    This brings verbosity even to invocation of cargo itself
    devurandom committed May 24, 2017
    Configuration menu
    Copy the full SHA
    cd86a9b View commit details
    Browse the repository at this point in the history
  4. Change error count messages

    See rust-lang#33525 for details.
    citizen428 committed May 24, 2017
    Configuration menu
    Copy the full SHA
    5558c64 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f6d935b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    55c3f0b View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#41980 - gamazeps:thread-send, r=steveklabnik

    [Doc] Add `'static` and `Send` constraints explanations to `thread::spawn`
    
    Part of rust-lang#29378.
    
    Explains why the constraints on the closure and its return value are `'static` and `Send`.
    
    Allows to tick of `thread::spawn` from the list of things to document in the `thread` module.
    
    r? @steveklabnik
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    2d30dbc View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#42052 - kennytm:fix-42007-ice-on-decode-lin…

    …t-id, r=nikomatsakis
    
    Refactor: Move the mutable parts out of LintStore. Fix rust-lang#42007.
    
    * rust-lang#42007 happens because the `Session` `LintStore` is emptied when linting.
    * The `Session` `LintStore` is emptied because the checker (`Early`/`LateContext`) wants ownership.
    * The checker wants ownership because it wants to mutate the pass objects and lint levels.
    
    The ownership of the whole store is not essential, only the lint levels and pass objects need to be owned. Therefore, these parts are extracted out of the `LintStore` into a separate structure `LintSession`. The "check crates" methods can operate on `&mut LintSession` instead of `&mut LintStore`.
    
    This is a minor *breaking change* for lint writers since the `LintContext` trait is changed: the `mut_lints` and `level_stack` methods are removed. But no one outside of `librustc/lint/context.rs` is using these functions, so it should be safe.
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    72ac47a View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#42071 - nrc:parse-mods, r=nikomatsakis

    Add an option to the parser to avoid parsing out of line modules
    
    This is useful if parsing from stdin or a String and don't want to try and read in a module from another file. Instead we just leave a stub in the AST.
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    5dde9e8 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#42083 - petrochenkov:safeassign, r=nikomats…

    …akis
    
    Make assignments to `Copy` union fields safe
    
    This is an accompanying PR to PR rust-lang#42068 stabilizing FFI unions.
    
    This was first proposed in rust-lang#32836 (comment), see subsequent comments as well.
    Assignments to `Copy` union fields do not read any data from the union and are [equivalent](rust-lang#32836 (comment)) to whole union assignments, which are safe, so they should be safe as well. This removes a significant number of "false positive" unsafe blocks, in code dealing with FFI unions in particular.
    
    It desirable to make this change now, together with stabilization of FFI unions, because now it affecfts only unstable code, but later it will cause warnings/errors caused by `unused_unsafe` lint in stable code.
    
    cc rust-lang#32836
    r? @nikomatsakis
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    eaaee46 View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#42120 - euclio:unicode, r=arielb1

    remove "much" from unicode diagnostic
    
    The English seems slightly awkward to me, and it's unnecessary.
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    dfb7a00 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#42134 - scottmcm:rangeinclusive-struct, r=a…

    …turon
    
    Make RangeInclusive just a two-field struct
    
    Not being an enum improves ergonomics and consistency, especially since NonEmpty variant wasn't prevented from being empty.  It can still be iterable without an extra "done" bit by making the range have !(start <= end), which is even possible without changing the Step trait.
    
    Implements merged rust-lang/rfcs#1980; tracking issue rust-lang#28237.
    
    This is definitely a breaking change to anything consuming `RangeInclusive` directly (not as an Iterator) or constructing it without using the sugar.  Is there some change that would make sense before this so compilation failures could be compatibly fixed ahead of time?
    
    r? @aturon (as FCP proposer on the RFC)
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    14baa64 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#42141 - ids1024:nobacktrace, r=aturon

    Fix building std without backtrace feature, which was broken in ca8b754
    
    Fixes rust-lang#42139
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    9fdb2f6 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#42142 - ids1024:redox, r=aturon

    Implement requires_synchronized_create() for Redox
    
    This was breaking the libstd build for Redox.
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    6b9108e View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#42149 - dvyukov:license, r=brson

    libstd/sync/mpsc: relicense under rust license
    
    These files are licensed under a different license
    than the rest of the codebase. This causes potential
    issues and inconveniences.
    Relicense these files under the standard license.
    I hold original copyright on that code.
    
    Fixes rust-lang#36556
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    7e1cbc7 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#42150 - citizen428:feature/error-count-mess…

    …ages, r=Mark-Simulacrum
    
    Change error count messages
    
    See rust-lang#33525 for details. r? @Mark-Simulacrum
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    af17281 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#42159 - Havvy:doc-drop, r=steveklabnik

    Document drop more.
    
    Adds two examples to Drop and describes the recursive drop on types that contain fields.
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    54514a8 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#42167 - scottmcm:iter-stepby-sizehint, r=al…

    …excrichton
    
    Override size_hint and propagate ExactSizeIterator for iter::StepBy
    
    Generally useful, but also a prerequisite for moving a bunch of unit tests off `Range*::step_by`.
    
    A small non-breaking subset of rust-lang#42110 (which I closed).
    
    Includes two small documentation changes @ivandardi requested on that PR.
    
    r? @alexcrichton
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    3f08c03 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#42175 - michaelwoerister:filemap-hashing-fi…

    …x-1, r=nikomatsakis
    
    incr.comp.: Track expanded spans instead of FileMaps.
    
    This PR removes explicit tracking of FileMaps in response to rust-lang#42101. The reasoning behind being able to just *not* track access to FileMaps is similar to why we don't track access to the `DefId->DefPath` map:
    1. One can only get ahold of a `Span` value by accessing the HIR (for local things) or a `metadata::schema::Entry` (for things from external crates).
    2. For both of these things we compute a hash that incorporates the *expanded spans*, that is, what we hash is in the (FileMap independent) format `filename:line:col`.
    3. Consequently, everything that emits a span should already be tracked via its dependency to something that has the span included in its hash and changes would be detected via that hash.
    
    One caveat here is that we have to be conservative when exporting things in metadata. A crate can be built without debuginfo and would thus by default not incorporate most spans into the metadata hashes. However, a downstream crate can make an inline copy of things in the upstream crate and span changes in the upstream crate would then go undetected, even if the downstream uses them (e.g. by emitting debuginfo for an inlined function). For this reason, we always incorporate spans into metadata hashes for now (there might be more efficient ways to handle this safely when red-green tracking is implemented).
    
    r? @nikomatsakis
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    d5403b9 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#42177 - est31:master, r=Mark-Simulacrum

    Remove some needless // gate-test- comments
    
    Also, add detection to treat such comments as tidy errors.
    We also remove the found_lib_feature code because it
    was just repeating the found_feature code. Originally it
    was intended to allow for gate-test lines for
    lib features, but apparently nobody missed it.
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    2d42013 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#42186 - devurandom:fix/bootstrap-verbose, r…

    …=alexcrichton
    
    bootstrap: Make bootstrap verbose if requested
    
    Fixes: rust-lang#42099
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    4a3b3f3 View commit details
    Browse the repository at this point in the history
  22. Rollup merge of rust-lang#42195 - SamWhited:fix_broken_link, r=stevek…

    …labnik
    
    fix broken link to nomicon in Unsize docs
    
    Add a missing link that is currently broken in the docs (see the last sentence of https://doc.rust-lang.org/std/marker/trait.Unsize.html)
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    5dc6dfb View commit details
    Browse the repository at this point in the history
  23. Rollup merge of rust-lang#42198 - GuillaumeGomez:os-str-doc, r=QuietM…

    …isdreavus
    
    Add missing urls for OsStr docs
    
    r? @rust-lang/docs
    Mark-Simulacrum authored May 24, 2017
    Configuration menu
    Copy the full SHA
    b6256f4 View commit details
    Browse the repository at this point in the history