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 10 pull requests #50666

Closed
wants to merge 28 commits into from
Closed

Commits on May 9, 2018

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

Commits on May 10, 2018

  1. Configuration menu
    Copy the full SHA
    9d7eda9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8720314 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2ae8acc View commit details
    Browse the repository at this point in the history
  4. const time

    added rustc_const_unstable attribute
    
    extended tests
    
    added conversion test
    
    fixed tidy test
    
    added feature attribute
    rizakrko committed May 10, 2018
    Configuration menu
    Copy the full SHA
    4d8d0a6 View commit details
    Browse the repository at this point in the history
  5. Do not silently truncate offsets for read_at/write_at on emscripten

    Generate an IO error if the offset is out of bounds for the system call.
    tbu- committed May 10, 2018
    Configuration menu
    Copy the full SHA
    d71625b View commit details
    Browse the repository at this point in the history

Commits on May 11, 2018

  1. don't make crazy suggestion for unreachable braced pub-use

    The Higher Intermediate Representation doesn't have spans for visibility
    keywords, so we were assuming that the first whitespace-delimited token
    in the item span was the `pub` to be weakened. This doesn't work for
    brace-grouped `use`s, which get lowered as if they were several
    individual `use` statements, but with spans that only cover the braced
    path-segments. Constructing a correct suggestion here presents some
    challenges—until someone works those out, we can at least protect the
    dignity of our compiler marking the suggestion for `use` items as
    potentially incorrect.
    
    This resolves rust-lang#50455 (but again, it would be desirable in the future to
    make a correct suggestion instead of copping out like this).
    zackmdavis committed May 11, 2018
    Configuration menu
    Copy the full SHA
    7006018 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c3b23b3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    89a8f2c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d23cbc3 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5c83422 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0a4fbe3 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    8402a58 View commit details
    Browse the repository at this point in the history
  8. rustc: Allow an edition's feature on that edition

    This commit fixes a hard error where the `#![feature(rust_2018_preview)]`
    feature was forbidden to be mentioned when the `--edition 2018` flag was passed.
    This instead silently accepts that feature gate despite it not being necessary.
    It's intended that this will help ease the transition into the 2018 edition as
    users will, for the time being, start off with the `rust_2018_preview` feature
    and no longer immediately need to remove it.
    
    Closes rust-lang#50662
    alexcrichton committed May 11, 2018
    Configuration menu
    Copy the full SHA
    0588bca View commit details
    Browse the repository at this point in the history
  9. rustc: Fix crate lint for single-item paths

    This commit fixes recommending the `crate` prefix when migrating to 2018 for
    paths that look like `use foo;` or `use {bar, baz}`
    
    Closes rust-lang#50660
    alexcrichton committed May 11, 2018
    Configuration menu
    Copy the full SHA
    eab91ba View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    adf2dce View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    43f6b96 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#50476 - zackmdavis:tame_unreachable_pub_sug…

    …gestion, r=Manishearth
    
    don't make crazy suggestion for unreachable braced pub-use
    
    The Higher Intermediate Representation doesn't have spans for visibility
    keywords, so we were assuming that the first whitespace-delimited token
    in the item span was the `pub` to be weakened. This doesn't work for
    brace-grouped `use`s, which get lowered as if they were several
    individual `use` statements, but with spans that only cover the braced
    path-segments. Constructing a correct suggestion here presents some
    challenges—until someone works those out, we can at least protect the
    dignity of our compiler by not offering any suggestion at all for `use` items.
    
    This resolves rust-lang#50455 (but again, it would be desirable in the future to
    make a correct suggestion instead of copping out like this).
    
    r? @Manishearth
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    268b038 View commit details
    Browse the repository at this point in the history
  13. Rollup merge of rust-lang#50545 - rizakrko:const_time, r=oli-obk

    Made some functions in time module const
    
    They may be const, or i missed something?
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    d9b6926 View commit details
    Browse the repository at this point in the history
  14. Rollup merge of rust-lang#50550 - llogiq:fmt-result, r=petrochenkov

    use fmt::Result where applicable
    
    This is a quite boring PR, but I think the type alias improves readability, so why not use it?
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    0151374 View commit details
    Browse the repository at this point in the history
  15. Rollup merge of rust-lang#50558 - whitfin:issue-50500, r=michaelwoeri…

    …ster
    
    Remove all reference to DepGraph::work_products
    
    This is an attempt at fixing rust-lang#50500. It will remove the `work_products` key from `DepGraphData` completely, in favour of just passing the relevant data around. I went in a little blindly; everything appears to work just fine but I'd appreciate any additional advice people.
    
    I didn't want to remove too much of what was already there, so I kept the structure pretty much the same (aside from some naming tweaks) - if anyone has suggestions on how to streamline it a little better, happy to follow up.
    
    r? @michaelwoerister
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    6d2a013 View commit details
    Browse the repository at this point in the history
  16. Rollup merge of rust-lang#50602 - Screwtapello:update-canonicalize-do…

    …cs, r=cramertj
    
    Update canonicalize docs
    
    I was recently working with file-paths in Rust, and I felt let down by the `std::fs::canonicalize` docs, so I figured I should submit a PR with some suggestions.
    
    I was looking for a method to turn a relative path into an absolute path. The `canonicalize` docs didn't mention the words "relative" or "absolute", but they did mention resolving symlinks (which is a kind of canonicalisation and does not imply converting to absolute), so I assumed that's all it did. To remedy this, I've added the word "absolute" to the description of both `std::fs::canonicalize` and `std::path::Path::canonicalize`.
    
    After calling `canonicalize` on Windows, I ran into a bunch of other problems I would not have expected from the function's behaviour on Linux. Specifically, if you call `canonicalize` on a path:
    
      - it's allowed to be much longer than it otherwise would
      - `.join("a/slash/delimited/path")` gives you a broken path that Windows can't use, where the same operation would have worked perfectly without `canonicalize` (if the path were short enough)
      - the resulting path may confuse other Windows programs if you pass it to them on the command-line, or write it to a config file that they read, etc.
    
    ...so I tried to summarize those behaviours too.
    
    If I understand correctly, those behaviours are a side-effect of calling `GetFinalPathNameByHandle`, and the documentation says `canonicalize` might not call that function in future, so maybe those side-effects shouldn't be part of the function's documentation. However, I bet there's a lot of applications deliberately calling `canonicalize` just for the path-length-extension alone, so that particular side-effect is de-facto part of the `canonicalize` interface.
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    ba9a681 View commit details
    Browse the repository at this point in the history
  17. Rollup merge of rust-lang#50624 - adevore:fs-write-str-example, r=ste…

    …veklabnik
    
    fs::write: Add example writing a &str
    
    This adds an example to the documentation for `fs::write` that demonstrates the use of the `AsRef<[u8]>` implementation for &str. Experienced users should already recognize the possibility from the type signature, but new users may not recognize the significance.
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    a5cf9c1 View commit details
    Browse the repository at this point in the history
  18. Rollup merge of rust-lang#50634 - tbu-:pr_preadwrite_emscripten, r=ke…

    …nnytm
    
    Do not silently truncate offsets for `read_at`/`write_at` on emscripten
    
    Generate an IO error if the offset is out of bounds for the system call.
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    1b9faa8 View commit details
    Browse the repository at this point in the history
  19. Rollup merge of rust-lang#50644 - kennytm:read-appveyor-dump, r=alexc…

    …richton
    
    AppVeyor: Read back trace from crash dump on failure.
    
    This is an attempt to debug spurious access violations on Windows (rust-lang#33434, rust-lang#50604). Thanks to rust-lang#50276, there should be minidumps to read when rustc segfault.
    
    (The implementation is based on <https://github.com/springmeyer/travis-coredump/blob/master/test.bat>.)
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    576bf68 View commit details
    Browse the repository at this point in the history
  20. Rollup merge of rust-lang#50663 - alexcrichton:no-removed-error, r=Ma…

    …nishearth
    
    rustc: Allow an edition's feature on that edition
    
    This commit fixes a hard error where the `#![feature(rust_2018_preview)]`
    feature was forbidden to be mentioned when the `--edition 2018` flag was passed.
    This instead silently accepts that feature gate despite it not being necessary.
    It's intended that this will help ease the transition into the 2018 edition as
    users will, for the time being, start off with the `rust_2018_preview` feature
    and no longer immediately need to remove it.
    
    Closes rust-lang#50662
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    4d81fc8 View commit details
    Browse the repository at this point in the history
  21. Rollup merge of rust-lang#50665 - alexcrichton:fix-single-item-path-w…

    …arnings, r=Manishearth
    
    rustc: Fix `crate` lint for single-item paths
    
    This commit fixes recommending the `crate` prefix when migrating to 2018 for
    paths that look like `use foo;` or `use {bar, baz}`
    
    Closes rust-lang#50660
    alexcrichton authored May 11, 2018
    Configuration menu
    Copy the full SHA
    58481c0 View commit details
    Browse the repository at this point in the history
  22. Fixup some tests

    alexcrichton committed May 11, 2018
    Configuration menu
    Copy the full SHA
    094873c View commit details
    Browse the repository at this point in the history