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 #57911

Closed
wants to merge 30 commits into from
Closed

Rollup of 10 pull requests #57911

wants to merge 30 commits into from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Jan 26, 2019

Successful merges:

Failed merges:

r? @ghost

oli-obk and others added 30 commits January 14, 2019 13:55
Just transparently print the guarded data, instead of wrapping it in
`MutexGuard { lock: Mutex { data: ... } }`.
…);` and potentially instantiated at different types.
This commit adds errors and accompanying suggestions as below:

```
bar::<<<<<T as Foo>::Output>();
     ^^^ help: remove extra angle brackets
```
This commit implements a suggestion from @estebank that optimizes the
use of snapshots.

Instead of creating a snapshot for each recursion in `parse_path_segment`
and then replacing `self` with them until the first invocation where if
leading angle brackets are detected, `self` is not replaced and instead the
snapshot is used to inform how parsing should continue.

Now, a snapshot is created in the first invocation that acts as a backup
of the parser state before any generic arguments are parsed (and
therefore, before recursion starts). This backup replaces `self` if after
all parsing of generic arguments has concluded we can determine that
there are leading angle brackets. Parsing can then proceed from the
backup state making use of the now known number of unmatched leading
angle brackets to recover.
Report all unused attributes on a given doc comment instead of just the
first one, and extend the span of sugared doc comments to encompass the
whole comment.
Report the diagnostic on macro expansions, and add a label indicating
why the comment is unused.
This commit stabilizes the `Atomic{I,U}{8,16,32,64}` APIs in the
`std::sync::atomic` and `core::sync::atomic` modules. Proposed in rust-lang#56753
and tracked in rust-lang#32976 this feature has been unstable for quite some time
and is hopefully ready to go over the finish line now!

The API is being stabilized as-is. The API of `AtomicU8` and friends
mirrors that of `AtomicUsize`. A list of changes made here are:

* A portability documentation section has been added to describe the
  current state of affairs.
* Emulation of smaller-size atomics with larger-size atomics has been
  documented.
* As an added bonus, `ATOMIC_*_INIT` is now scheduled for deprecation
  across the board in 1.34.0 now that `const` functions can be invoked
  in statics.

Note that the 128-bit atomic types are omitted from this stabilization
explicitly. They have far less platform support than the other atomic
types, and will likely require further discussion about their best
location.

Closes rust-lang#32976
Closes rust-lang#56753
…fackler

std: Stabilize fixed-width integer atomics

This commit stabilizes the `Atomic{I,U}{8,16,32,64}` APIs in the
`std::sync::atomic` and `core::sync::atomic` modules. Proposed in rust-lang#56753
and tracked in rust-lang#32976 this feature has been unstable for quite some time
and is hopefully ready to go over the finish line now!

The API is being stabilized as-is. The API of `AtomicU8` and friends
mirrors that of `AtomicUsize`. A list of changes made here are:

* A portability documentation section has been added to describe the
  current state of affairs.
* Emulation of smaller-size atomics with larger-size atomics has been
  documented.
* As an added bonus, `ATOMIC_*_INIT` is now scheduled for deprecation
  across the board in 1.34.0 now that `const` functions can be invoked
  in statics.

Note that the 128-bit atomic types are omitted from this stabilization
explicitly. They have far less platform support than the other atomic
types, and will likely require further discussion about their best
location.

Closes rust-lang#32976
Closes rust-lang#56753
Simplify `ConstValue::ScalarPair`

While looking at rust-lang#57432 I realized that some of our types for representing constants are very big. This reduces `LazyConst` to 3/4th of its original size and simplifies some code around slices at the same time.

r? @RalfJung
Make MutexGuard's Debug implementation more useful.

Fixes rust-lang#57702.
…constraints-on-bindings-too, r=nikomatsakis

extra testing of how NLL handles wildcard type `_`

test that wildcard type `_` is not duplicated by `type Foo<X> = (X, X);` and potentially instantiated at different types when used in type ascriptions in let bindings.

(NLL's handling of this for the type ascription *expression form* is currently broken, or at least differs from what AST-borrowck does. I'll file a separate bug about that. Its not something critical to address since that expression is guarded by `#![feature(type_ascription)]`.)

cc rust-lang#55748
Fix some minor warnings

Since apparently RLS works when initialized in the root repository (:tada:) I decided to fix some of the issues it caught.

There are a lot of unused attribute warnings left on `rustc_on_unimplemented` and `rustc_layout_scalar_valid_range_start` but I imagine we can't do much about it due to 2-stage compilation?
un-deprecate mem::zeroed

as per the discussion around <rust-lang#53491 (comment)>
Ignore aarch64 in simd-intrinsic-generic-reduction

This fails on AArch64 see rust-lang#54510

Disabling it for now until it's fixed/implemented in LLVM

cc @gnzlbg
Suggest removing leading left angle brackets.

Fixes rust-lang#57819.

This PR adds errors and accompanying suggestions as below:

```
bar::<<<<<T as Foo>::Output>();
     ^^^ help: remove extra angle brackets
```

r? @estebank
…ebank

overhaul unused doc comments lint

This PR contains a number of improvements to the `unused_doc_comments` lint.

- Extends the span to cover the entire comment when using sugared doc comments.
- Triggers the lint for all unused doc comments on a node, instead of just the first one.
- Triggers the lint on macro expansions, and provides a help note explaining that doc comments must be expanded by the macro.
- Adds a label pointing at the node that cannot be documented.

Furthermore, this PR fixes any instances in rustc where a macro expansion was erroneously documented.
resolve: Fix span arithmetics in the import conflict error

rust-lang#56937 rebased and fixed

Fixes rust-lang#56411
Fixes rust-lang#57071
Fixes rust-lang#57787

r? @estebank
@Centril
Copy link
Contributor Author

Centril commented Jan 26, 2019

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Jan 26, 2019

📌 Commit 9a6be1c has been approved by Centril

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jan 26, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:1dae3b09:start=1548470747299907110,finish=1548470826173477502,duration=78873570392
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-6.0
---
    97% |███████████████████████████████▍| 532kB 41.8MB/s eta 0:00:01
    99% |████████████████████████████████| 542kB 41.5MB/s eta 0:00:01
    100% |████████████████████████████████| 552kB 22.5MB/s 
Collecting botocore==1.12.86 (from awscli)
  Downloading https://files.pythonhosted.org/packages/d7/af/fd9c0f1f0fdc03d3367a56f35093f8b1020ba1a97ead9fa580156895944b/botocore-1.12.86-py2.py3-none-any.whl (5.2MB)
    0% |▏                               | 20kB 25.1MB/s eta 0:00:01
    0% |▏                               | 30kB 29.1MB/s eta 0:00:01
    0% |▎                               | 40kB 28.6MB/s eta 0:00:01
    0% |▎                               | 51kB 29.2MB/s eta 0:00:01
---
[00:13:44]    Compiling rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
[00:13:53] error[E0061]: this function takes 2 parameters but 3 parameters were supplied
[00:13:53]   --> src/librustc_mir/hair/constant.rs:44:22
[00:13:53]    |
[00:13:53] 44 |                 val: ConstValue::new_slice(Scalar::Ptr(id.into()), s.len() as u64, &tcx),
[00:13:53] 
[00:13:59] error: aborting due to previous error
[00:13:59] 
[00:13:59] For more information about this error, try `rustc --explain E0061`.
[00:13:59] For more information about this error, try `rustc --explain E0061`.
[00:13:59] error: Could not compile `rustc_mir`.
[00:13:59] warning: build failed, waiting for other jobs to finish...
[00:16:43] error: build failed
[00:16:43] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "build" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json"
[00:16:43] expected success, got: exit code: 101
[00:16:43] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap build
[00:16:43] Build completed unsuccessfully in 0:13:15
[00:16:43] make: *** [all] Error 1
[00:16:43] Makefile:18: recipe for target 'all' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:3b258860
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Jan 26 03:03:58 UTC 2019

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@Centril Centril closed this Jan 26, 2019
@Centril Centril deleted the rollup branch January 26, 2019 03:13
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet