mark std::str::replace(,n) as #[must_use]#50177
Conversation
|
r? @aidanhs (rust_highfive has picked a reviewer for you, use r? to override) |
|
The same reasoning applies to the |
src/liballoc/str.rs
Outdated
There was a problem hiding this comment.
Just for consistency, the #[must_use] attribute usually comes before the stability attribute.
There was a problem hiding this comment.
Ok, will update. I'll wait with that + the replace() must_use attr until travis is done, in case this introduces bootstrap compiler warnings.
5f8bc3c to
61ced23
Compare
src/liballoc/str.rs
Outdated
There was a problem hiding this comment.
Hm. I hoped this would get rid of
[00:24:20] warning: `#[must_use]` on methods is experimental (see issue #43302)
[00:24:20] --> liballoc/str.rs:211:5
[00:24:20] |
[00:24:20] 211 | #[must_use]
[00:24:20] | ^^^^^^^^^^^
[00:24:20] |
[00:24:20] = help: add #![feature(fn_must_use)] to the crate attributes to enable
[00:24:20]
[00:24:20] warning: `#[must_use]` on methods is experimental (see issue #43302)
[00:24:20] --> liballoc/str.rs:251:5
[00:24:20] |
[00:24:20] 251 | #[must_use]
[00:24:20] | ^^^^^^^^^^^
[00:24:20] |
[00:24:20] = help: add #![feature(fn_must_use)] to the crate attributes to enable
[00:24:20]
but apparently it does't. What am I doing wrong?
There was a problem hiding this comment.
You need to add #![feature(fn_must_use)] to src/liballoc/lib.rs instead.
61ced23 to
5d37ba1
Compare
|
@bors r+ |
|
📌 Commit 5d37ba1 has been approved by |
|
@bors rollup |
|
⌛ Testing commit 5d37ba1 with merge 765cd68743868b2c9568307cf43d5df96dc361e8... |
|
💔 Test failed - status-appveyor |
|
The job Click to expand the log.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 |
|
@bors: retry
* crates.io was down
…On Tue, Apr 24, 2018 at 8:11 PM, bors ***@***.***> wrote:
💔 Test failed - status-appveyor
<https://ci.appveyor.com/project/rust-lang/rust/build/1.0.7136>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#50177 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AaPN0AlYANhbbvvxrkAIZQiwT2CeHUdlks5tr80kgaJpZM4TfwOv>
.
--
You received this message because you are subscribed to the Google Groups
"rust-ops" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ***@***.***
To post to this group, send email to ***@***.***
To view this discussion on the web visit https://groups.google.com/d/
msgid/rust-ops/rust-lang/rust/pull/50177/c384128494%40github.com
<https://groups.google.com/d/msgid/rust-ops/rust-lang/rust/pull/50177/c384128494%40github.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
|
|
@nagbot-rs: 🔑 Insufficient privileges: not in try users |
|
@bors: retry |
…_use, r=oli-obk
mark std::str::replace(,n) as #[must_use]
let x = "a b c c";
x.replacen("c", "d", 2");
might not do what people might think it does.
|
☔ The latest upstream changes (presumably #50245) made this pull request unmergeable. Please resolve the merge conflicts. |
let x = "a b c c";
x.replacen("c", "d", 2");
might not do what people might think it does.