Skip to content

Commit 9f91bee

Browse files
committed
Auto merge of #59370 - Centril:rollup, r=Centril
Rollup of 18 pull requests Successful merges: - #59106 (Add peer_addr function to UdpSocket) - #59170 (Add const generics to rustdoc) - #59172 (Update and clean up several parts of CONTRIBUTING.md) - #59190 (consistent naming for Rhs type parameter in libcore/ops) - #59236 (Rename miri component to miri-preview) - #59266 (Do not complain about non-existing fields after parse recovery) - #59273 (some small HIR doc improvements) - #59291 (Make Option<ThreadId> no larger than ThreadId, with NonZeroU64) - #59297 (convert field/method confusion help to suggestions) - #59304 (Move some bench tests back from libtest) - #59309 (Add messages for different verbosity levels. Output copy actions.) - #59321 (Unify E0109, E0110 and E0111) - #59322 (Tweak incorrect escaped char diagnostic) - #59323 (use suggestions for "enum instead of variant" error) - #59327 (Add NAN test to docs) - #59329 (cleanup: Remove compile-fail-fulldeps directory again) - #59347 (Move one test from run-make-fulldeps to ui) - #59360 (Add tracking issue number for `seek_convenience`) Failed merges: r? @ghost
2 parents cb2f34d + cf8c739 commit 9f91bee

File tree

106 files changed

+1055
-756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+1055
-756
lines changed

CONTRIBUTING.md

+29-23
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ links to the major sections:
1515
* [Helpful Links and Information](#helpful-links-and-information)
1616

1717
If you have questions, please make a post on [internals.rust-lang.org][internals] or
18-
hop on [#rust-internals][pound-rust-internals].
18+
hop on the [Rust Discord server][rust-discord], [Rust Zulip server][rust-zulip] or [#rust-internals][pound-rust-internals].
1919

2020
As a reminder, all contributors are expected to follow our [Code of Conduct][coc].
2121

@@ -27,14 +27,17 @@ can give you a good example of how a typical contribution would go.
2727

2828
[pound-rust-internals]: https://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-internals
2929
[internals]: https://internals.rust-lang.org
30+
[rust-discord]: http://discord.gg/rust-lang
31+
[rust-zulip]: https://rust-lang.zulipchat.com
3032
[coc]: https://www.rust-lang.org/conduct.html
33+
[rustc-guide]: https://rust-lang.github.io/rustc-guide/
3134
[walkthrough]: https://rust-lang.github.io/rustc-guide/walkthrough.html
3235

3336
## Feature Requests
3437
[feature-requests]: #feature-requests
3538

3639
To request a change to the way the Rust language works, please head over
37-
to the [RFCs repository](https://github.com/rust-lang/rfcs) and view the
40+
to the [RFCs repository](https://github.com/rust-lang/rfcs) and view the
3841
[README](https://github.com/rust-lang/rfcs/blob/master/README.md)
3942
for instructions.
4043

@@ -129,28 +132,40 @@ request); you can add [git hooks](https://git-scm.com/book/en/v2/Customizing-Git
129132
before every push to make sure you never forget to make this check.
130133

131134
All pull requests are reviewed by another person. We have a bot,
132-
@rust-highfive, that will automatically assign a random person to review your
135+
[@rust-highfive][rust-highfive], that will automatically assign a random person to review your
133136
request.
134137

135138
If you want to request that a specific person reviews your pull request,
136-
you can add an `r?` to the message. For example, Steve usually reviews
139+
you can add an `r?` to the message. For example, [Steve][steveklabnik] usually reviews
137140
documentation changes. So if you were to make a documentation change, add
138141

139142
r? @steveklabnik
140143

141-
to the end of the message, and @rust-highfive will assign @steveklabnik instead
144+
to the end of the message, and @rust-highfive will assign [@steveklabnik][steveklabnik] instead
142145
of a random person. This is entirely optional.
143146

144147
After someone has reviewed your pull request, they will leave an annotation
145148
on the pull request with an `r+`. It will look something like this:
146149

147-
@bors: r+ 38fe8d2
150+
@bors r+
148151

149-
This tells @bors, our lovable integration bot, that your pull request has
150-
been approved. The PR then enters the [merge queue][merge-queue], where @bors
152+
This tells [@bors][bors], our lovable integration bot, that your pull request has
153+
been approved. The PR then enters the [merge queue][merge-queue], where [@bors][bors]
151154
will run all the tests on every platform we support. If it all works out,
152-
@bors will merge your code into `master` and close the pull request.
155+
[@bors][bors] will merge your code into `master` and close the pull request.
153156

157+
Depending on the scale of the change, you may see a slightly different form of `r+`:
158+
159+
@bors r+ rollup
160+
161+
The additional `rollup` tells [@bors][bors] that this change is eligible for to be
162+
"rolled up". Changes that are rolled up are tested and merged at the same time, to
163+
speed the process up. Typically only small changes that are expected not to conflict
164+
with one another are rolled up.
165+
166+
[rust-highfive]: https://github.com/rust-highfive
167+
[steveklabnik]: https://github.com/steveklabnik
168+
[bors]: https://github.com/bors
154169
[merge-queue]: https://buildbot2.rust-lang.org/homu/queue/rust
155170

156171
Speaking of tests, Rust has a comprehensive test suite. More information about
@@ -190,7 +205,7 @@ before the PR is merged.
190205
[breaking-tools-built-with-the-compiler]: #breaking-tools-built-with-the-compiler
191206

192207
Rust's build system builds a number of tools that make use of the
193-
internals of the compiler. This includes
208+
internals of the compiler. This includes
194209
[Clippy](https://github.com/rust-lang/rust-clippy),
195210
[RLS](https://github.com/rust-lang/rls) and
196211
[rustfmt](https://github.com/rust-lang/rustfmt). If these tools
@@ -292,18 +307,8 @@ the submodule to. Running `./x.py build` should work now.
292307

293308
Documentation improvements are very welcome. The source of `doc.rust-lang.org`
294309
is located in `src/doc` in the tree, and standard API documentation is generated
295-
from the source code itself.
296-
297-
Documentation pull requests function in the same way as other pull requests,
298-
though you may see a slightly different form of `r+`:
299-
300-
@bors: r+ 38fe8d2 rollup
301-
302-
That additional `rollup` tells @bors that this change is eligible for a 'rollup'.
303-
To save @bors some work, and to get small changes through more quickly, when
304-
@bors attempts to merge a commit that's rollup-eligible, it will also merge
305-
the other rollup-eligible patches too, and they'll get tested and merged at
306-
the same time.
310+
from the source code itself. Documentation pull requests function in the same way
311+
as other pull requests.
307312

308313
To find documentation-related issues, sort by the [T-doc label][tdoc].
309314

@@ -428,7 +433,8 @@ are:
428433
* Although out of date, [Tom Lee's great blog article][tlgba] is very helpful
429434
* [rustaceans.org][ro] is helpful, but mostly dedicated to IRC
430435
* The [Rust Compiler Testing Docs][rctd]
431-
* For @bors, [this cheat sheet][cheatsheet] is helpful (Remember to replace `@homu` with `@bors` in the commands that you use.)
436+
* For [@bors][bors], [this cheat sheet][cheatsheet] is helpful
437+
(though you'll need to replace `@homu` with `@bors` in any commands)
432438
* **Google!** ([search only in Rust Documentation][gsearchdocs] to find types, traits, etc. quickly)
433439
* Don't be afraid to ask! The Rust community is friendly and helpful.
434440

src/bootstrap/lib.rs

+12
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,17 @@ impl Build {
726726
}
727727
}
728728

729+
pub fn is_verbose_than(&self, level: usize) -> bool {
730+
self.verbosity > level
731+
}
732+
733+
/// Prints a message if this build is configured in more verbose mode than `level`.
734+
fn verbose_than(&self, level: usize, msg: &str) {
735+
if self.is_verbose_than(level) {
736+
println!("{}", msg);
737+
}
738+
}
739+
729740
fn info(&self, msg: &str) {
730741
if self.config.dry_run { return; }
731742
println!("{}", msg);
@@ -1158,6 +1169,7 @@ impl Build {
11581169
/// Copies a file from `src` to `dst`
11591170
pub fn copy(&self, src: &Path, dst: &Path) {
11601171
if self.config.dry_run { return; }
1172+
self.verbose_than(1, &format!("Copy {:?} to {:?}", src, dst));
11611173
let _ = fs::remove_file(&dst);
11621174
let metadata = t!(src.symlink_metadata());
11631175
if metadata.file_type().is_symlink() {

src/libcore/ops/arith.rs

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// The addition operator `+`.
22
///
3-
/// Note that `RHS` is `Self` by default, but this is not mandatory. For
3+
/// Note that `Rhs` is `Self` by default, but this is not mandatory. For
44
/// example, [`std::time::SystemTime`] implements `Add<Duration>`, which permits
55
/// operations of the form `SystemTime = SystemTime + Duration`.
66
///
@@ -67,26 +67,26 @@
6767
#[stable(feature = "rust1", since = "1.0.0")]
6868
#[rustc_on_unimplemented(
6969
on(
70-
all(_Self="{integer}", RHS="{float}"),
70+
all(_Self="{integer}", Rhs="{float}"),
7171
message="cannot add a float to an integer",
7272
),
7373
on(
74-
all(_Self="{float}", RHS="{integer}"),
74+
all(_Self="{float}", Rhs="{integer}"),
7575
message="cannot add an integer to a float",
7676
),
77-
message="cannot add `{RHS}` to `{Self}`",
78-
label="no implementation for `{Self} + {RHS}`",
77+
message="cannot add `{Rhs}` to `{Self}`",
78+
label="no implementation for `{Self} + {Rhs}`",
7979
)]
8080
#[doc(alias = "+")]
81-
pub trait Add<RHS=Self> {
81+
pub trait Add<Rhs=Self> {
8282
/// The resulting type after applying the `+` operator.
8383
#[stable(feature = "rust1", since = "1.0.0")]
8484
type Output;
8585

8686
/// Performs the `+` operation.
8787
#[must_use]
8888
#[stable(feature = "rust1", since = "1.0.0")]
89-
fn add(self, rhs: RHS) -> Self::Output;
89+
fn add(self, rhs: Rhs) -> Self::Output;
9090
}
9191

9292
macro_rules! add_impl {
@@ -108,7 +108,7 @@ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
108108

109109
/// The subtraction operator `-`.
110110
///
111-
/// Note that `RHS` is `Self` by default, but this is not mandatory. For
111+
/// Note that `Rhs` is `Self` by default, but this is not mandatory. For
112112
/// example, [`std::time::SystemTime`] implements `Sub<Duration>`, which permits
113113
/// operations of the form `SystemTime = SystemTime - Duration`.
114114
///
@@ -173,18 +173,18 @@ add_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
173173
/// ```
174174
#[lang = "sub"]
175175
#[stable(feature = "rust1", since = "1.0.0")]
176-
#[rustc_on_unimplemented(message="cannot subtract `{RHS}` from `{Self}`",
177-
label="no implementation for `{Self} - {RHS}`")]
176+
#[rustc_on_unimplemented(message="cannot subtract `{Rhs}` from `{Self}`",
177+
label="no implementation for `{Self} - {Rhs}`")]
178178
#[doc(alias = "-")]
179-
pub trait Sub<RHS=Self> {
179+
pub trait Sub<Rhs=Self> {
180180
/// The resulting type after applying the `-` operator.
181181
#[stable(feature = "rust1", since = "1.0.0")]
182182
type Output;
183183

184184
/// Performs the `-` operation.
185185
#[must_use]
186186
#[stable(feature = "rust1", since = "1.0.0")]
187-
fn sub(self, rhs: RHS) -> Self::Output;
187+
fn sub(self, rhs: Rhs) -> Self::Output;
188188
}
189189

190190
macro_rules! sub_impl {
@@ -206,7 +206,7 @@ sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
206206

207207
/// The multiplication operator `*`.
208208
///
209-
/// Note that `RHS` is `Self` by default, but this is not mandatory.
209+
/// Note that `Rhs` is `Self` by default, but this is not mandatory.
210210
///
211211
/// # Examples
212212
///
@@ -293,18 +293,18 @@ sub_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
293293
/// ```
294294
#[lang = "mul"]
295295
#[stable(feature = "rust1", since = "1.0.0")]
296-
#[rustc_on_unimplemented(message="cannot multiply `{RHS}` to `{Self}`",
297-
label="no implementation for `{Self} * {RHS}`")]
296+
#[rustc_on_unimplemented(message="cannot multiply `{Rhs}` to `{Self}`",
297+
label="no implementation for `{Self} * {Rhs}`")]
298298
#[doc(alias = "*")]
299-
pub trait Mul<RHS=Self> {
299+
pub trait Mul<Rhs=Self> {
300300
/// The resulting type after applying the `*` operator.
301301
#[stable(feature = "rust1", since = "1.0.0")]
302302
type Output;
303303

304304
/// Performs the `*` operation.
305305
#[must_use]
306306
#[stable(feature = "rust1", since = "1.0.0")]
307-
fn mul(self, rhs: RHS) -> Self::Output;
307+
fn mul(self, rhs: Rhs) -> Self::Output;
308308
}
309309

310310
macro_rules! mul_impl {
@@ -326,7 +326,7 @@ mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
326326

327327
/// The division operator `/`.
328328
///
329-
/// Note that `RHS` is `Self` by default, but this is not mandatory.
329+
/// Note that `Rhs` is `Self` by default, but this is not mandatory.
330330
///
331331
/// # Examples
332332
///
@@ -417,18 +417,18 @@ mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
417417
/// ```
418418
#[lang = "div"]
419419
#[stable(feature = "rust1", since = "1.0.0")]
420-
#[rustc_on_unimplemented(message="cannot divide `{Self}` by `{RHS}`",
421-
label="no implementation for `{Self} / {RHS}`")]
420+
#[rustc_on_unimplemented(message="cannot divide `{Self}` by `{Rhs}`",
421+
label="no implementation for `{Self} / {Rhs}`")]
422422
#[doc(alias = "/")]
423-
pub trait Div<RHS=Self> {
423+
pub trait Div<Rhs=Self> {
424424
/// The resulting type after applying the `/` operator.
425425
#[stable(feature = "rust1", since = "1.0.0")]
426426
type Output;
427427

428428
/// Performs the `/` operation.
429429
#[must_use]
430430
#[stable(feature = "rust1", since = "1.0.0")]
431-
fn div(self, rhs: RHS) -> Self::Output;
431+
fn div(self, rhs: Rhs) -> Self::Output;
432432
}
433433

434434
macro_rules! div_impl_integer {
@@ -467,7 +467,7 @@ div_impl_float! { f32 f64 }
467467

468468
/// The remainder operator `%`.
469469
///
470-
/// Note that `RHS` is `Self` by default, but this is not mandatory.
470+
/// Note that `Rhs` is `Self` by default, but this is not mandatory.
471471
///
472472
/// # Examples
473473
///
@@ -502,18 +502,18 @@ div_impl_float! { f32 f64 }
502502
/// ```
503503
#[lang = "rem"]
504504
#[stable(feature = "rust1", since = "1.0.0")]
505-
#[rustc_on_unimplemented(message="cannot mod `{Self}` by `{RHS}`",
506-
label="no implementation for `{Self} % {RHS}`")]
505+
#[rustc_on_unimplemented(message="cannot mod `{Self}` by `{Rhs}`",
506+
label="no implementation for `{Self} % {Rhs}`")]
507507
#[doc(alias = "%")]
508-
pub trait Rem<RHS=Self> {
508+
pub trait Rem<Rhs=Self> {
509509
/// The resulting type after applying the `%` operator.
510510
#[stable(feature = "rust1", since = "1.0.0")]
511511
type Output = Self;
512512

513513
/// Performs the `%` operation.
514514
#[must_use]
515515
#[stable(feature = "rust1", since = "1.0.0")]
516-
fn rem(self, rhs: RHS) -> Self::Output;
516+
fn rem(self, rhs: Rhs) -> Self::Output;
517517
}
518518

519519
macro_rules! rem_impl_integer {

0 commit comments

Comments
 (0)