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 18 pull requests #59223

Closed
wants to merge 47 commits into from
Closed

Rollup of 18 pull requests #59223

wants to merge 47 commits into from

Conversation

Centril
Copy link
Contributor

@Centril Centril commented Mar 16, 2019

Successful merges:

Failed merges:

r? @ghost

petrochenkov and others added 30 commits March 9, 2019 16:15
This commit adds a regression test for rust-lang#55809 which checks that a
overflow does not occur when evaluating a requirement for async
functions and `&mut` arguments in some specific circumstances.
Rewrite the SelfCtor early and use the replacement Def when
calculating the path_segs.

Note that this also changes which def is seen by the code that
computes user_self_ty and is_alias_variant_ctor; I don't see a
immediate issue with that, but I'm not 100% clear on the
implications.

Fixes rust-lang#57924
…);` and potentially instantiated at different types.

(Updated to reflect changes in diagnostic output and compiletest infrastructure.)
The current language may be amusing, yet is just imprecise and most especially difficult to understand for someone who speaks English as a foreign language.
Use the information same as rustc.
As discussed in rust-lang#55078, there's no known reason for this restriction.

It's unlikely that repr(simd) will be stabilized in its current form, but
might as well remove some restrictions on it.

This removes the branch in `is_machine` which returns false for these types.
`is_machine` is only used for the repr(simd) type validation check.
…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 generic argument lookup for Self

Rewrite the SelfCtor early and use the replacement Def when
calculating the path_segs.

Note that this also changes which def is seen by the code that
computes user_self_ty and is_alias_variant_ctor; I don't see a
immediate issue with that, but I'm not 100% clear on the
implications.

Fixes rust-lang#57924

r? @eddyb
resolve: Account for new importable entities

Fixes the ICE encountered in rust-lang#58837
r? @Centril
we can now skip should_panic tests with the libtest harness
add suggestions to invalid macro item error

r? @estebank
Be more discerning on when to attempt suggesting a comma in a macro invocation

Fix rust-lang#58796.
Suggest return lifetime when there's only one named lifetime

Fix rust-lang#29094.
Make std time tests more robust for platform differences

Previously, `time::tests::since_epoch` and `time::tests::system_time_math` would fail if the platform represents a SystemTime as unix epoch + `u64` nanoseconds.

r? @sfackler
Stabilize Range*::contains.

Closes rust-lang#32311. There's also a bit of rustfmt on range.rs thrown in for good measure (I forgot to turn off format-on-save in VSCode).
[wg-async-await] Add regression test for rust-lang#55809.

Fixes rust-lang#55809.

This PR adds a regression test for rust-lang#55809 which checks that a
overflow does not occur when evaluating a requirement for async
functions and `&mut` arguments in some specific circumstances.
…ertj

Add `-Z allow_features=...` flag

Adds a compiler option to allow only whitelisted features.

For projects on nightly that want to prevent feature-creep (and maybe, someday, move off of nightly). Not being able to enforce this has been a problem on Fuchsia and at other big companies.

This doesn't support filtering edition feature flags, but someone is welcome to add that if they need it.
No old chestnuts in iter::repeat docs

The current language may be amusing, yet is just imprecise and most especially difficult to understand for someone who speaks English as a foreign language.
…-restriction, r=alexcrichton

Remove restriction on isize/usize in repr(simd)

As discussed in rust-lang#55078, there's no known reason for this restriction.

It's unlikely that repr(simd) will be stabilized in its current form, but
might as well remove some restrictions on it.

This removes the branch in `is_machine` which returns false for these types.
`is_machine` is only used for the repr(simd) type validation check.
Output diagnostic information for rustdoc

Use the information same as rustc.
…=oli-obk

Reduce a Code Repetition Related to Bit Operation

This PR is related to [rust-lang#49937](rust-lang#49937).
Should I do more commits about [`FIXME(49937)`](https://github.com/rust-lang/rust/search?q=FIXME%2849937%29&unscoped_q=FIXME%2849937%29) in this PR?
Add x86_64 musl host to the manifest

@alexcrichton r?

Probably too late for rust-lang#59207
@Centril
Copy link
Contributor Author

Centril commented Mar 16, 2019

@bors r+ p=18

@bors
Copy link
Contributor

bors commented Mar 16, 2019

📌 Commit b5e0692 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 Mar 16, 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:03827787:start=1552698920542965218,finish=1552698998730287810,duration=78187322592
$ 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
$ export GCP_CACHE_BUCKET=rust-lang-ci-cache
Setting environment variables from .travis.yml
---
[01:17:41] .................................................................................................... 4400/5472
[01:17:44] .................................................................................................... 4500/5472
[01:17:48] .................................................................................................... 4600/5472
[01:17:53] ..............i..................................................................................... 4700/5472
[01:17:59] ..............................F..................................................................... 4800/5472
[01:18:07] .................................................................................................... 5000/5472
[01:18:10] .................................................................................................... 5100/5472
[01:18:15] .................................................................................................... 5200/5472
[01:18:18] .................................................................................................... 5300/5472
---
[01:18:23] 
[01:18:23] 1 error: cannot use a built-in attribute through an import
[01:18:23] 2   --> $DIR/cross-crate.rs:7:3
[01:18:23] 3    |
[01:18:23] - LL | #[built_in_attr] //~ ERROR cannot use a built-in attribute through an import
[01:18:23] + LL | #[built_in_attr]
[01:18:23] 6    |
[01:18:23] 7 note: the built-in attribute imported here
[01:18:23] 
[01:18:23] 13 error: cannot use a tool module through an import
[01:18:23] 13 error: cannot use a tool module through an import
[01:18:23] 14   --> $DIR/cross-crate.rs:8:3
[01:18:23] 15    |
[01:18:23] - LL | #[tool_mod::skip] //~ ERROR cannot use a tool module through an import
[01:18:23] + LL | #[tool_mod::skip]
[01:18:23] 18    |
[01:18:23] 19 note: the tool module imported here
[01:18:23] 
[01:18:23] 
[01:18:23] 
[01:18:23] The actual stderr differed from the expected stderr.
[01:18:23] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2018/uniform-paths/cross-crate/cross-crate.stderr
[01:18:23] To update references, rerun the tests and pass the `--bless` flag
[01:18:23] To only update this specific test, also pass `--test-args rust-2018/uniform-paths/cross-crate.rs`
[01:18:23] error: 1 errors occurred comparing output.
[01:18:23] status: exit code: 1
[01:18:23] status: exit code: 1
[01:18:23] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2018/uniform-paths/cross-crate/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2018" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/rust-2018/uniform-paths/cross-crate/auxiliary" "-A" "unused"
[01:18:23] ------------------------------------------
[01:18:23] 
[01:18:23] ------------------------------------------
[01:18:23] stderr:
[01:18:23] stderr:
[01:18:23] ------------------------------------------
[01:18:23] {"message":"cannot use a built-in attribute through an import","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs","byte_start":94,"byte_end":107,"line_start":7,"line_end":7,"column_start":3,"column_end":16,"is_primary":true,"text":[{"text":"#[built_in_attr] //~ ERROR cannot use a built-in attribute through an import","highlight_start":3,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the built-in attribute imported here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs","byte_start":75,"byte_end":89,"line_start":5,"line_end":5,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use cross_crate::*;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot use a built-in attribute through an import\n  --> /checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs:7:3\n   |\nLL | #[built_in_attr] //~ ERROR cannot use a built-in attribute through an import\n   |   ^^^^^^^^^^^^^\n   |\nnote: the built-in attribute imported here\n  --> /checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs:5:5\n   |\nLL | use cross_crate::*;\n   |     ^^^^^^^^^^^^^^\n\n"}
[01:18:23] {"message":"cannot use a tool module through an import","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs","byte_start":171,"byte_end":179,"line_start":8,"line_end":8,"column_start":3,"column_end":11,"is_primary":true,"text":[{"text":"#[tool_mod::skip] //~ ERROR cannot use a tool module through an import","highlight_start":3,"highlight_end":11}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the tool module imported here","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs","byte_start":75,"byte_end":89,"line_start":5,"line_end":5,"column_start":5,"column_end":19,"is_primary":true,"text":[{"text":"use cross_crate::*;","highlight_start":5,"highlight_end":19}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null}],"rendered":"error: cannot use a tool module through an import\n  --> /checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs:8:3\n   |\nLL | #[tool_mod::skip] //~ ERROR cannot use a tool module through an import\n   |   ^^^^^^^^\n   |\nnote: the tool module imported here\n  --> /checkout/src/test/ui/rust-2018/uniform-paths/cross-crate.rs:5:5\n   |\nLL | use cross_crate::*;\n   |     ^^^^^^^^^^^^^^\n\n"}
[01:18:23] 
[01:18:23] ------------------------------------------
[01:18:23] 
[01:18:23] thread '[ui] ui/rust-2018/uniform-paths/cross-crate.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3325:9
---
[01:18:23] 
[01:18:23] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:496:22
[01:18:23] 
[01:18:23] 
[01:18:23] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-6.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "6.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[01:18:23] 
[01:18:23] 
[01:18:23] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:18:23] Build completed unsuccessfully in 0:04:44
[01:18:23] Build completed unsuccessfully in 0:04:44
[01:18:23] make: *** [check] Error 1
[01:18:23] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:10585443
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Mar 16 02:35:12 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 Mar 16, 2019
@Centril Centril deleted the rollup branch March 16, 2019 02:39
@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.