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 13 pull requests #55425

Closed
wants to merge 44 commits into from

Conversation

Mark-Simulacrum
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

SimonSapin and others added 30 commits October 17, 2018 15:54
Initially landed in rust-lang#48292
and reverted in rust-lang#50401.
This time, use `std::string::ParseError` as suggested in
rust-lang#44431 (comment)
Sometimes it *is* initialized!
Use the new `BoundVarReplacer` to perform canonical substitutions.
This commit extends existing path suggestions to link to documentation
on the changed semantics of `use` in Rust 2018.
nll (and thus the algorithm for actual promotion) don't know about some casts anymore
remove unused variable i in example String::with_capacity()
This is just for the `reason =` name-value meta-item; the
`#[expect(lint)]` attribute also described in the RFC is a problem for
another day.

The place where we were directly calling `emit()` on a match block
(whose arms returned a mutable reference to a diagnostic-builder) was
admittedly cute, but no longer plausibly natural after adding the
if-let to the end of the `LintSource::Node` arm.

This regards rust-lang#54503.
zackmdavis and others added 14 commits October 27, 2018 12:31
We take stability seriously, so we shy away from making even seemingly
"trivial" features insta-stable.
Vadim Petrochenkov suggested this in review ("an error? just to be
conservative"), and it turns out to be convenient from the
implementer's perspective: in the initial proposed implementation (or
`HEAD~2`, as some might prefer to call it), we were doing an entire
whole iteration over the meta items just to find the reason (before
iterating over them to set the actual lint levels). This way, we can
just peek at the end rather than adding that extra loop (or
restructuring the existing code). The RFC doesn't seem to take a
position on this, and there's some precedent for restricting things to
be at the end of a sequence (we only allow `..` at the end of a struct
pattern, even if it would be possible to let it appear anywhere in the
sequence).
We avoid an ICE by checking for an empty meta-item list before we
index into the meta-items, and leave commentary about where we'd like
to issue unused-attributes lints in the future. Note that empty lint
attributes are already accepted by the stable compiler; generalizing
this to weird reason-only lint attributes seems like the
conservative/consilient generalization.
…r=petrochenkov

lint reasons (RFC 2883, part 1)

This implements the `reason =` functionality described in [the RFC](https://github.com/rust-lang/rfcs/blob/master/text/2383-lint-reasons.md) under a `lint_reasons` feature gate.

![lint_reasons_pt_1](https://user-images.githubusercontent.com/1076988/46252097-eed51000-c418-11e8-8212-939d3f02f95d.png)
Implement FromStr for PathBuf

Initially landed in rust-lang#48292 and reverted in rust-lang#50401. This time, use `std::string::ParseError` as suggested in rust-lang#44431 (comment)
path suggestions in Rust 2018 should point out the change in semantics

Fixes rust-lang#55130.

This commit extends existing path suggestions to link to documentation
on the changed semantics of `use` in Rust 2018.

r? @nikomatsakis
Add MaybeUninit::new

Sometimes it *is* initialized!
Allow extern statics with an extern type

Fixes rust-lang#55239
Add support for bound types

This PR may have some slight performance impacts, I don't know how hot is the code I touched.

Also, this breaks clippy and miri.

r? @nikomatsakis
…ion_mono_items, r=oli-obk

Move collect_and_partition_mono_items to rustc_mir

Most of the logic of it is inside rustc_mir anyway.

Also removes the single function crate rustc_metadata_utils. Based on rust-lang#55225
Remove unnecessary mut in iterator.find_map documentation example, R…

Relates to rust-lang#49098

Removes a mut that could induce newcomers to put a mut in their code that the compiler would comply about.

https://github.com/rust-lang/rust/pull/49098/files#r227422388
Update string.rs

remove unused variable i in example String::with_capacity()
@Mark-Simulacrum
Copy link
Member Author

@bors r+ p=5

@bors
Copy link
Contributor

bors commented Oct 27, 2018

📌 Commit 25be4f6 has been approved by Mark-Simulacrum

@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 Oct 27, 2018
@bors
Copy link
Contributor

bors commented Oct 27, 2018

⌛ Testing commit 25be4f6 with merge a3f556db789987a221401962cf7fc33acaf884a4...

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.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:03ca8b70:start=1540680758297197831,finish=1540680816237660404,duration=57940462573
$ 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 SCCACHE_BUCKET=rust-lang-ci-sccache2
---
[00:46:33] .................................................................................................... 400/4975
[00:46:36] .................................................................................................... 500/4975
[00:46:39] .....................i.............................................................................. 600/4975
[00:46:43] .................................................................................................... 700/4975
[00:46:49] ............................................F..................i...........i........................ 800/4975
[00:46:52] .................................................................................iiiii.............. 900/4975
[00:46:57] .................................................................................................... 1100/4975
[00:47:00] .................................................................................................... 1200/4975
[00:47:02] .................................................................................................... 1300/4975
[00:47:04] .................................................................................................... 1400/4975
---
[00:48:57] 
[00:48:57] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:503:22
[00:48:57] 
[00:48:57] 
[00:48:57] 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-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpage1-rustc/x86_64-unknown-linux-gnu/release/deps
134188 ./obj/build/bootstrap/debug/incremental/bootstrap-32pr67l4sa8g0
134184 ./obj/build/bootstrap/debug/incremental/bootstrap-32pr67l4sa8g0/s-f64j2dcyaz-145kilc-ycmuivyxm2px
129328 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release
122284 ./obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps
112168 ./obj/build/x86_64-unknown-linux-gnu/stage1-std
111072 ./src/llvm/test/CodeGen
---
72796 ./obj/build/x86_64-unknown-linux-gnu/stage0-sysroot
72792 ./obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib
72788 ./obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib
72784 ./obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu
72780 ./obj/build/x86_64-unknownckout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:007216d8
travis_time:start:007216d8
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory

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)

@bors
Copy link
Contributor

bors commented Oct 28, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 28, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.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.
[00:49:40] ---- [ui] ui/consts/dangling-alloc-id-ice-2.rs stdout ----
[00:49:40] 
[00:49:40] error: ui test compiled successfully!
[00:49:40] status: exit code: 0
[00:49:40] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/dangling-alloc-id-ice-2.rs" "--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/consts/dangling-alloc-id-ice-2/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/dangling-alloc-id-ice-2/auxiliary" "-A" "unused"
[00:49:40] ------------------------------------------
[00:49:40] 
[00:49:40] ------------------------------------------
[00:49:40] stderr:
---
[00:49:40] 
[00:49:40] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:503:22
[00:49:40] 
[00:49:40] 
[00:49:40] 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-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--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" "--llvm-version" "5.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"
[00:49:40] 
[00:49:40] 
[00:49:40] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:49:40] Build completed unsuccessfully in 0:03:43
[00:49:40] Build completed unsuccessfully in 0:03:43
[00:49:40] Makefile:58: recipe for target 'check' failed
[00:49:40] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0338dbff
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
---
travis_time:end:00a233e8:start=1540686531582119701,finish=1540686531590359269,duration=8239568
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:0b6079f7
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0885c189
travis_time:start:0885c189
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:03962415
$ dmesg | grep -i kill

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)

@bors
Copy link
Contributor

bors commented Oct 28, 2018

☔ The latest upstream changes (presumably #55297) made this pull request unmergeable. Please resolve the merge conflicts.

@kennytm kennytm closed this Oct 28, 2018
@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-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.