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 7 pull requests #58550

Closed
wants to merge 17 commits into from
Closed

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

nitnelave and others added 17 commits February 13, 2019 13:31
Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
I felt the description of forbid was misleading/incomplete without
mentioning how --cap-lints interacts with it.
Implemented the following methods on PathBuf which
forward to the underlying OsString.

- capacity
- with_capacity
- clear
- reserve
- reserve_exact
- shrink_to_fit
- shrink_to
This lets the default `fn main()` unwrap any `Result`s, which
allows the use of `?` in most tests without adding it manually.
- Fixed incorrect `mut` usage
- Fixed style in accordance with tidy
- Marked all methods as unstable
- Changed feature identifier to path_buf_alias_os_string_methods
Feature gate changed to `path_buf_capacity` as per advice from @Mark-Simulacrum
The rustc "-g" CLI flag was miss documented to be a synonym of "-C
debug-level=2" and not the correct "-C debuginfo=2".
The rustc "-g" and "-o" fags are synonyms of the "-c" codegen flags.
This adds a link to the codegen docs for each synonym.
… r=GuillaumeGomez

Modify doctest's auto-`fn main()` to allow `Result`s

This lets the default `fn main()` ~~return `impl Termination`~~ unwrap Results, which allows the use of `?` in most tests without adding it manually. This fixes rust-lang#56260

~~Blocked on `std::process::Termination` stabilization.~~

Using `Termination` would have been cleaner, but this should work OK.
Wrap write_bytes in a function. Move docs

This will allow us to add debug assertions.
See issue rust-lang#53871.
Monomorphize less code in fs::{read|write}

Since the generic-ness is only for the as_refs, might as well have std just compile the important part once instead of on every use.
…ts, r=oli-obk

Mention capping forbid lints

I felt the description of forbid was misleading/incomplete without
mentioning how --cap-lints interacts with it.
…acrum

Add alias methods to PathBuf for underlying OsString (rust-lang#58234)

Implemented the following methods on PathBuf which forward to the underlying OsString.

- capacity
- with_capacity
- clear
- reserve
- reserve_exact
- shrink_to_fit
- shrink_to

These methods have been documented with reference to the original docs for `OsString`. @Mark-Simulacrum please let me know if you feel this does not suffice.

Further, I've not yet included tests for these definitions - please advise on how comprehensive tests need to be for methods such as these that simply alias other (already tested) methods.

(This PR addresses issue rust-lang#58234)
…TimNN

Fix doc for rustc "-g" flag

The rustc `-g` CLI flag was miss documented to be a synonym of `-C debug-level=2` and not `-C debuglevel=2`. Also add links to the codegen docs for each synonym.

I am unsure of this will conflict with work on rust-lang#52938
…Centril

Add regression test for a specialization-related ICE (rust-lang#39448)

Closes rust-lang#39448.

This is my first time contributing, I hope I got everything right. :)
@GuillaumeGomez
Copy link
Member Author

@bors: r+ p=7

@bors
Copy link
Contributor

bors commented Feb 17, 2019

📌 Commit 6394d71 has been approved by GuillaumeGomez

@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 Feb 17, 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:0b7449c8:start=1550444884109648215,finish=1550444962037057684,duration=77927409469
$ 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
---
travis_time:start:test_debuginfo
Check compiletest suite=debuginfo mode=debuginfo-both (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
[01:12:28] 
[01:12:28] running 119 tests
[01:12:54] .iiiii...i.....i..i...i..i.i..i.ii...i.....i..i....i..........iiii..........i...ii...i.......ii.i.i. 100/119
[01:12:58] i......iii.i.....ii
[01:12:58] 
[01:12:58]  finished in 30.479
[01:12:58] travis_fold:end:test_debuginfo

---
[01:31:40] ..........iii......i......i...i......i.............................................................. 300/992
[01:31:45] .................................................................................................... 400/992
[01:31:54] ........................i.i.....................................iiii........ii...................... 500/992
[01:32:01] .................................................................................................... 600/992
[01:32:09] ............................................................................................F....... 700/992
[01:32:31] .................................................................................................... 900/992
[01:32:38] ......................................iiii..................................................
[01:32:38] failures:
[01:32:38] 
[01:32:38] 
[01:32:38] ---- path.rs - path::PathBuf::with_capacity (line 1153) stdout ----
[01:32:38] error[E0658]: use of unstable library feature 'path_buf_capacity' (see issue #58234)
[01:32:38]  --> path.rs:1156:12
[01:32:38] 6 | let path = PathBuf::with_capacity(10);
[01:32:38]   |            ^^^^^^^^^^^^^^^^^^^^^^
[01:32:38]   |
[01:32:38]   |
[01:32:38]   = help: add #![feature(path_buf_capacity)] to the crate attributes to enable
[01:32:38] 
[01:32:38] error[E0658]: use of unstable library feature 'path_buf_capacity' (see issue #58234)
[01:32:38]  --> path.rs:1157:21
[01:32:38]   |
[01:32:38] 7 | let capacity = path.capacity();
[01:32:38]   |
[01:32:38]   |
[01:32:38]   = help: add #![feature(path_buf_capacity)] to the crate attributes to enable
[01:32:38] 
[01:32:38] error[E0658]: use of unstable library feature 'path_buf_capacity' (see issue #58234)
[01:32:38]   --> path.rs:1162:27
[01:32:38]    |
[01:32:38] 12 | assert_eq!(capacity, path.capacity());
[01:32:38]    |
[01:32:38]    |
[01:32:38]    = help: add #![feature(path_buf_capacity)] to the crate attributes to enable
[01:32:38] thread 'path.rs - path::PathBuf::with_capacity (line 1153)' panicked at 'couldn't compile the test', src/librustdoc/test.rs:354:13
[01:32:38] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:32:38] 
[01:32:38] 
---
[01:32:38] 
[01:32:38] error: test failed, to rerun pass '--doc'
[01:32:38] 
[01:32:38] 
[01:32:38] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "test" "--target" "x86_64-unknown-linux-gnu" "-j" "4" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace" "--manifest-path" "/checkout/src/libstd/Cargo.toml" "-p" "std" "--" "--quiet"
[01:32:38] 
[01:32:38] 
[01:32:38] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:32:38] Build completed unsuccessfully in 0:32:00
[01:32:38] Build completed unsuccessfully in 0:32:00
[01:32:38] make: *** [check] Error 1
[01:32:38] Makefile:48: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:1757011e
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Feb 18 00:42:09 UTC 2019
---
travis_time:end:24430494:start=1550450530547432294,finish=1550450530552125071,duration=4692777
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:30806070
$ 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:08a1101d
travis_time:start:08a1101d
$ 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:084c0776
$ 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)

@Centril Centril closed this Feb 18, 2019
@GuillaumeGomez GuillaumeGomez deleted the rollup branch February 18, 2019 09:34
@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.