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 6 pull requests #60208

Closed
wants to merge 22 commits into from

Conversation

Projects
None yet
9 participants
@Centril
Copy link
Member

commented Apr 23, 2019

Successful merges:

  • #59739 (Stabilize futures_api)
  • #59839 (Warn on unused results for operation methods on nums)
  • #60146 (Update fonts used by rustdoc)
  • #60169 (Warn when ignore-tidy-linelength is present, but no lines are too long)
  • #60177 (Promote rust comments to rustdoc)
  • #60191 (Add f16c target_feature)

Failed merges:

r? @ghost

KodrAus and others added some commits Apr 10, 2019

Rollup merge of #59739 - cramertj:stabilize, r=withoutboats
Stabilize futures_api

cc #59725.
Based on #59733 and #59119 -- only the last two commits here are relevant.

r? @withoutboats , @oli-obk for the introduction of `rustc_allow_const_fn_ptr`.
Rollup merge of #59839 - KodrAus:must-use-num, r=sfackler
Warn on unused results for operation methods on nums

From a suggestion by @llogiq

Adds a `#[must_use]` attribute to operation methods on integers that take self by value as the first operand and another value as the second. It makes it clear that these methods return the result of the operation instead of mutating `self`, which is the source of a rather embarrassing bug I had in a codebase of mine recently...

As an example:

```rust
struct Int {
   value: i64,
}

impl Int {
    fn add(&mut self, other: i64) {
        self.value.wrapping_add(other);
    }
}
```

Will produce a warning like:

```
warning: unused return value of `core::num::<impl i64>::wrapping_add` that must be used
 --> src/main.rs:7:7
  |
7 |       self.value.wrapping_add(other);
  |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_must_use)] on by default
  = note: this returns the result of the operation, without modifying the original
```

If this is something we're on board with, we could do something similar for `f32` and `f64` too. There are probably other methods on integers that make sense.
Rollup merge of #60146 - Manishearth:font-update, r=QuietMisdreavus
Update fonts used by rustdoc

Our version of Source Serif Pro is pretty old and is causing issues on Linux, see https://bugzilla.mozilla.org/show_bug.cgi?id=1545317 . I took this opportunity to update all of the fonts we use.

r? @steveklabnik @QuietMisdreavus
Rollup merge of #60169 - varkor:tidy-unnecessary-ignore-newline, r=ke…
…nnytm

Warn when ignore-tidy-linelength is present, but no lines are too long

It's easy for a `// ignore-tidy-linelength` to be added when there is a genuine need to ignore a file's line length, but then after refactoring the need is gone, but the tidy directive is not removed. This means that in the future, further editing may accidentally add unnecessarily long lines. This change forces `// ignore-tidy-linelength` to be used exactly when necessary, to make sure such changes are intentional.
Rollup merge of #60177 - rasendubi:rustdoc-comments, r=varkor
Promote rust comments to rustdoc
Rollup merge of #60191 - gnzlbg:f16c, r=alexcrichton
Add f16c target_feature

This is requires for Intel 16-bit half-precision float intrinsics: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=fp16&expand=1769 - see companion stdsimd PR: rust-lang-nursery/stdsimd#737.

LLVM, Wikipedia CPUID page, and the Intel Dev Manual all call this CPUID feature "F16C", but the Intel intrinsics guide calls this "FP16C" - this is probably a bug in the intrinsics guide which we are tracking here: rust-lang-nursery/stdsimd#738

r? @alexcrichton
@Centril

This comment has been minimized.

Copy link
Member Author

commented Apr 23, 2019

@bors r+ p=6

@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

📌 Commit 97b74a5 has been approved by Centril

bors added a commit that referenced this pull request Apr 23, 2019

Auto merge of #60208 - Centril:rollup-vg8gl67, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #59739 (Stabilize futures_api)
 - #59839 (Warn on unused results for operation methods on nums)
 - #60146 (Update fonts used by rustdoc)
 - #60169 (Warn when ignore-tidy-linelength is present, but no lines are too long)
 - #60177 (Promote rust comments to rustdoc)
 - #60191 (Add f16c target_feature)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

⌛️ Testing commit 97b74a5 with merge ab6e5a2...

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 23, 2019

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:01efb1fa:start=1556044724789612055,finish=1556044823895987550,duration=99106375495
$ 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
$ export AWS_ACCESS_KEY_ID=AKIA46X5W6CZEJZ6XT55
---
[01:04:08] ..........................................................................................i......... 500/5462
[01:04:12] .................................................................................................... 600/5462
[01:04:15] .................................................................................................... 700/5462
[01:04:21] .................................................................................................... 800/5462
[01:04:26] ..........F.............................................i...............i........................... 900/5462
[01:04:29] .........................................................................................iiiii...... 1000/5462
[01:04:36] .................................................................................................... 1200/5462
[01:04:39] .................................................................................................... 1300/5462
[01:04:42] .................................................................................................... 1400/5462
[01:04:45] .................................................................................................... 1500/5462
---
[01:07:20] - error[E0723]: function pointers in const fn are unstable (see issue #57563)
[01:07:20] + error[E0723]: function pointers in const fn are unstable
[01:07:20] 2   --> $DIR/allow_const_fn_ptr.rs:4:16
[01:07:20] 3    |
[01:07:20] 4 LL | const fn error(_: fn()) {}
[01:07:20] 5    |                ^
[01:07:20] 6    |
[01:07:20] +    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[01:07:20] 7    = help: add #![feature(const_fn)] to the crate attributes to enable
[01:07:20] 7    = help: add #![feature(const_fn)] to the crate attributes to enable
[01:07:20] 8 
[01:07:20] 9 error: aborting due to previous error
[01:07:20] 
[01:07:20] 
[01:07:20] The actual stderr differed from the expected stderr.
[01:07:20] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/min_const_fn/allow_const_fn_ptr/allow_const_fn_ptr.stderr
[01:07:20] To update references, rerun the tests and pass the `--bless` flag
[01:07:20] To only update this specific test, also pass `--test-args consts/min_const_fn/allow_const_fn_ptr.rs`
[01:07:20] error: 1 errors occurred comparing output.
[01:07:20] status: exit code: 1
[01:07:20] status: exit code: 1
[01:07:20] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.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/consts/min_const_fn/allow_const_fn_ptr/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/min_const_fn/allow_const_fn_ptr/auxiliary" "-A" "unused"
[01:07:20] ------------------------------------------
[01:07:20] 
[01:07:20] ------------------------------------------
[01:07:20] stderr:
[01:07:20] stderr:
[01:07:20] ------------------------------------------
[01:07:20] error[E0723]: function pointers in const fn are unstable
[01:07:20]   --> /checkout/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs:4:16
[01:07:20]    |
[01:07:20] LL | const fn error(_: fn()) {} //~ ERROR function pointers in const fn are unstable
[01:07:20]    |
[01:07:20]    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[01:07:20]    = help: add #![feature(const_fn)] to the crate attributes to enable
[01:07:20] 
---
[01:07:20] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:517:22
[01:07:20] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[01:07:20] 
[01:07:20] 
[01:07:20] 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:07:20] 
[01:07:20] 
[01:07:20] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[01:07:20] Build completed unsuccessfully in 0:04:30
[01:07:20] Build completed unsuccessfully in 0:04:30
[01:07:20] Makefile:48: recipe for target 'check' failed
[01:07:20] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0ae34086
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Apr 23 19:47:53 UTC 2019
---
travis_time:end:0177c040:start=1556048875080163872,finish=1556048875085049343,duration=4885471
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:04c98741
$ 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:1f3f2970
travis_time:start:1f3f2970
$ 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:05106c18
$ 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)

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Apr 23, 2019

The job dist-i586-gnu-i586-i686-musl 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:57:26] - error[E0723]: function pointers in const fn are unstable (see issue #57563)
[00:57:26] + error[E0723]: function pointers in const fn are unstable
[00:57:26] 2   --> $DIR/allow_const_fn_ptr.rs:4:16
[00:57:26] 3    |
[00:57:26] 4 LL | const fn error(_: fn()) {}
[00:57:26] 5    |                ^
[00:57:26] 6    |
[00:57:26] +    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:57:26] 7    = help: add #![feature(const_fn)] to the crate attributes to enable
[00:57:26] 7    = help: add #![feature(const_fn)] to the crate attributes to enable
[00:57:26] 8 
[00:57:26] 9 error: aborting due to previous error
[00:57:26] 
[00:57:26] 
[00:57:26] The actual stderr differed from the expected stderr.
[00:57:26] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/min_const_fn/allow_const_fn_ptr/allow_const_fn_ptr.stderr
[00:57:26] To update references, rerun the tests and pass the `--bless` flag
[00:57:26] To only update this specific test, also pass `--test-args consts/min_const_fn/allow_const_fn_ptr.rs`
[00:57:26] error: 1 errors occurred comparing output.
[00:57:26] status: exit code: 1
[00:57:26] status: exit code: 1
[00:57:26] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs" "-Zthreads=1" "--target=i586-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/min_const_fn/allow_const_fn_ptr/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/i586-unknown-linux-gnu/native/rust-test-helpers" "-Clinker=cc" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/min_const_fn/allow_const_fn_ptr/auxiliary" "-A" "unused"
[00:57:26] ------------------------------------------
[00:57:26] 
[00:57:26] ------------------------------------------
[00:57:26] stderr:
[00:57:26] stderr:
[00:57:26] ------------------------------------------
[00:57:26] error[E0723]: function pointers in const fn are unstable
[00:57:26]   --> /checkout/src/test/ui/consts/min_const_fn/allow_const_fn_ptr.rs:4:16
[00:57:26]    |
[00:57:26] LL | const fn error(_: fn()) {} //~ ERROR function pointers in const fn are unstable
[00:57:26]    |
[00:57:26]    = note: for more information, see issue https://github.com/rust-lang/rust/issues/57563
[00:57:26]    = help: add #![feature(const_fn)] to the crate attributes to enable
[00:57:26] 
---
[00:57:26] test result: FAILED. 5429 passed; 1 failed; 33 ignored; 0 measured; 0 filtered out
[00:57:26] 
[00:57:26] 
[00:57:26] 
[00:57:26] 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/i586-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-i586-unknown-linux-gnu" "--mode" "ui" "--target" "i586-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "cc" "--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/i586-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" "8.0.0-rust-1.36.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:57:26] 
[00:57:26] 
[00:57:26] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target i586-unknown-linux-gnu,i686-unknown-linux-musl
[00:57:26] Build completed unsuccessfully in 0:53:51
---
travis_time:end:0e287610:start=1556048950108511603,finish=1556048950127415901,duration=18904298
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:021988a0
$ 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:0ec012ce
travis_time:start:0ec012ce
$ 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:009eb96a
$ 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

This comment has been minimized.

Copy link
Contributor

commented Apr 23, 2019

💔 Test failed - checks-travis

@Centril Centril referenced this pull request Apr 23, 2019

Merged

Stabilize futures_api #59739

@Centril Centril closed this Apr 23, 2019

@Centril Centril deleted the Centril:rollup-vg8gl67 branch Apr 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.