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 18 pull requests #59370

Merged
merged 66 commits into from
Mar 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
ff5e31f
Fix a broken link to the rustc-guide
varkor Mar 14, 2019
6e449da
Remove trailing newlines
varkor Mar 14, 2019
205ab0c
Add a link to the Discord and Zulip servers
varkor Mar 14, 2019
6f3fda9
Add links to @rust-highfive and @bors
varkor Mar 14, 2019
eadb844
Update r+ syntax
varkor Mar 14, 2019
308a002
Make all references to @bors or users links
varkor Mar 14, 2019
3a00649
Move rollup description earlier
varkor Mar 14, 2019
037596c
Fix capitalisation problem
varkor Mar 14, 2019
fec0ff2
consistent naming for Rhs type parameter in libcore/ops
greg-kargin Mar 14, 2019
7f395d2
fix tests
greg-kargin Mar 15, 2019
a7bd36c
Add peer_addr function to UdpSocket
LinusU Mar 11, 2019
bf473e3
Mark UdpSocket peer_addr unstable w/ tracking issue
LinusU Mar 12, 2019
24e3fa0
Document UdpSocket peer_addr NotConnected error
LinusU Mar 12, 2019
7f7cfae
Add test for UdpSocket peer_addr
LinusU Mar 12, 2019
7e73cd4
Fix test names regarding ip version
LinusU Mar 12, 2019
214110b
Add UdpSocket peer_addr implementation for L4Re
LinusU Mar 16, 2019
81d5fb5
Add UdpSocket peer_addr implementation for Wasm
LinusU Mar 16, 2019
6007e6f
Do not complain about non-existing fields after parse recovery
estebank Mar 18, 2019
bb832c2
some small HIR doc improvements
llogiq Mar 18, 2019
ec6f983
Rename typarams to param_names
varkor Mar 13, 2019
c915fe0
Rename external_typarams to external_param_names
varkor Mar 13, 2019
1491315
Implement `Clean` for const generics
varkor Mar 13, 2019
29ed491
Add `GenericArg`
varkor Mar 13, 2019
cd9a2c0
Refactor `GenericArgs` to include const generics
varkor Mar 13, 2019
38d98a1
Implement const generics in `generics_to_path_params`
varkor Mar 13, 2019
9925d9b
Fix indentation issue
varkor Mar 14, 2019
b39e664
Make clean::Constant display respect f.alternate()
varkor Mar 18, 2019
f93ad41
Rename first_ty_sty to ty_sty
varkor Mar 18, 2019
9bc5811
Rebase over LazyConst changes
varkor Mar 18, 2019
37789c4
Update src/librustc/hir/mod.rs
Centril Mar 19, 2019
8cf720b
Make Option<ThreadId> no larger than ThreadId, with NonZeroU64
SimonSapin Mar 19, 2019
a291d4e
convert field/method confusion help to suggestions
euclio Mar 19, 2019
757eb67
review comments
estebank Mar 19, 2019
46a8beb
Move some bench tests back from libtest
gnzlbg Mar 20, 2019
b6e5d73
Add messages for different verbosity levels.
o01eg Mar 20, 2019
c1d9191
Add a test for size_of Option<ThreadId>
SimonSapin Mar 20, 2019
c745708
Unify E0109, E0110 and E0111 diagnostic messages
varkor Mar 20, 2019
4900585
Unify E0109, E0110 and E0111 errors
varkor Mar 20, 2019
aff175b
Update tests
varkor Mar 20, 2019
a8120d6
Tweak incorrect escaped char diagnostic
estebank Mar 20, 2019
2f8d9a2
Add NAN test to docs
Xaeroxe Mar 20, 2019
e2b5a03
Fix formatting and add unit tests for panic cases
Xaeroxe Mar 20, 2019
295cc77
cleanup: Remove compile-fail-fulldeps directory again
petrochenkov Mar 20, 2019
72f5d91
Fix f64 test
Xaeroxe Mar 20, 2019
16a8abe
use suggestions for "enum instead of variant" error
euclio Mar 20, 2019
6389478
Move one test from run-make-fulldeps to ui
petrochenkov Mar 21, 2019
c97d3d4
Add tracking issue number for `seek_convenience`
LukasKalbertodt Mar 22, 2019
9ee3a40
Rename miri component to miri-preview
mati865 Mar 22, 2019
5481b4e
Rollup merge of #59106 - LinusU:udp-peer-addr, r=kennytm
Centril Mar 22, 2019
4c79967
Rollup merge of #59170 - varkor:const-generics-rustdoc, r=QuietMisdre…
Centril Mar 22, 2019
e744fb7
Rollup merge of #59172 - varkor:contributing-contributions, r=stevekl…
Centril Mar 22, 2019
225b6ba
Rollup merge of #59190 - greg-kargin:master, r=sanxiyn
Centril Mar 22, 2019
adbfcea
Rollup merge of #59236 - mati865:miri-preview, r=oli-obk
Centril Mar 22, 2019
5a0e451
Rollup merge of #59266 - estebank:struct-parse-recovery, r=petrochenkov
Centril Mar 22, 2019
28644cd
Rollup merge of #59273 - llogiq:hir-docs, r=matthewjasper
Centril Mar 22, 2019
d2a958f
Rollup merge of #59291 - SimonSapin:nonzero-thread-id, r=alexcrichton
Centril Mar 22, 2019
0407c64
Rollup merge of #59297 - euclio:field-method-suggestions, r=estebank
Centril Mar 22, 2019
8a36f76
Rollup merge of #59304 - gnzlbg:bench_tests, r=alexcrichton
Centril Mar 22, 2019
f1f3470
Rollup merge of #59309 - o01eg:verbose-copy-files, r=alexcrichton
Centril Mar 22, 2019
11429b2
Rollup merge of #59321 - varkor:unify-E0109-E0110-E0111, r=davidtwco
Centril Mar 22, 2019
9d33d6f
Rollup merge of #59322 - estebank:diag-tweak, r=davidtwco
Centril Mar 22, 2019
de08d0e
Rollup merge of #59323 - euclio:enum-instead-of-variant, r=varkor
Centril Mar 22, 2019
9943a44
Rollup merge of #59327 - Xaeroxe:clamp-doc, r=scottmcm
Centril Mar 22, 2019
aae75cf
Rollup merge of #59329 - petrochenkov:rmcff, r=alexcrichton
Centril Mar 22, 2019
4be19e3
Rollup merge of #59347 - petrochenkov:nomake, r=davidtwco
Centril Mar 22, 2019
cf8c739
Rollup merge of #59360 - LukasKalbertodt:patch-2, r=rkruppe
Centril Mar 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 29 additions & 23 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ links to the major sections:
* [Helpful Links and Information](#helpful-links-and-information)

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

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

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

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

## Feature Requests
[feature-requests]: #feature-requests

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

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

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

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

r? @steveklabnik

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

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

@bors: r+ 38fe8d2
@bors r+

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

Depending on the scale of the change, you may see a slightly different form of `r+`:

@bors r+ rollup

The additional `rollup` tells [@bors][bors] that this change is eligible for to be
"rolled up". Changes that are rolled up are tested and merged at the same time, to
speed the process up. Typically only small changes that are expected not to conflict
with one another are rolled up.

[rust-highfive]: https://github.com/rust-highfive
[steveklabnik]: https://github.com/steveklabnik
[bors]: https://github.com/bors
[merge-queue]: https://buildbot2.rust-lang.org/homu/queue/rust

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

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

Documentation improvements are very welcome. The source of `doc.rust-lang.org`
is located in `src/doc` in the tree, and standard API documentation is generated
from the source code itself.

Documentation pull requests function in the same way as other pull requests,
though you may see a slightly different form of `r+`:

@bors: r+ 38fe8d2 rollup

That additional `rollup` tells @bors that this change is eligible for a 'rollup'.
To save @bors some work, and to get small changes through more quickly, when
@bors attempts to merge a commit that's rollup-eligible, it will also merge
the other rollup-eligible patches too, and they'll get tested and merged at
the same time.
from the source code itself. Documentation pull requests function in the same way
as other pull requests.

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

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

Expand Down
12 changes: 12 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,17 @@ impl Build {
}
}

pub fn is_verbose_than(&self, level: usize) -> bool {
self.verbosity > level
}

/// Prints a message if this build is configured in more verbose mode than `level`.
fn verbose_than(&self, level: usize, msg: &str) {
if self.is_verbose_than(level) {
println!("{}", msg);
}
}

fn info(&self, msg: &str) {
if self.config.dry_run { return; }
println!("{}", msg);
Expand Down Expand Up @@ -1158,6 +1169,7 @@ impl Build {
/// Copies a file from `src` to `dst`
pub fn copy(&self, src: &Path, dst: &Path) {
if self.config.dry_run { return; }
self.verbose_than(1, &format!("Copy {:?} to {:?}", src, dst));
let _ = fs::remove_file(&dst);
let metadata = t!(src.symlink_metadata());
if metadata.file_type().is_symlink() {
Expand Down
54 changes: 27 additions & 27 deletions src/libcore/ops/arith.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// The addition operator `+`.
///
/// Note that `RHS` is `Self` by default, but this is not mandatory. For
/// Note that `Rhs` is `Self` by default, but this is not mandatory. For
/// example, [`std::time::SystemTime`] implements `Add<Duration>`, which permits
/// operations of the form `SystemTime = SystemTime + Duration`.
///
Expand Down Expand Up @@ -67,26 +67,26 @@
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented(
on(
all(_Self="{integer}", RHS="{float}"),
all(_Self="{integer}", Rhs="{float}"),
message="cannot add a float to an integer",
),
on(
all(_Self="{float}", RHS="{integer}"),
all(_Self="{float}", Rhs="{integer}"),
message="cannot add an integer to a float",
),
message="cannot add `{RHS}` to `{Self}`",
label="no implementation for `{Self} + {RHS}`",
message="cannot add `{Rhs}` to `{Self}`",
label="no implementation for `{Self} + {Rhs}`",
)]
#[doc(alias = "+")]
pub trait Add<RHS=Self> {
pub trait Add<Rhs=Self> {
/// The resulting type after applying the `+` operator.
#[stable(feature = "rust1", since = "1.0.0")]
type Output;

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

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

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

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

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

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

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

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

/// The division operator `/`.
///
/// Note that `RHS` is `Self` by default, but this is not mandatory.
/// Note that `Rhs` is `Self` by default, but this is not mandatory.
///
/// # Examples
///
Expand Down Expand Up @@ -417,18 +417,18 @@ mul_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 f32 f64 }
/// ```
#[lang = "div"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented(message="cannot divide `{Self}` by `{RHS}`",
label="no implementation for `{Self} / {RHS}`")]
#[rustc_on_unimplemented(message="cannot divide `{Self}` by `{Rhs}`",
label="no implementation for `{Self} / {Rhs}`")]
#[doc(alias = "/")]
pub trait Div<RHS=Self> {
pub trait Div<Rhs=Self> {
/// The resulting type after applying the `/` operator.
#[stable(feature = "rust1", since = "1.0.0")]
type Output;

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

macro_rules! div_impl_integer {
Expand Down Expand Up @@ -467,7 +467,7 @@ div_impl_float! { f32 f64 }

/// The remainder operator `%`.
///
/// Note that `RHS` is `Self` by default, but this is not mandatory.
/// Note that `Rhs` is `Self` by default, but this is not mandatory.
///
/// # Examples
///
Expand Down Expand Up @@ -502,18 +502,18 @@ div_impl_float! { f32 f64 }
/// ```
#[lang = "rem"]
#[stable(feature = "rust1", since = "1.0.0")]
#[rustc_on_unimplemented(message="cannot mod `{Self}` by `{RHS}`",
label="no implementation for `{Self} % {RHS}`")]
#[rustc_on_unimplemented(message="cannot mod `{Self}` by `{Rhs}`",
label="no implementation for `{Self} % {Rhs}`")]
#[doc(alias = "%")]
pub trait Rem<RHS=Self> {
pub trait Rem<Rhs=Self> {
/// The resulting type after applying the `%` operator.
#[stable(feature = "rust1", since = "1.0.0")]
type Output = Self;

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

macro_rules! rem_impl_integer {
Expand Down
Loading