Skip to content

Commit 40feadb

Browse files
committed
Auto merge of #40950 - frewsxcv:rollup, r=frewsxcv
Rollup of 10 pull requests - Successful merges: #40694, #40842, #40869, #40888, #40898, #40904, #40925, #40928, #40929, #40934 - Failed merges:
2 parents a9329d3 + c34f533 commit 40feadb

File tree

21 files changed

+330
-129
lines changed

21 files changed

+330
-129
lines changed

src/Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/doc/unstable-book/src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@
146146
- [proc_macro](proc-macro.md)
147147
- [proc_macro_internals](proc-macro-internals.md)
148148
- [process_try_wait](process-try-wait.md)
149-
- [pub_restricted](pub-restricted.md)
150149
- [question_mark_carrier](question-mark-carrier.md)
151150
- [quote](quote.md)
152151
- [rand](rand.md)
@@ -156,11 +155,11 @@
156155
- [relaxed_adts](relaxed-adts.md)
157156
- [repr_simd](repr-simd.md)
158157
- [retain_hash_collection](retain-hash-collection.md)
158+
- [reverse_cmp_key](reverse-cmp-key.md)
159159
- [rt](rt.md)
160160
- [rustc_attrs](rustc-attrs.md)
161161
- [rustc_diagnostic_macros](rustc-diagnostic-macros.md)
162162
- [rustc_private](rustc-private.md)
163-
- [rustdoc](rustdoc.md)
164163
- [rvalue_static_promotion](rvalue-static-promotion.md)
165164
- [sanitizer_runtime](sanitizer-runtime.md)
166165
- [sanitizer_runtime_lib](sanitizer-runtime-lib.md)
@@ -181,6 +180,7 @@
181180
- [step_by](step-by.md)
182181
- [step_trait](step-trait.md)
183182
- [stmt_expr_attributes](stmt-expr-attributes.md)
183+
- [str_checked_slicing](str-checked-slicing.md)
184184
- [str_escape](str-escape.md)
185185
- [str_internals](str-internals.md)
186186
- [struct_field_attributes](struct-field-attributes.md)

src/doc/unstable-book/src/pub-restricted.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `reverse_cmp_key`
2+
3+
The tracking issue for this feature is: [#40893]
4+
5+
[#40893]: https://github.com/rust-lang/rust/issues/40893
6+
7+
------------------------

src/doc/unstable-book/src/rustdoc.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/doc/unstable-book/src/specialization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
The tracking issue for this feature is: [#31844]
44

5+
[#31844]: https://github.com/rust-lang/rust/issues/31844
6+
57
------------------------
68

79

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `str_checked_slicing`
2+
3+
The tracking issue for this feature is: [#39932]
4+
5+
[#39932]: https://github.com/rust-lang/rust/issues/39932
6+
7+
------------------------

src/libcore/cmp.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,15 @@ impl<T: PartialOrd> PartialOrd for Reverse<T> {
347347
fn partial_cmp(&self, other: &Reverse<T>) -> Option<Ordering> {
348348
other.0.partial_cmp(&self.0)
349349
}
350+
351+
#[inline]
352+
fn lt(&self, other: &Self) -> bool { other.0 < self.0 }
353+
#[inline]
354+
fn le(&self, other: &Self) -> bool { other.0 <= self.0 }
355+
#[inline]
356+
fn ge(&self, other: &Self) -> bool { other.0 >= self.0 }
357+
#[inline]
358+
fn gt(&self, other: &Self) -> bool { other.0 > self.0 }
350359
}
351360

352361
#[unstable(feature = "reverse_cmp_key", issue = "40893")]

src/libcore/macros.rs

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -337,27 +337,20 @@ macro_rules! try {
337337

338338
/// Write formatted data into a buffer
339339
///
340-
/// This macro accepts a 'writer' (any value with a `write_fmt` method), a format string, and a
341-
/// list of arguments to format.
340+
/// This macro accepts a format string, a list of arguments, and a 'writer'. Arguments will be
341+
/// formatted according to the specified format string and the result will be passed to the writer.
342+
/// The writer may be any value with a `write_fmt` method; generally this comes from an
343+
/// implementation of either the [`std::fmt::Write`] or the [`std::io::Write`] trait. The macro
344+
/// returns whatever the 'write_fmt' method returns; commonly a [`std::fmt::Result`], or an
345+
/// [`io::Result`].
342346
///
343-
/// The `write_fmt` method usually comes from an implementation of [`std::fmt::Write`][fmt_write]
344-
/// or [`std::io::Write`][io_write] traits. The term 'writer' refers to an implementation of one of
345-
/// these two traits.
347+
/// See [`std::fmt`] for more information on the format string syntax.
346348
///
347-
/// Passed arguments will be formatted according to the specified format string and the resulting
348-
/// string will be passed to the writer.
349-
///
350-
/// See [`std::fmt`][fmt] for more information on format syntax.
351-
///
352-
/// `write!` returns whatever the 'write_fmt' method returns.
353-
///
354-
/// Common return values include: [`fmt::Result`][fmt_result], [`io::Result`][io_result]
355-
///
356-
/// [fmt]: ../std/fmt/index.html
357-
/// [fmt_write]: ../std/fmt/trait.Write.html
358-
/// [io_write]: ../std/io/trait.Write.html
359-
/// [fmt_result]: ../std/fmt/type.Result.html
360-
/// [io_result]: ../std/io/type.Result.html
349+
/// [`std::fmt`]: ../std/fmt/index.html
350+
/// [`std::fmt::Write`]: ../std/fmt/trait.Write.html
351+
/// [`std::io::Write`]: ../std/io/trait.Write.html
352+
/// [`std::fmt::Result`]: ../std/fmt/type.Result.html
353+
/// [`io::Result`]: ../std/io/type.Result.html
361354
///
362355
/// # Examples
363356
///
@@ -396,27 +389,12 @@ macro_rules! write {
396389
/// On all platforms, the newline is the LINE FEED character (`\n`/`U+000A`) alone
397390
/// (no additional CARRIAGE RETURN (`\r`/`U+000D`).
398391
///
399-
/// This macro accepts a 'writer' (any value with a `write_fmt` method), a format string, and a
400-
/// list of arguments to format.
401-
///
402-
/// The `write_fmt` method usually comes from an implementation of [`std::fmt::Write`][fmt_write]
403-
/// or [`std::io::Write`][io_write] traits. The term 'writer' refers to an implementation of one of
404-
/// these two traits.
405-
///
406-
/// Passed arguments will be formatted according to the specified format string and the resulting
407-
/// string will be passed to the writer, along with the appended newline.
408-
///
409-
/// See [`std::fmt`][fmt] for more information on format syntax.
410-
///
411-
/// `write!` returns whatever the 'write_fmt' method returns.
392+
/// For more information, see [`write!`]. For information on the format string syntax, see
393+
/// [`std::fmt`].
412394
///
413-
/// Common return values include: [`fmt::Result`][fmt_result], [`io::Result`][io_result]
395+
/// [`write!`]: macro.write.html
396+
/// [`std::fmt`]: ../std/fmt/index.html
414397
///
415-
/// [fmt]: ../std/fmt/index.html
416-
/// [fmt_write]: ../std/fmt/trait.Write.html
417-
/// [io_write]: ../std/io/trait.Write.html
418-
/// [fmt_result]: ../std/fmt/type.Result.html
419-
/// [io_result]: ../std/io/type.Result.html
420398
///
421399
/// # Examples
422400
///

src/librustc/middle/expr_use_visitor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ impl<'a, 'gcx, 'tcx> ExprUseVisitor<'a, 'gcx, 'tcx> {
288288
}
289289

290290
pub fn consume_body(&mut self, body: &hir::Body) {
291+
debug!("consume_body(body={:?})", body);
292+
291293
for arg in &body.arguments {
292294
let arg_ty = return_if_err!(self.mc.infcx.node_ty(arg.pat.id));
293295

0 commit comments

Comments
 (0)